Skip to content

Commit

Permalink
Convert to Faces 4, remove inline styles and move them to style.css
Browse files Browse the repository at this point in the history
  • Loading branch information
meier-rene committed Nov 8, 2024
1 parent 24f369e commit 9c595c1
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 93 deletions.
25 changes: 11 additions & 14 deletions MetFragWeb/src/main/webapp/includes/dialogs/aboutDialog.xhtml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:h="jakarta.faces.html"
xmlns:p="http://primefaces.org/ui">

<h:body>
<h:form id="aboutDialogForm">
<p:dialog id="aboutDialog" header="About MetFrag"
widgetVar="aboutDialog" modal="true" resizable="false"
closable="true" width="800" height="600">
<iframe src="https://ipb-halle.github.io/MetFragRelaunched/about.html"
width="780" height="580"> </iframe>
</p:dialog>
</h:form>
<h:form id="aboutDialogForm">
<p:dialog id="aboutDialog" header="About MetFrag"
widgetVar="aboutDialog" modal="true" resizable="false"
closable="true">
<iframe src="https://ipb-halle.github.io/MetFragRelaunched/about.html"
width="780" height="580"></iframe>
</p:dialog>
</h:form>
</h:body>

</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
<html xmlns:h="jakarta.faces.html"
xmlns:p="http://primefaces.org/ui">

<h:body>
<p:dialog id="downloadCandidatesDialog" header="Select format" widgetVar="downloadCandidatesDialog"
modal="true" resizable="false" >
<h:panelGrid columns="3" style="margin: 0 auto; vertical-align: top;">
<h:panelGrid columns="3">
<h:form id="downloadCandidatesFormCSV" enctype="multipart/form-data">
<p:commandLink ajax="false" onclick="PrimeFaces.monitorDownload(startDownloadCandidates, stopDownloadCandidates); ">
<h:graphicImage name="images/icons/csv.png" width="64" height="64" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:h="jakarta.faces.html"
xmlns:p="http://primefaces.org/ui">

<h:body>
<ui:composition>
<p:dialog id="downloadParametersDialog" header="Download Parameters"
widgetVar="downloadParametersDialog"
modal="true" resizable="false" style="text-align: center;">
<h:form id="downloadParametersForm" enctype="multipart/form-data">
<p:commandLink ajax="false" onclick="PrimeFaces.monitorDownload(startDownloadParameters, stopDownloadParameters);" >
<h:graphicImage name="images/icons/zip.png" width="64" height="64" />
<p:fileDownload value="#{metFragWebBean.downloadParameters}" />
</p:commandLink>
</h:form>
<p:dialog id="downloadParametersStatusDialog" modal="true" widgetVar="downloadParametersStatusDialog"
header="Creating Parameter Files" draggable="false" closable="false" resizable="false">
<p:graphicImage name="images/ajaxloadingbar.gif" />
</p:dialog>
<script type="text/javascript">
function startDownloadParameters() {
PF('downloadParametersStatusDialog').show();
}

function stopDownloadParameters() {
PF('downloadParametersStatusDialog').hide();
}
</script>
</p:dialog>
</ui:composition>
<p:dialog id="downloadParametersDialog" header="Download Parameters"
widgetVar="downloadParametersDialog"
modal="true" resizable="false" styleClass="centered-text">
<h:form id="downloadParametersForm" enctype="multipart/form-data">
<p:commandLink ajax="false"
onclick="PrimeFaces.monitorDownload(startDownloadParameters, stopDownloadParameters);">
<h:graphicImage name="images/icons/zip.png" width="64" height="64"/>
<p:fileDownload value="#{metFragWebBean.downloadParameters}"/>
</p:commandLink>
</h:form>
<p:dialog id="downloadParametersStatusDialog" modal="true" widgetVar="downloadParametersStatusDialog"
header="Creating Parameter Files" draggable="false" closable="false" resizable="false">
<p:graphicImage name="images/ajaxloadingbar.gif"/>
</p:dialog>
<script type="text/javascript">
function startDownloadParameters() {
PF('downloadParametersStatusDialog').show();
}

function stopDownloadParameters() {
PF('downloadParametersStatusDialog').hide();
}
</script>
</p:dialog>
</h:body>

</html>
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
<html xmlns:h="jakarta.faces.html"
xmlns:p="http://primefaces.org/ui">

<h:body>

