Cleaned up ShoppingList/Shopping Category edit

This commit is contained in:
tim holloway 2024-02-02 08:25:19 -05:00
parent 2600500344
commit 205835bb5f
3 changed files with 16 additions and 40 deletions

View File

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

View File

@ -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>
<!-- -->

View File

@ -42,7 +42,7 @@
<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"
>
@ -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>