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,23 +13,29 @@
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:column styleClass="deDescl">
<p:outputLabel value="Title" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rtitle" size="45" <p:inputText id="rtitle" size="45"
required="true" required="true"
placeholder="A recipe title is required." placeholder="A recipe title is required."
value="#{recipeDetailBean.recipe.title}" value="#{recipeDetailBean.recipe.title}"
> >
<p:focus /> <p:focus />
<f:ajax execute="rtitle" render="editorPanel" /> <f:ajax execute="rtitle"
render="editorPanel" />
</p:inputText> </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:panel id="catEdit" styleClass="noBorders">
<p:inputText id="rcategory" <p:inputText id="rcategory"
label="Category" label="Category"
value="#{recipeDetailBean.category}" value="#{recipeDetailBean.category}"
@ -48,45 +54,93 @@
<f:selectItems <f:selectItems
value="#{recipeDetailBean.suggestCategory}" /> value="#{recipeDetailBean.suggestCategory}" />
</p:selectOneMenu> </p:selectOneMenu>
</p:panel> </p:column>
</p:row>
<!-- --> <!-- -->
<p:outputLabel for="@next" value="Cuisine" /> <p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Cuisine" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:autoComplete id="rcuisine" <p:autoComplete id="rcuisine"
value="#{recipeDetailBean.recipe.cuisine}" value="#{recipeDetailBean.recipe.cuisine}"
completeMethod="#{recipeDetailBean.cuisineSuggestions}" /> completeMethod="#{recipeDetailBean.cuisineSuggestions}" />
<p:outputLabel for="@next" </p:column>
value="Prep Time" /> </p:row>
<p:row>
<p:column styleClass="deDescr" colspan="3">
<p:outputLabel value="Prep Time" />
<p:inputText id="rpreptime" max="10" <p:inputText id="rpreptime" max="10"
value="#{recipeDetailBean.recipe.preptime}" value="#{recipeDetailBean.recipe.preptime}"
> >
<f:converter <f:converter
converterId="com.mousetech.gourmetj.utils.TimeConverter" /> converterId="com.mousetech.gourmetj.utils.TimeConverter" />
</p:inputText> </p:inputText>
<p:outputLabel for="@next" </p:column>
value="Cooking Time" /> </p:row>
<!-- -->
<p:row>
<p:column styleClass="deDescl">
<p:outputLabel value="Cooking Time" />
</p:column>
<p:column styleClass="deDescr" colspan="3">
<p:inputText id="rcooktime" max="10" <p:inputText id="rcooktime" max="10"
value="#{recipeDetailBean.recipe.cooktime}" 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:outputLabel for="@next" value="Servings" /> </p:column>
</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" <p:inputText id="rserves" max="10"
value="#{recipeDetailBean.recipe.servings}" /> value="#{recipeDetailBean.recipe.servings}" />
<p:outputLabel for="@next" value="Rating" /> </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" <p:rating id="rrating" max="10"
value="#{recipeDetailBean.recipe.rating}" /> value="#{recipeDetailBean.recipe.rating}" />
<p:outputLabel for="@next" value="Source" /> </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" <p:inputText id="rsource" size="45"
value="#{recipeDetailBean.recipe.source}" /> value="#{recipeDetailBean.recipe.source}" />
<p:outputLabel for="@next" value="URL" /> </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" <p:inputText id="rurl" size="45"
value="#{recipeDetailBean.recipe.link}" /> value="#{recipeDetailBean.recipe.link}" />
<p:outputLabel for="@next" </p:column>
value="Description" /> </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" <p:inputTextarea id="description"
rows="10" cols="45" rows="10" cols="45"
value="#{recipeDetailBean.recipe.description}" /> 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"