|
Author: apatel
Date: Thu Mar 1 04:25:14 2012 New Revision: 1295411 URL: http://svn.apache.org/viewvc?rev=1295411&view=rev Log: Cleaned up facility selection flow. Updated login form layout code. Modified: ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/facilities.ftl ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/includes/header.ftl ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/menu.ftl ofbiz/trunk/specialpurpose/hhfacility/widget/hhfacility/FacilityScreens.xml Modified: ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml?rev=1295411&r1=1295410&r2=1295411&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/controller.xml Thu Mar 1 04:25:14 2012 @@ -43,8 +43,9 @@ under the License. <!-- Request Mappings --> <request-map uri="main"> <security https="true" auth="true"/> - <response name="success" type="view" value="main"/> + <response name="success" type="view" value="menu"/> </request-map> + <request-map uri="receipt"> <security https="true" auth="true"/> <response name="success" type="view" value="receipt"/> @@ -137,7 +138,7 @@ under the License. <!-- end of request mappings --> <!-- View Mappings --> - <view-map name="main" type="screen" page="component://hhfacility/widget/hhfacility/FacilityScreens.xml#facilities"/> + <view-map name="main" type="screen" page="component://hhfacility/widget/hhfacility/FacilityScreens.xml#menu"/> <view-map name="login" type="screen" page="component://hhfacility/widget/hhfacility/FacilityScreens.xml#login"/> <view-map name="receipt" type="screen" page="component://hhfacility/widget/hhfacility/FacilityScreens.xml#receipt"/> Modified: ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/facilities.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/facilities.ftl?rev=1295411&r1=1295410&r2=1295411&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/facilities.ftl (original) +++ ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/facilities.ftl Thu Mar 1 04:25:14 2012 @@ -18,11 +18,16 @@ under the License. --> <#if facilities?has_content> -Facilities : -<ul> +<div data-role="content"> + <ul data-role="listview"> <#list facilities as facility> - <li> ${facility.facilityId?if_exists} ${facility.facilityName?if_exists} ${facility.description?if_exists} - + <li> + <#-- Each entry will have a html form. Set action to null so previous link be used --> + <form> + <input type="hidden" name="facilityId" value="${facility.facilityId}"/> + <input type="submit" value="${facility.facilityName?if_exists}"/> + </form> + </li> </#list> -</ul> -</#if> \ No newline at end of file + </ul> +</#if> Modified: ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/includes/header.ftl?rev=1295411&r1=1295410&r2=1295411&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/includes/header.ftl (original) +++ ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/includes/header.ftl Thu Mar 1 04:25:14 2012 @@ -30,7 +30,6 @@ under the License. </head> <body> <div data-role="header"> - <a href="<@ofbizUrl>/main</@ofbizUrl>">Main</a> + <a href="<@ofbizUrl>/menu?facilityId=${parameters.facilityId?if_exists}</@ofbizUrl>">Main</a> <h1>${title?if_exists}</h1> - <a href="<@ofbizUrl>/logout</@ofbizUrl>">Logout</a> </div> Modified: ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl?rev=1295411&r1=1295410&r2=1295411&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl (original) +++ ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/login.ftl Thu Mar 1 04:25:14 2012 @@ -18,80 +18,21 @@ under the License. --> <#assign useMultitenant = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "multitenant")> <#assign username = requestParameters.USERNAME?default((sessionAttributes.autoUserLogin.userLoginId)?default(""))> -<#if username != ""> - <#assign focusName = false> -<#else> - <#assign focusName = true> -</#if> -<table width='250' border='0' cellpadding='0' cellspacing='0' align='center'> - <tr> - <td width='100%' valign='top'> - <table border='0' width='100%' cellspacing='0' cellpadding='0' class='boxoutside'> - <tr> - <td width='100%'> - <table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxtop'> - <tr> - <td valign='middle' align='center'> - <div class="boxhead">Login</div> - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td width='100%'> - <table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxbottom'> - <tr> - <td align="center" valign="middle" width='100%'> - <form method="post" action="<@ofbizUrl>login</@ofbizUrl>" name="loginform" style='margin: 0;'> - <table width='100%' border='0' cellpadding='0' cellspacing='2'> - <tr> - <td align="right"> - <span>Username </span> - </td> - <td> - <input type="text" name="USERNAME" value="${username}" size="20" /> - </td> - </tr> - <tr> - <td align="right"> - <span>Password </span> - </td> - <td> - <input type="password" name="PASSWORD" value="" size="20" /> - </td> - </tr> - <#if ("Y" == useMultitenant)> - <tr> - <td class="label">TenantId</td> - <td><input type="text" name="tenantId" value="${parameters.tenantId?if_exists}" size="20"/></td> - </tr> - </#if> - <tr> - <td colspan="2" align="center"> - <!--<a href="javascript:document.loginform.submit()" class="buttontext">[Login]</a>--> - <input type="submit" value="Login" class="loginButton" /> - </td> - </tr> - </table> - </form> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> -</table> - -<script language="JavaScript" type="text/javascript"> -<!-- - <#if focusName> - document.loginform.USERNAME.focus(); - <#else> - document.loginform.PASSWORD.focus(); +<form method="post" action="<@ofbizUrl>login</@ofbizUrl>" name="loginform" data-ajax="false"> + <div data-role="fieldcontainer"> + <label for="USERNAME">Username</label> + <input type="text" id="USERNAME" name="USERNAME" value="${username}" size="20"/> + </div> + <div data-role="fieldcontainer"> + <label for="PASSWORD">Password</label> + <input type="password" id="PASSWORD" name="PASSWORD" value="" size="20" /> + </div> + <#if ("Y" == useMultitenant)> + <div data-role="fieldcontainer"> + <label for="tenantId">TenantId</label> + <input type="text" id="tenantId" name="tenantId" value="${parameters.tenantId?if_exists}" size="20"/> + </div> </#if> -//--> -</script> + <input type="submit" value="Login" class="loginButton" /> +</form> Modified: ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/menu.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/menu.ftl?rev=1295411&r1=1295410&r2=1295411&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/menu.ftl (original) +++ ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/menu.ftl Thu Mar 1 04:25:14 2012 @@ -17,13 +17,18 @@ specific language governing permissions under the License. --> -<#assign facility = parameters.facility> <div data-role="content"> <ul data-role="listview"> -<li><a accesskey="1" href="<@ofbizUrl>/receipt?facilityId=${facility.facilityId?if_exists}</@ofbizUrl>">Goods Receipt</a></li> -<li><a accesskey="2" href="<@ofbizUrl>/movement?facilityId=${facility.facilityId?if_exists}</@ofbizUrl>">Inventory Movement</a></li> -<li><a accesskey="3" href="<@ofbizUrl>/picking?facilityId=${facility.facilityId?if_exists}</@ofbizUrl>">Picking</a></li> -<li><a accesskey="4" href="<@ofbizUrl>/packing?facilityId=${facility.facilityId?if_exists}</@ofbizUrl>">Packing</a></li> -<li><a accesskey="5" href="<@ofbizUrl>/stocktake?facilityId=${facility.facilityId?if_exists}</@ofbizUrl>">Stocktake</a></li> +<li><a accesskey="1" href="<@ofbizUrl>/receipt?facilityId=${parameters.facilityId?if_exists}</@ofbizUrl>">Goods Receipt</a></li> +<li><a accesskey="2" href="<@ofbizUrl>/movement?facilityId=${parameters.facilityId?if_exists}</@ofbizUrl>">Inventory Movement</a></li> +<li><a accesskey="3" href="<@ofbizUrl>/picking?facilityId=${parameters.facilityId?if_exists}</@ofbizUrl>">Picking</a></li> +<li><a accesskey="4" href="<@ofbizUrl>/packing?facilityId=${parameters.facilityId?if_exists}</@ofbizUrl>">Packing</a></li> +<li><a accesskey="5" href="<@ofbizUrl>/stocktake?facilityId=${parameters.facilityId?if_exists}</@ofbizUrl>">Stocktake</a></li> </ul> -</div> \ No newline at end of file +</div> + +<#-- Setting Menu. --> +<div data-role="controlgroup"> + <a data-role="button" data-icon="gear" href="<@ofbizUrl>/menu</@ofbizUrl>">Select Facility</a> + <a data-role="button" data-icon="info" href="<@ofbizUrl>/logout</@ofbizUrl>">Logout</a> +</div> Modified: ofbiz/trunk/specialpurpose/hhfacility/widget/hhfacility/FacilityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/hhfacility/widget/hhfacility/FacilityScreens.xml?rev=1295411&r1=1295410&r2=1295411&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/hhfacility/widget/hhfacility/FacilityScreens.xml (original) +++ ofbiz/trunk/specialpurpose/hhfacility/widget/hhfacility/FacilityScreens.xml Thu Mar 1 04:25:14 2012 @@ -33,6 +33,11 @@ under the License. <screen name="CommonDecorator"> <section> + <actions> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> + <set field="applicationTitle" value="mFacility"/> + </actions> <widgets> <include-screen name="GlobalDecorator"/> </widgets> @@ -42,19 +47,23 @@ under the License. <screen name="FacilityDecorator"> <section> <actions> - <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> - <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> - <set field="applicationTitle" value="mFacility"/> <set field="facilityId" from-field="parameters.facilityId"/> <entity-one entity-name="Facility" value-field="parameters.facility"/> </actions> <widgets> <decorator-screen name="CommonDecorator"> <decorator-section name="body"> - <container> - <label style="h2">${parameters.facility.facilityName}</label> - </container> - <decorator-section-include name="body"/> + <section> + <condition> + <not><if-empty field="parameters.facilityId"/></not> + </condition> + <widgets> + <decorator-section-include name="body"/> + </widgets> + <fail-widgets> + <include-screen name="facilities"/> + </fail-widgets> + </section> </decorator-section> </decorator-screen> </widgets> @@ -262,13 +271,8 @@ under the License. </entity-condition> </actions> <widgets> - <decorator-screen name="CommonDecorator"> - <decorator-section name="body"> - <include-form name="ListFacilities" location="component://hhfacility/widget/hhfacility/FacilityForms.xml"/> - </decorator-section> - </decorator-screen> + <platform-specific><html><html-template location="component://hhfacility/webapp/hhfacility/facilities.ftl"/></html></platform-specific> </widgets> </section> </screen> - </screens> |
| Free forum by Nabble | Edit this page |