<h:form>
<p:dialog visible="#{metFragWebBean.candidateProcessing}" id="processCandidatesProgressDialog"
header="#{metFragWebBean.processCompoundsDialogHeader}"
widgetVar="processCandidatesProgressDialog" modal="true" resizable="false" closable="false">
<!-- <p:graphicImage name="images/ajaxloadingbar.gif"/> -->
<br />
<p:progressBar style="width: 200px" widgetVar="pbAjax" ajax="true" value="#{metFragWebBean.processingProgress}" labelTemplate="{value}%" styleClass="animated" global="false">
</p:progressBar>
<br />
<h:panelGroup style="padding-left: 0px;">
<p:commandButton style="height: 22px; font-size: 0.7em" value="Stop" id="stopProcessCompounds"
action="#{metFragWebBean.stopCompoundProcessing}" actionListener="#{metFragWebBean.stopCompoundProcessingListener}" onclick="PF('processCompoundsDialog').hide()"/>
</h:panelGroup>
<br />
<p:poll interval="1" listener="#{metFragWebBean.checkProcessingThread}" update="processCandidatesProgressDialog"/>
</p:dialog>

</h:form>

<h:form>
<p:dialog visible="#{metFragWebBean.candidateProcessing}" id="processCandidatesProgressDialog"
header="#{metFragWebBean.processCompoundsDialogHeader}" widgetVar="processCandidatesProgressDialog"
modal="true" resizable="false" closable="false">
<!-- <p:graphicImage name="images/ajaxloadingbar.gif"/> -->
<br/>
<p:progressBar style="width: 200px" widgetVar="pbAjax" ajax="true"
value="#{metFragWebBean.processingProgress}" labelTemplate="{value}%" styleClass="animated"
global="false">
</p:progressBar>
<br/>
<h:panelGroup style="padding-left: 0px;">
<p:commandButton style="height: 22px; font-size: 0.7em" value="Stop" id="stopProcessCompounds"
action="#{metFragWebBean.stopCompoundProcessing}"
actionListener="#{metFragWebBean.stopCompoundProcessingListener}"
onclick="PF('processCompoundsDialog').hide()"/>
</h:panelGroup>
<br/>
<p:poll interval="1" listener="#{metFragWebBean.checkProcessingThread}"
update="processCandidatesProgressDialog"/>
</p:dialog>
</h:form>
</h:body>

</html>
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
<html xmlns:h="jakarta.faces.html"
xmlns:p="http://primefaces.org/ui">

<h:body>

<h:form>
<p:dialog visible="#{metFragWebBean.databaseProcessing}" id="retrieveCandidatesProgressDialog"
header="#{metFragWebBean.retrieveCandidatesDialogHeader}" widgetVar="retrieveCandidatesProgressDialog" modal="true"
resizable="false" closable="false">
<p:graphicImage name="images/ajaxloadingbar.gif"/>
<br />
<h:panelGroup style="padding-left: 0px;">
<p:commandButton style="height: 22px; font-size: 0.7em" value="Stop" id="stopRetrieveCompounds" rendered="false"
action="#{metFragWebBean.stopCompoundRetrieving}" actionListener="#{metFragWebBean.stopCompoundRetrievingListener}" onclick="PF('retrieveCompoundsDialog').hide()"/>
</h:panelGroup>
<br />
<p:poll interval="3" listener="#{metFragWebBean.checkDatabaseThread}" update="retrieveCandidatesProgressDialog"/>
</p:dialog>
</h:form>

<h:form>
<p:dialog visible="#{metFragWebBean.databaseProcessing}" id="retrieveCandidatesProgressDialog"
header="#{metFragWebBean.retrieveCandidatesDialogHeader}" widgetVar="retrieveCandidatesProgressDialog"
modal="true" resizable="false" closable="false">
<p:graphicImage name="images/ajaxloadingbar.gif"/>
<br/>
<h:panelGroup style="padding-left: 0px;">
<p:commandButton style="height: 22px; font-size: 0.7em" value="Stop" id="stopRetrieveCompounds"
rendered="false"
action="#{metFragWebBean.stopCompoundRetrieving}"
actionListener="#{metFragWebBean.stopCompoundRetrievingListener}"
onclick="PF('retrieveCompoundsDialog').hide()"/>
</h:panelGroup>
<br/>
<p:poll interval="3" listener="#{metFragWebBean.checkDatabaseThread}"
update="retrieveCandidatesProgressDialog"/>
</p:dialog>
</h:form>
</h:body>

</html>
5 changes: 4 additions & 1 deletion MetFragWeb/src/main/webapp/resources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ html,body {
.ui-dialog-title {
font-family: 'Lato', sans-serif;
font-size: 15px;
font-weight: normal;
}

.firstColumnButton {
Expand Down Expand Up @@ -598,4 +597,8 @@ html,body {

.scoreDetailsText {
word-wrap: break-word;
}

.centered-text {
text-align: center;
}

0 comments on commit 9c595c1

Please sign in to comment.