UI tweaks

This commit is contained in:
Tim Holloway 2021-12-30 12:43:27 -05:00
parent 94c64b6bde
commit 5ef369743a
5 changed files with 77 additions and 63 deletions

View File

@ -1,8 +1,8 @@
joinfaces.jsf.project-stage=development joinfaces.jsf.project-stage=development
joinfaces.primefaces.theme=omega joinfaces.primefaces.theme=bluesky
spring.thymeleaf.enabled=false #spring.thymeleaf.enabled=false
spring.datasource.url=jdbc:sqlite:/home/timh/foo/bazz/recipes.db spring.datasource.url=jdbc:sqlite:/home/timh/foo/bazz/recipes.db
#spring.datasource.username=dbuser #spring.datasource.username=dbuser

View File

@ -1,7 +1,3 @@
server:
context-path: /codenotfound
port: 9090
spring: spring:
datasource: datasource:
url: jdbc:sqlite:/home/timh/foo/bazz/recipes.db url: jdbc:sqlite:/home/timh/foo/bazz/recipes.db

View File

@ -38,7 +38,7 @@
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Title" value="Title"
/> />
<p:inputText id="rtitle" size="30" <p:inputText id="rtitle" size="45"
required="true" focus="true" required="true" focus="true"
value="#{recipeDetailBean.recipe.title}" value="#{recipeDetailBean.recipe.title}"
> >
@ -84,13 +84,13 @@
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Source" value="Source"
/> />
<p:inputText id="rsource" size="30" <p:inputText id="rsource" size="45"
value="#{recipeDetailBean.recipe.source}" value="#{recipeDetailBean.recipe.source}"
/> />
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="URL" value="URL"
/> />
<p:inputText id="rurl" size="30" <p:inputText id="rurl" size="45"
value="#{recipeDetailBean.recipe.link}" value="#{recipeDetailBean.recipe.link}"
/> />
<p:outputLabel for="@next" <p:outputLabel for="@next"
@ -198,16 +198,17 @@
</p:selectBooleanCheckbox> </p:selectBooleanCheckbox>
</p:column> </p:column>
<p:column label="Amt" <p:column label="Amt"
style="width: 4em; text-align: right" style="width: 4em"
> >
<p:inputText id="ingAmt" size="5" <p:inputText id="ingAmt" size="5"
value="#{item.displayAmount}" value="#{item.displayAmount}"
style="text-align: right"
rendered="#{not item.ingGroup}" rendered="#{not item.ingGroup}"
> >
</p:inputText> </p:inputText>
</p:column> </p:column>
<p:column label="Units" <p:column label="Units"
style="width: 6em" style="width: 7em"
> >
<p:inputText id="ingUnit" <p:inputText id="ingUnit"
value="#{item.unit}" size="10" value="#{item.unit}" size="10"
@ -216,7 +217,7 @@
</p:inputText> </p:inputText>
</p:column> </p:column>
<p:column label="Item" style="width: 22em"> <p:column label="Item" style="width: 22em">
<p:inputText id="ingItem" size="20" <p:inputText id="ingItem" size="35"
value="#{item.item}" value="#{item.item}"
> >
</p:inputText> </p:inputText>
@ -233,7 +234,7 @@
</p:column> </p:column>
<p:column label="Key"> <p:column label="Key">
<p:inputText id="ingKey" <p:inputText id="ingKey"
value="#{item.ingkey}" size="12" value="#{item.ingkey}" size="20"
rendered="#{not item.ingGroup}" rendered="#{not item.ingGroup}"
/> />
</p:column> </p:column>

View File

