Converted recipe description tab grid

This commit is contained in:
tim holloway 2024-09-21 14:39:35 -04:00
parent 91cefd5002
commit bea1cfa485
2 changed files with 127 additions and 73 deletions

View File

@ -7,7 +7,7 @@
<groupId>com.mousetech.gourmet</groupId> <groupId>com.mousetech.gourmet</groupId>
<artifactId>gourmetj</artifactId> <artifactId>gourmetj</artifactId>
<version>2.0.23</version> <version>2.0.28</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>GourmetJ</name> <name>GourmetJ</name>

View File

@ -13,80 +13,134 @@
columnClasses="deDescl, deDescr" columnClasses="deDescl, deDescr"
> >
<f:facet name="header">Description</f:facet> <f:facet name="header">Description</f:facet>
<p:outputLabel for="@next" value="Title" /> <p:row>
<p:inputText id="rtitle" size="45" <p:column styleClass="deDescl">
required="true" <p:outputLabel value="Title" />
placeholder="A recipe title is required." </p:column>
value="#{recipeDetailBean.recipe.title}" <p:column styleClass="deDescr" colspan="3">
> <p:inputText id="rtitle" size="45"
<p:focus /> required="true"
<f:ajax execute="rtitle" render="editorPanel" /> placeholder="A recipe title is required."
</p:inputText> value="#{recipeDetailBean.recipe.title}"
>
<p:focus />
<f:ajax execute="rtitle"
render="editorPanel" />
</p:inputText>
</p:column>
</p:row>
<!-- --> <!-- -->
<p:panel id="catPanel" styleClass="noBorders" <p:row>
style="display: flex; flex-direction: row; align-items: center;" <p:column styleClass="deDescl">
> <p:outputLabel value="Category" />
<p:outputLabel for="rcategory" </p:column>
value="Category" /> <p:column styleClass="deDescr" colspan="3">
</p:panel> <p:inputText id="rcategory"
<p:panel id="catEdit" styleClass="noBorders"> label="Category"
<p:inputText id="rcategory" value="#{recipeDetailBean.category}"
label="Category" tip="One or more categories, separated by commas (ex: Entree, Soup)" />
value="#{recipeDetailBean.category}" <p:commandButton
tip="One or more categories, separated by commas (ex: Entree, Soup)" /> value="&lt;- Suggest"
<p:commandButton >
value="&lt;- Suggest" <f:ajax execute="rcategory bxCat"
> listener="#{recipeDetailBean.ajaxSuggestCategory}"
<f:ajax execute="rcategory bxCat" render="rcategory" />
listener="#{recipeDetailBean.ajaxSuggestCategory}" </p:commandButton>
render="rcategory" /> <p:selectOneMenu id="bxCat"
</p:commandButton> value="#{recipeDetailBean.catToAdd}"
<p:selectOneMenu id="bxCat" tip="Recipe category suggestions, based on previous selections"
value="#{recipeDetailBean.catToAdd}" >
tip="Recipe category suggestions, based on previous selections" <f:selectItems
> value="#{recipeDetailBean.suggestCategory}" />
<f:selectItems </p:selectOneMenu>
value="#{recipeDetailBean.suggestCategory}" /> </p:column>
</p:selectOneMenu> </p:row>
</p:panel>
<!-- --> <!-- -->
<p:outputLabel for="@next" value="Cuisine" /> <p:row>
<p:autoComplete id="rcuisine" <p:column styleClass="deDescl">
value="#{recipeDetailBean.recipe.cuisine}" <p:outputLabel value="Cuisine" />
completeMethod="#{recipeDetailBean.cuisineSuggestions}" /> </p:column>
<p:outputLabel for="@next" <p:column styleClass="deDescr" colspan="3">
value="Prep Time" /> <p:autoComplete id="rcuisine"
<p:inputText id="rpreptime" max="10" value="#{recipeDetailBean.recipe.cuisine}"
value="#{recipeDetailBean.recipe.preptime}" completeMethod="#{recipeDetailBean.cuisineSuggestions}" />
> </p:column>
<f:converter </p:row>
converterId="com.mousetech.gourmetj.utils.TimeConverter" /> <p:row>
</p:inputText> <p:column styleClass="deDescr" colspan="3">
<p:outputLabel for="@next" <p:outputLabel value="Prep Time" />
value="Cooking Time" /> <p:inputText id="rpreptime" max="10"
<p:inputText id="rcooktime" max="10" value="#{recipeDetailBean.recipe.preptime}"
value="#{recipeDetailBean.recipe.cooktime}" >
> <f:converter
<f:converter converterId="com.mousetech.gourmetj.utils.TimeConverter" />
converterId="com.mousetech.gourmetj.utils.TimeConverter" /> </p:inputText>
</p:inputText> </p:column>
<p:outputLabel for="@next" value="Servings" /> </p:row>
<p:inputText id="rserves" max="10"
value="#{recipeDetailBean.recipe.servings}" /> <!-- -->
<p:outputLabel for="@next" value="Rating" /> <p:row>
<p:rating id="rrating" max="10" <p:column styleClass="deDescl">
value="#{recipeDetailBean.recipe.rating}" /> <p:outputLabel value="Cooking Time" />
<p:outputLabel for="@next" value="Source" /> </p:column>
<p:inputText id="rsource" size="45" <p:column styleClass="deDescr" colspan="3">
value="#{recipeDetailBean.recipe.source}" />
<p:outputLabel for="@next" value="URL" /> <p:inputText id="rcooktime" max="10"
<p:inputText id="rurl" size="45" value="#{recipeDetailBean.recipe.cooktime}"
value="#{recipeDetailBean.recipe.link}" /> >
<p:outputLabel for="@next" <f:converter
value="Description" /> converterId="com.mousetech.gourmetj.utils.TimeConverter" />
<p:inputTextarea id="description" </p:inputText>
rows="10" cols="45" </p:column>
value="#{recipeDetailBean.recipe.description}" /> </p:row>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Servings" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rserves" max="10"
value="#{recipeDetailBean.recipe.servings}" />
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Rating" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:rating id="rrating" max="10"
value="#{recipeDetailBean.recipe.rating}" />
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Source" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rsource" size="45"
value="#{recipeDetailBean.recipe.source}" />
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="URL" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rurl" size="45"
value="#{recipeDetailBean.recipe.link}" />
</p:column>
</p:row>
<p:row>
<p:column styleClass="deDescl" colspan="3">
<p:outputLabel value="Description" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputTextarea id="description"
rows="10" cols="45"
value="#{recipeDetailBean.recipe.description}" />
</p:column>
</p:row>
</p:panelGrid> </p:panelGrid>
<p:panel id="picPanel"> <p:panel id="picPanel">
<img id="bigPix" <img id="bigPix"