Skip to content

Commit

Permalink
Merge pull request #75 from nicolasmoreau/dev
Browse files Browse the repository at this point in the history
Display "number of atoms  / molecules" form in columns instead of lines
  • Loading branch information
nicolasmoreau authored Jul 3, 2017
2 parents 4d49231 + fb89e38 commit 6a4ad32
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ private Integer requestableFormsCount(){
public List<Form> getForms() {
List<Form> forms= new ArrayList<Form>();
forms = this.getQueryData().getOrderedGuidedForm();
//return queryData.getUnsortedForms();
return forms;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ public String getObject(){
return this.toString();
}

/*@Override
public String getView() {
return "/xhtml/query/queryTree/atomsForm.xhtml";
}*/

@Override
public void validate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public abstract class ReactionCollisionForm extends AbstractForm implements Form
private QueryTreeInterface tree;
private Boolean queryable = true;

//private Boolean hasHiddenForm = false;

private String typeAName;
private String typeBName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public QueryStoreResponse getResponse() {
log.debug(e);
result = new QueryStoreResponse(QueryStoreResponse.STATUS_ERROR, "", e.getMessage());
} catch (ExecutionException e) {
System.out.println("### test");
e.printStackTrace();
log.debug(e);
result = new QueryStoreResponse(QueryStoreResponse.STATUS_ERROR, "", e.getMessage());
Expand Down
26 changes: 11 additions & 15 deletions portal.war/src/main/webapp/queryTree.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,25 @@
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich"
template="/layout/template.xhtml">


<ui:define name="body">
<c:if test="#{disclaimer.value == false}">
<ui:include src="/xhtml/disclaimer/disclaimerValidation.xhtml" />
<ui:include src="/xhtml/disclaimer/disclaimerValidation.xhtml" />
</c:if>
<c:if test="#{disclaimer.value == true}">
<a4j:outputPanel width="450" id="formPanel">
<h:panelGrid>
<a4j:outputPanel id="formPanel">
<h:panelGrid width="50%">
<c:forEach items="#{queryTree.forms}" var="form">
<a4j:include viewId="#{form.view}" />
</c:forEach>
<rich:spacer width="450" />
</c:forEach>

</h:panelGrid>
<a4j:outputPanel width="450" id="buttons">
<ui:include src="/xhtml/query/queryTree/actionButtons.xhtml" />
</a4j:outputPanel>

</a4j:outputPanel>
<a4j:outputPanel id="nodeTree">
<rich:spacer width="450" />
<a4j:outputPanel id="buttons">
<ui:include src="/xhtml/query/queryTree/actionButtons.xhtml" />
</a4j:outputPanel>

</a4j:outputPanel>
<a4j:outputPanel id="asyncForm" />
</c:if>
</ui:define>

Expand Down
11 changes: 9 additions & 2 deletions portal.war/src/main/webapp/stylesheet/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,18 @@ table.radio input[type=radio] {
background-color: inherit;
}

.collisionSpecies{
.collisionSpeciesText{
text-decoration:none;
border-bottom:1px dotted #D4CFC7;
}


.collisionSpeciesSelectionForm{
width : 49%;
float : left;
}


.roundButton {
-moz-border-radius: 10px;
border-radius: 10px;
Expand Down Expand Up @@ -418,4 +425,4 @@ table.radio input[type=radio] {
.important{
text-decoration : underline;
font-weight : bold;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</f:facet>

<h:column>
<h:outputText value="#{species.title}" id="cspecies#{species.id}" styleClass="collisionSpecies">
<h:outputText value="#{species.title}" id="cspecies#{species.id}" styleClass="collisionSpeciesText">
<rich:toolTip value="#{species.summary}" styleClass="toolTip"
direction="bottom-left" />
</h:outputText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@
</f:facet>

<a4j:form ajaxSubmit="true">
<h:panelGrid id="panel" columns="6" border="0" cellpadding="10"
<h:panelGrid id="leftPanel" columns="2" border="0" cellpadding="10"
cellspacing="1"
columnClasses="simpleColumn,simpleColumn,simpleColumn,simpleColumn,simpleColumn,simpleColumn">
styleClass="collisionSpeciesSelectionForm"
columnClasses="simpleColumn,simpleColumn">

<h:outputLabel value="Targets" style="font-weight:bold" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />

<h:outputLabel value="Atoms" />
<h:selectOneMenu value="#{form.targetAtomCount}">
Expand All @@ -47,13 +44,14 @@
<f:selectItem itemValue="#{i}" itemLabel="#{i}" />
</c:forEach>
</h:selectOneMenu>
</h:panelGrid>
<h:panelGrid id="rightPanel" columns="2" border="0" cellpadding="10"
cellspacing="1"
styleClass="collisionSpeciesSelectionForm"
columnClasses="simpleColumn,simpleColumn">

<h:outputLabel value="Colliders" style="font-weight:bold" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />

<h:outputLabel value="Atoms" />
<h:selectOneMenu value="#{form.colliderAtomCount}">
Expand All @@ -77,6 +75,7 @@
</c:forEach>
</h:selectOneMenu>
</h:panelGrid>

<a4j:commandButton value="Validate"
action="#{form.validate}" id="speciesNextButton"
styleClass="largeButton" tabindex="20" reRender="formPanel"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@
</f:facet>

<a4j:form ajaxSubmit="true">
<h:panelGrid id="panel" columns="6" border="0" cellpadding="10"
<h:panelGrid id="leftPanel" columns="2" border="0" cellpadding="10"
cellspacing="1"
columnClasses="simpleColumn,simpleColumn,simpleColumn,simpleColumn,simpleColumn,simpleColumn">

styleClass="collisionSpeciesSelectionForm"
columnClasses="simpleColumn,simpleColumn">
<h:outputLabel value="Reactants" style="font-weight:bold" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />

<h:outputLabel value="Atoms" />
<h:selectOneMenu value="#{form.reactantAtomCount}">
Expand All @@ -47,13 +43,14 @@
<f:selectItem itemValue="#{i}" itemLabel="#{i}" />
</c:forEach>
</h:selectOneMenu>
</h:panelGrid>
<h:panelGrid id="rightPanel" columns="2" border="0" cellpadding="10"
cellspacing="1"
styleClass="collisionSpeciesSelectionForm"
columnClasses="simpleColumn,simpleColumn">

<h:outputLabel value="Products" style="font-weight:bold" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />
<h:outputLabel value="" />

<h:outputLabel value="Atoms" />
<h:selectOneMenu value="#{form.productAtomCount}">
Expand Down

0 comments on commit 6a4ad32

Please sign in to comment.