@ -10,16 +10,19 @@
<h:form id="form1"> <h:form id="form1">
<p:panelGrid label="Find a Recipe" columns="1"> <p:panelGrid label="Find a Recipe" columns="1">
<p:panelGrid columns="3"> <p:panelGrid columns="3">
<p:inputText id="searchFor" <span class="ui-input-icon-left"> <i
class="pi pi-search"
/> <p:inputText id="searchFor" width="45"
placeholder="Recipe title (todo) cuisine, etc." placeholder="Recipe title (todo) cuisine, etc."
styleClass="redBox" accesskey="f" styleClass="redBox" accesskey="f"
value="#{adminMainBean.searchText}" value="#{adminMainBean.searchText}"
> >
<f:ajax event="change" execute="@this" <f:ajax event="change"
render="@form" execute="@this" render="@form"
listener="#{adminMainBean.ajaxUpdateList}" listener="#{adminMainBean.ajaxUpdateList}"
/> />
C </p:inputText> </p:inputText>
</span>
<p:button id="find" value="Find" <p:button id="find" value="Find"
defaultCommand="true" defaultCommand="true"
action="#{adminMainBean.doFind}" action="#{adminMainBean.doFind}"

View File

@ -37,16 +37,21 @@
</f:facet> </f:facet>
<p:row> <p:row>
<p:column id="leftCol" style="width: 80%"> <p:column id="leftCol" style="width: 80%">
<p:panelGrid columns="2">
<img id="bigpix" <img id="bigpix"
src="/img/picture/#{recipeDetailBean.recipe.id}" src="/img/picture/#{recipeDetailBean.recipe.id}"
/> />
<p:panelGrid id="pnlDetails" columns="2"> <p:panelGrid id="pnlDetails"
<p:commandButton value="&lt;- Back" columns="2"
>
<p:commandButton
value="&lt;- Back"
styleClass="ui-button-arrow-left" styleClass="ui-button-arrow-left"
action="main.jsf" action="main.jsf"
immediate="true" immediate="true"
/> />
<p:commandButton value="Print" <p:commandButton
value="Print"
action="recipePrint.jsf" action="recipePrint.jsf"
styleClass="ui-button-print" styleClass="ui-button-print"
immediate="true" immediate="true"
@ -54,28 +59,33 @@
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Categories:" value="Categories:"
/> />
<h:outputText label="Category: " <h:outputText
label="Category: "
value="#{adminMainBean.formatCategories(recipeDetailBean.recipe)}" value="#{adminMainBean.formatCategories(recipeDetailBean.recipe)}"
/> />
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Cuisine:" value="Cuisine:"
/> />
<h:outputText label="Cuisine: " <h:outputText
label="Cuisine: "
value="#{recipeDetailBean.recipe.cuisine}" value="#{recipeDetailBean.recipe.cuisine}"
/> />
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Prep Time:" value="Prep Time:"
/> />
<h:outputText label="Prep Time: " <h:outputText
label="Prep Time: "
value="#{userSession.formatTime(recipeDetailBean.recipe.preptime)}" value="#{userSession.formatTime(recipeDetailBean.recipe.preptime)}"
/> />
<p:outputLabel for="@next" <p:outputLabel for="@next"
value="Cook Time:" value="Cook Time:"
/> />
<h:outputText label="Cook Time: " <h:outputText
label="Cook Time: "
value="#{userSession.formatTime(recipeDetailBean.recipe.cooktime)}" value="#{userSession.formatTime(recipeDetailBean.recipe.cooktime)}"
/> />
</p:panelGrid> </p:panelGrid>
</p:panelGrid>
<h:commandLink value="Edit Details" <h:commandLink value="Edit Details"
action="#{recipeDetailBean.editDescription}" action="#{recipeDetailBean.editDescription}"
> >
@ -85,7 +95,9 @@
/> />
</h:commandLink> </h:commandLink>
<!-- --> <!-- -->
<p:panelGrid id="pnlInstr" columns="1" style="width: 100%"> <p:panelGrid id="pnlInstr"
columns="1" style="width: 100%"
>
<f:facet name="header"> <f:facet name="header">
<h:outputText <h:outputText
styleClass="subtitle" styleClass="subtitle"
@ -101,7 +113,9 @@
action="#{recipeDetailBean.editInstructions}" action="#{recipeDetailBean.editInstructions}"
/> />
</p:panelGrid> </p:panelGrid>
<p:panelGrid id="pnlNotes" columns="1" style="width: 100%"> <p:panelGrid id="pnlNotes"
columns="1" style="width: 100%"
>
<f:facet name="header"> <f:facet name="header">
<h:outputText <h:outputText
styleClass="subtitle" styleClass="subtitle"