Created
May 4, 2012 19:04
-
-
Save andrewkolesnikov/2597041 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- untitled | |
+++ (clipboard) | |
@@ -12,12 +12,13 @@ | |
your athletes below 90% of max heart rate, set an alert that lets you | |
know when they go above this value.</p> --> | |
<p:panel id="drillsTable" widgetVar="alertsTable" rendered="#{!drillsSetupBean.editMode}"> | |
- <p:dataTable var="drill" value="#{drillsSetupBean.newObjectList}" selectionMode="single" rowKey="#{drill.id}"> | |
+ <p:dataTable var="drill" value="#{drillsSetupBean.newObjectList}" selectionMode="single" rowKey="#{drill.id}" styleClass="shadowed light"> | |
<p:column> | |
<f:facet name="header"> | |
<h:outputText value="Drills" /> | |
<p:commandButton styleClass="datatable-add" value="+" action="#{drillsSetupBean.add()}" update="@form" /> | |
</f:facet> | |
+ <span class="icon icon-drill"></span> | |
<h:outputText value="#{drill.getDisplayName()}" /> | |
</p:column> | |
<p:column> | |
@@ -69,30 +70,32 @@ | |
</p:dataTable> | |
</p:panel> | |
- <p:panel id="drillsEdit" widgetVar="targetsEdit" rendered="#{drillsSetupBean.editMode}"> | |
- <h2> | |
- <h:outputText value="#{drillsSetupBean.editType == 'EDIT' ? 'Edit' : 'Add'} Drills"/> | |
- </h2> | |
+ <p:panel id="drillsEdit" styleClass="alerts-targets-edit-panel" widgetVar="targetsEdit" rendered="#{drillsSetupBean.editMode}"> | |
+ <!-- <h2> | |
+ <h:outputText value="#{drillsSetupBean.editType == 'EDIT' ? 'Edit' : 'Add'} Drills"/> | |
+ </h2> --> | |
<p:tabView orientation="left" value="#{drillsSetupBean.editType == 'EDIT' ? drillsSetupBean.newObjectList: drillsSetupBean.newObject}" var="drill" activeIndex="#{drillsSetupBean.selectedIndex}"> | |
<p:tab> | |
<f:facet name="title"> | |
- <p:commandButton value="Delete" action="#{drillsSetupBean.delete(drill)}" rendered="#{drillsSetupBean.editType == 'EDIT'}" /> | |
+ <p:commandButton styleClass="inline delete" value="-" action="#{drillsSetupBean.delete(drill)}" rendered="#{drillsSetupBean.editType == 'EDIT'}" /> | |
<span class="#{drillsSetupBean.editType == 'EDIT' ? iconClass : ''}" ></span> | |
<h:outputText value="[Drill Name]"/> | |
</f:facet> | |
<p:panel id="drillsSetup" rendered="#{drillsSetupBean.presentStep == 'INTERVAL'}"> | |
- | |
+ <fieldset> | |
<!-- Category --> | |
- <h:outputText value="Category" /> | |
+ <h:outputLabel styleClass="long" value="Category" /> | |
<p:selectOneMenu value="#{drill.drillCategory}"> | |
<f:selectItems | |
value="#{selectItemBean.getValues(drill.drillCategory)}" /> | |
- <p:ajax event="change" update="descriptionType" listener="#{drillsSetupBean.setDescription}"/> | |
+ <p:ajax event="change" update="descriptionType" /> | |
</p:selectOneMenu> | |
+ | |
+ | |
<!-- Shown only if this is a game --> | |
<p:panel id="descriptionType"> | |
- <h:outputText value="Description" rendered="#{drill.drillCategory == 'GAMES'}"/> | |
+ <h:outputLabel value="Description" rendered="#{drill.drillCategory == 'GAMES'}"/> | |
<p:selectOneMenu value="#{drill.drillDescription}" rendered="#{drill.drillCategory == 'GAMES'}"> | |
<f:selectItems | |
value="#{selectItemBean.getValues(drill.drillDescription)}" /> | |
@@ -100,13 +103,16 @@ | |
</p:selectOneMenu> | |
</p:panel> | |
- <!-- Shown only if this is a custom drill after 1/2 seconds --> | |
+ | |
+ | |
+ <!-- Shown only if this is a custom drill --> | |
<p:panel id="customDescripton"> | |
- <p:autoComplete value="#{drill.customDescription}" maxlength="30" | |
- completeMethod="#{drillsSetupBean.completeCustomMessage}" rendered="#{drill.drillDescription == 'CUSTOM'}" | |
- minQueryLength="1" queryDelay="500" required="true" requiredMessage="#{msg['Custom.Description.Required']}" /> | |
+ <p:autoComplete value="#{drill.customDescription}" maxlength="30" completeMethod="#{drillsSetupBean.completeCustomMessage}" rendered="#{drill.drillDescription == 'CUSTOM'}" | |
+ minQueryLength="1" /> | |
</p:panel> | |
+ </fieldset> | |
+ | |
<p:dataTable id="intervalsTable" value="#{drillsSetupBean.drillIntervalList}" var="interval"> | |
<p:column id="modelHeader"> | |
<f:facet name="header"> | |
@@ -129,8 +135,8 @@ | |
Duration(h:mm:ss) | |
</f:facet> | |
<!-- <p:inputText value="#{interval.scheduledTime}" validator="#{drillsSetupBean.validateDuration}" converter="durationConverter" /> --> | |
- <p:inputMask value="#{interval.scheduledTime}" mask="9:99:99" required="true" converter="hmsDurationConverter"> | |
- <p:ajax event="change" update="@form" process="@this"/> | |
+ <p:inputMask value="#{interval.scheduledTime}" mask="9:99:99" required="true" validator="#{drillsSetupBean.validateDuration}" converter="hmsDurationConverter"> | |
+ <p:ajax event="change" update="@form" /> | |
<!-- Reg ex required to validate the input value or not? --> | |
<!-- <f:validateRegex pattern="^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$" messsage="Max value is 9:59:59"/> --> | |
</p:inputMask> | |
@@ -149,12 +155,12 @@ | |
</p:inputText> | |
<h:outputText value="Recovery(mm:ss)" /> | |
- <p:inputMask id="recoveryBlock" value="#{drillsSetupBean.recoveryTime}" mask="99:99" required="true" readonly="#{drillsSetupBean.totalSets lt 2}" converter="msDurationConverter"> | |
+ <p:inputMask id="recoveryBlock" value="#{drillsSetupBean.recoveryTime}" mask="99:99" required="true" readonly="#{drillsSetupBean.totalSets lt 2}" validator="#{drillsSetupBean.validateDuration}" converter="msDurationConverter"> | |
<p:ajax event="change" update="totalTime" /> | |
</p:inputMask> | |
<h:outputText value="Total" /> | |
- <h:outputText id="totalTime" value="#{drillsSetupBean.getTotalIntervalTime()}" converter="hmsDurationConverter" /> | |
+ <h:outputText id="totalTime" value="#{drillsSetupBean.totalIntervalTime}" converter="hmsDurationConverter" /> | |
<h:outputText value="Auto-Stop" /> | |
<p:selectOneButton value="#{drill.autoStop}"> | |
@@ -163,7 +169,7 @@ | |
</p:selectOneButton> | |
</p:panel> | |
- <p:commandButton value="Cancel" action="#{drillsSetupBean.cancel}" update="@form" process="@this"/> | |
+ <p:commandButton value="Cancel" action="#{drillsSetupBean.cancel}" update="@form"/> | |
<p:commandButton value="Select Groups" action="#{drillsSetupBean.setGroups}" update="@form"/> | |
</p:panel> | |
<p:panel id="groupsSetup" rendered="#{drillsSetupBean.presentStep == 'GROUP'}"> | |
@@ -175,7 +181,7 @@ | |
<f:selectItem itemLabel="1" itemValue="1" /> | |
<f:selectItem itemLabel="2" itemValue="2" /> | |
<f:selectItem itemLabel="3" itemValue="3" /> | |
- <f:selectItem itemLabel="4" itemValue="4" /> | |
+ <f:selectItem itemLabel="4" itemValue="4" /> | |
</p:selectOneMenu> | |
<h:outputText value="Team 2:" /> | |
@@ -216,13 +222,16 @@ | |
</p:selectOneMenu> | |
</p:panel> | |
- <h:outputText value="Field Lenth:" /> | |
+ <h3><h:outputText value="Field Lenth:" /></h3> | |
<p:inputText value="#{drill.fieldLength}" type="Integer" /> | |
- <h:outputText value="Field Width:" /> | |
+ <h3><h:outputText value="Field Width:" /></h3> | |
<p:inputText value="#{drill.fieldWidth}" type="Integer" /> | |
- <h:outputText value="Select Group"/><p:commandButton value="Create Group" onclick="dlg1.show();" type="button" /> | |
+ <h3><h:outputText value="Select Group" /></h3> | |
+ <p:commandButton id="basic" | |
+ value="Create Group" | |
+ onclick="dlg1.show();" type="button" /> | |
<p:dialog header="Add New Group" widgetVar="dlg1" | |
modal="true" width="450" height="500" | |
@@ -235,7 +244,7 @@ | |
<p:commandButton value="Create Group" action="#{athleteGroupSetup.createGroup}" oncomplete="dlg1.hide();" update="@form"/> | |
</p:dialog> | |
- <p:dataTable id="groupsTable" var="group" value="#{athleteGroupSetup.sessionGroupList}" selection="#{drillsSetupBean.selectedGroup}" rowKey="#{group.id}" selectionMode="single"> | |
+ <p:dataTable id="groupsTable" value="#{athleteGroupSetup.sessionGroupList}" var="group" rowKey="#{group}" selection="#{drill.sessionGroup}" selectionMode="single"> | |
<p:column> | |
<f:facet name="header"> | |
<h:outputText value="Available Groups(#{athleteGroupSetup.sessionGroupList.size()})" /> | |
@@ -244,15 +253,16 @@ | |
</p:column> | |
</p:dataTable> | |
- <h:outputText value="Drill Note:" /> | |
- <p:inputTextarea value="#{drill.note}" /> | |
+ <h:outputText value="Drill Note:" /> | |
+ <p:inputTextarea value="#{drill.note}" /> | |
+ | |
- <h:outputText value="Drill Name:" /> | |
- <h:outputText value="SSG -11v11 +2 +2G -30 x 40" /> | |
+ <h:outputText value="Drill Name:" /> | |
+ <h:outputText value="SSG -11v11 +2 +2G -30 x 40" /> | |
<p:commandButton value="Set Intervals" action="#{drillsSetupBean.setIntervals}" update="@form"/> | |
- <p:commandButton value="Cancel" action="#{drillsSetupBean.cancel}" update="@form" process="@this"/> | |
+ <p:commandButton value="Cancel" action="#{drillsSetupBean.cancel}" update="@form"/> | |
<p:commandButton value="Create Drill" action="#{drillsSetupBean.upsertDrill(drill)}" update="@form"/> | |
</p:panel> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment