Cleaned up ShoppingList/Shopping Category edit

version2
tim holloway 3 months ago
parent 2600500344
commit 205835bb5f
  1. 1
      src/main/java/com/mousetech/gourmetj/SpringSecurityConfig.java
  2. 43
      src/main/resources/META-INF/resources/WEB-INF/layout/misctabs/ingshopkey.xhtml
  3. 12
      src/main/resources/META-INF/resources/shoppingList.xhtml

@ -128,6 +128,7 @@ public class SpringSecurityConfig {
"/main.jsf",
"/img/**",
"/recipeDetails.jsf",
"/shoppingList.jsf",
"/recipePrint.jsf");
}
}

@ -8,23 +8,13 @@
>
<!-- === Edit ingkey/shopcat === -->
<h:form id="frmIsk">
<p:panelGrid>
<p:row>
<p:column>
<p:outputLabel for="ctlScSel"
value="Shopping Category"
/>
</p:column>
<p:column>
<p:outputLabel for="ctlIngkeySel"
value="Ingredient Key"
/>
</p:column>
</p:row>
<p:row style="vertical-align: top">
<p:column>
<p:panelGrid columns="2" style="width: 30em;">
<f:facet name="header">
<h:outputText value="Shopping Categories"/>
</f:facet>
<h:outputText value="Shopping Category"/>
<h:outputText value="Ingredient key"/>
<p:selectOneListbox id="ctlScSel"
style="width: 240px"
value="#{shoppingListBean.selectedShopcat}"
>
<f:selectItems
@ -32,10 +22,8 @@
/>
<p:ajax update="ctlIngkeySel" event="change" />
</p:selectOneListbox>
</p:column>
<p:column>
<h:selectManyListbox id="ctlIngkeySel"
style="width: 240px"
style="width: 12em;"
value="#{shoppingListBean.selectedIngkey}"
label="Ingcat"
>
@ -44,34 +32,21 @@
/>
<p:ajax event="change" update="ctlChangeCat"/>
</h:selectManyListbox>
</p:column>
</p:row>
<p:row>
<p:column>
<p:outputLabel
value="Change shopping category to:"
value="Change selected ingredient key category to:"
style="width: 10em;"
/>
</p:column>
<p:column>
<p:autoComplete
value="#{shoppingListBean.newShopcat}"
autoSelection="false" forceSelection="false"
maxResults="12"
completeMethod="#{shoppingListBean.suggestShopcat}"
/>
</p:column>
</p:row>
<p:row>
<p:column>
<p:commandButton id="ctlChangeCat" value="Change..."
disabled="#{empty shoppingListBean.selectedIngkey}"
onclick="PF('dlgOkRecat').show()"
/>
</p:column>
<p:column>
<h:outputText value="" />
</p:column>
</p:row>
</p:panelGrid>
</h:form>
<!-- -->

@ -42,12 +42,12 @@
<p:tab id="overviewTab" title="Shopping List">
<h:form id="form1">
<p:dataTable id="tblRecipes"
style="width: 600px"
style="width: 40em"
value="#{shoppingListBean.recipeList}"
var="item"
>
<f:facet name="header">
<h:outputText value="Recipes" />
<h:outputText value="Recipes " />
<p:commandButton
update="@parent:tblRecipes"
value="Clear Recipes"
@ -83,11 +83,11 @@
</p:commandButton>
</p:column>
<p:column id="ingredientsc"
style="width: 25%; vertical-align: top;"
style="vertical-align: top; margin-left: 1em; margin-right: 1em;"
>
<p:dataTable id="tblShopIngredients"
style="width: 600px; margin-top: 10px"
value="#{shoppingListBean.ingredientList}"
style="width: 40em;"
sortBy="#{item.shopCat}" var="item"
>
<f:facet name="header">
@ -123,7 +123,7 @@
styleClass="#{(item.inPantry) ? 'noRecipe' :'plusRecipe' }"
/>
</p:column>
<p:column style="width: 2em">
<p:column style="width: 3em">
<f:facet name="header">
<h:outputText value="Pantry" />
</f:facet>
@ -160,7 +160,7 @@
<h:form id="frmHome">
<p:commandButton id="doHome" value="Home"
icon="ui-icon-home" ajax="false" immediate="true"
action="main.jsf"
action="/main.jsf?redirect=true"
/>
</h:form>
</ui:define>

Loading…
Cancel
Save