Author: jacopoc
Date: Sat Apr 14 21:26:12 2007 New Revision: 528925 URL: http://svn.apache.org/viewvc?view=rev&rev=528925 Log: Applied patch from Adrian Crum (OFBIZ-892) to refactor UI elements in the Common component. Modified: ofbiz/trunk/framework/common/webcommon/includes/footer.ftl ofbiz/trunk/framework/common/webcommon/includes/header.ftl ofbiz/trunk/framework/common/webcommon/includes/messages.ftl ofbiz/trunk/framework/common/webcommon/includes/simple.ftl ofbiz/trunk/framework/common/webcommon/login.ftl ofbiz/trunk/framework/common/widget/CommonScreens.xml ofbiz/trunk/framework/common/widget/LookupForms.xml ofbiz/trunk/framework/images/webapp/images/maincss.css Modified: ofbiz/trunk/framework/common/webcommon/includes/footer.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/footer.ftl?view=diff&rev=528925&r1=528924&r2=528925 ============================================================================== --- ofbiz/trunk/framework/common/webcommon/includes/footer.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/includes/footer.ftl Sat Apr 14 21:26:12 2007 @@ -19,16 +19,11 @@ <#assign nowTimestamp = Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp()> -<br/> -<div align="center"> - <a href="http://jigsaw.w3.org/css-validator/"><img style="border:0;width:88px;height:31px" src="<@ofbizContentUrl>/images/vcss.gif</@ofbizContentUrl>" alt="Valid CSS!"/></a> - <a href="http://validator.w3.org/check?uri=referer"><img style="border:0;width:88px;height:31px" src="<@ofbizContentUrl>/images/valid-xhtml10.png</@ofbizContentUrl>" alt="Valid XHTML 1.0!"/></a> +<div id="footer"> + <p><a href="http://jigsaw.w3.org/css-validator/"><img src="<@ofbizContentUrl>/images/vcss.gif</@ofbizContentUrl>" alt="Valid CSS!"/></a> + <a href="http://validator.w3.org/check?uri=referer"><img src="<@ofbizContentUrl>/images/valid-xhtml10.png</@ofbizContentUrl>" alt="Valid XHTML 1.0!"/></a></p> + <p>Copyright (c) 2001-${nowTimestamp?string("yyyy")} The Apache Software Foundation - <a href="http://www.apache.org" target="_blank">www.apache.org</a></p> + <p>Powered by <a href="http://ofbiz.apache.org" target="_blank">Apache OFBiz</a></p> </div> -<br/> -<div class="tabletext" align="center"> - <div class="tabletext">Copyright (c) 2001-${nowTimestamp?string("yyyy")} The Apache Software Foundation - <a href="http://www.apache.org" class="tabletext" target="_blank">www.apache.org</a></div> - <div class="tabletext">Powered by <a href="http://ofbiz.apache.org" class="tabletext" target="_blank">Apache OFBiz</a></div> -</div> -<br/> </body> </html> Modified: ofbiz/trunk/framework/common/webcommon/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/header.ftl?view=diff&rev=528925&r1=528924&r2=528925 ============================================================================== --- ofbiz/trunk/framework/common/webcommon/includes/header.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/includes/header.ftl Sat Apr 14 21:26:12 2007 @@ -18,14 +18,16 @@ under the License. --> -<#if (requestAttributes.uiLabelMap)?exists><#assign uiLabelMap = requestAttributes.uiLabelMap></#if> -<#if (requestAttributes.layoutSettings)?exists><#assign layoutSettings = requestAttributes.layoutSettings></#if> -<#if (requestAttributes.locale)?exists><#assign locale = requestAttributes.locale></#if> -<#if (requestAttributes.availableLocales)?exists><#assign availableLocales = requestAttributes.availableLocales></#if> <#if (requestAttributes.person)?exists><#assign person = requestAttributes.person></#if> <#if (requestAttributes.partyGroup)?exists><#assign partyGroup = requestAttributes.partyGroup></#if> -<html xmlns="http://www.w3.org/1999/xhtml"> +<#assign docLangAttr = locale.toString()?replace("_", "-")> +<#assign langDir = "ltr"> +<#if "ar.iw"?contains(docLangAttr?substring(0, 2))> + <#assign langDir = "rtl"> +</#if> + +<html lang="${docLangAttr}" dir="${langDir}" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>${layoutSettings.companyName}: <#if (page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)?if_exists}</#if></title> @@ -50,40 +52,37 @@ </head> <body> -<table border="0" width="100%" cellspacing="0" cellpadding="0" class="headerboxoutside"> - <tr> - <td width="100%"> - <table width="100%" border="0" cellspacing="0" cellpadding="0" class="headerboxtop"> - <tr> - <#if layoutSettings.headerImageUrl?exists> - <td align="left" width="1%"><img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${layoutSettings.headerImageUrl}</@ofbizContentUrl>"/></td> - </#if> - <td align="right" width="1%" nowrap="nowrap" <#if layoutSettings.headerRightBackgroundUrl?has_content>background="${layoutSettings.headerRightBackgroundUrl}"</#if>> - <div class="insideHeaderText"> - <#if person?has_content> - ${uiLabelMap.CommonWelcome} ${person.firstName?if_exists} ${person.lastName?if_exists}! - <#elseif partyGroup?has_content> - ${uiLabelMap.CommonWelcome} ${partyGroup.groupName?if_exists}! - <#else> - ${uiLabelMap.CommonWelcome}! - </#if> - </div> - <div class="insideHeaderText"> ${Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().toString()}</div> - <div class="insideHeaderText"> - <form method="post" action="<@ofbizUrl>setSessionLocale</@ofbizUrl>" style="margin: 0;"> - <select name="locale" class="selectBox"> - <option value="${locale}">${locale.getDisplayName(locale)}</option> - <option value="${locale}">----</option> - <#list availableLocales as availableLocale> - <option value="${availableLocale.toString()}">${availableLocale.getDisplayName(locale)}</option> - </#list> - </select> - <input type="submit" value="${uiLabelMap.CommonSet}" class="smallSubmit"/> - </form> - </div> - </td> - </tr> - </table> - </td> - </tr> -</table> + <div id="masthead"> + <ul> + <#if layoutSettings.headerImageUrl?exists> + <li class="logo-area"><img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${layoutSettings.headerImageUrl}</@ofbizContentUrl>"/></li> + </#if> + <li class="control-area"<#if layoutSettings.headerRightBackgroundUrl?has_content> background="${layoutSettings.headerRightBackgroundUrl}"</#if>> + <br /> + <p> + <#if person?has_content> + ${uiLabelMap.CommonWelcome} ${person.firstName?if_exists} ${person.lastName?if_exists}! + <#elseif partyGroup?has_content> + ${uiLabelMap.CommonWelcome} ${partyGroup.groupName?if_exists}! + <#else> + ${uiLabelMap.CommonWelcome}! + </#if> + </p> + <p>${Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().toString()}</p> + <form method="post" action="<@ofbizUrl>setSessionLocale</@ofbizUrl>"> + <select name="locale"> + <#list availableLocales as availableLocale> + <#assign langAttr = availableLocale.toString()?replace("_", "-")> + <#assign langDir = "ltr"> + <#if "ar.iw"?contains(langAttr?substring(0, 2)) && langAttr?substring(0, 2) = docLangAttr?substring(0, 2)> + <#assign langDir = "rtl"> + </#if> + <option lang="${langAttr}" dir="${langDir}" value="${availableLocale.toString()}"<#if locale.toString() = availableLocale.toString()> selected="selected"</#if>>${availableLocale.getDisplayName(locale)}</option> + </#list> + </select> + <input type="submit" value="${uiLabelMap.CommonSet}"/> + </form> + </li> + </ul> + <br class="clear" /> + </div> Modified: ofbiz/trunk/framework/common/webcommon/includes/messages.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/messages.ftl?view=diff&rev=528925&r1=528924&r2=528925 ============================================================================== --- ofbiz/trunk/framework/common/webcommon/includes/messages.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/includes/messages.ftl Sat Apr 14 21:26:12 2007 @@ -37,32 +37,30 @@ <#-- display the error messages --> <#if (errorMessage?has_content || errorMessageList?has_content)> - <div class="errorMessage">${uiLabelMap.CommonFollowingErrorsOccurred}:</div><br/> - <ul> + <div id="content-messages" class="errorMessage"> + <p>${uiLabelMap.CommonFollowingErrorsOccurred}:</p> <#if errorMessage?has_content> - <li class="errorMessage">${errorMessage}</li> + <p>${errorMessage}</p> </#if> <#if errorMessageList?has_content> <#list errorMessageList as errorMsg> - <li class="errorMessage">${errorMsg}</li> + <p>${errorMsg}</p> </#list> </#if> - </ul> - <br/> + </div> </#if> <#-- display the event messages --> <#if (eventMessage?has_content || eventMessageList?has_content)> - <div class="eventMessage">${uiLabelMap.CommonFollowingOccurred}:</div><br/> - <ul> + <div id="content-messages" class="eventMessage"> + <p>${uiLabelMap.CommonFollowingOccurred}:</p> <#if eventMessage?has_content> - <li class="eventMessage">${eventMessage}</li> + <p>${eventMessage}</p> </#if> <#if eventMessageList?has_content> <#list eventMessageList as eventMsg> - <li class="eventMessage">${eventMsg}</li> + <p>${eventMsg}</p> </#list> </#if> - </ul> - <br/> + </div> </#if> Modified: ofbiz/trunk/framework/common/webcommon/includes/simple.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl?view=diff&rev=528925&r1=528924&r2=528925 ============================================================================== --- ofbiz/trunk/framework/common/webcommon/includes/simple.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/includes/simple.ftl Sat Apr 14 21:26:12 2007 @@ -18,7 +18,13 @@ under the License. --> -<html xmlns="http://www.w3.org/1999/xhtml"> +<#assign docLangAttr = locale.toString()?replace("_", "-")> +<#assign langDir = "ltr"> +<#if "ar.iw"?contains(docLangAttr?substring(0, 2))> + <#assign langDir = "rtl"> +</#if> + +<html lang="${docLangAttr}" dir="${langDir}" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>${layoutSettings.companyName}: <#if (page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)?if_exists}</#if></title> @@ -39,8 +45,7 @@ ${layoutSettings.extraHead?if_exists} </head> -<#-- TODO: create a corresponding style in the main style sheet, eliminate embedded style --> -<body style="background-color: WHITE;"> +<body id="column-container"> <form name="printPage"> <input type="button" value="${uiLabelMap.CommonPrint}" onClick="window.print()" class="smallSubmit"/> </form> Modified: ofbiz/trunk/framework/common/webcommon/login.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/login.ftl?view=diff&rev=528925&r1=528924&r2=528925 ============================================================================== --- ofbiz/trunk/framework/common/webcommon/login.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/login.ftl Sat Apr 14 21:26:12 2007 @@ -31,68 +31,35 @@ <#assign focusName = true> </#if> -<table width='300' 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'> +<div class="screenlet login-screenlet"> + <div class="screenlet-title-bar"> + <h3>${uiLabelMap.CommonRegistered}</h3> + </div> + <div class="screenlet-body"> + <form method="post" action="<@ofbizUrl>login${previousParams?if_exists}</@ofbizUrl>" name="loginform"> + <table cellspacing="0"> <tr> - <td width='100%'> - <table width='100%' border='0' cellspacing='0' cellpadding='0' class='boxtop'> - <tr> - <td valign='middle' align='center'> - <div class="boxhead">${uiLabelMap.CommonRegistered}</div> - </td> - </tr> - </table> - </td> + <td class="label">${uiLabelMap.CommonUsername}</td> + <td><input type="text" name="USERNAME" value="${username}" size="20"/></td> + </tr> + <tr> + <td class="label">${uiLabelMap.CommonPassword}</td> + <td><input type="password" name="PASSWORD" value="" size="20"/></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${previousParams?if_exists}</@ofbizUrl>" name="loginform" style='margin: 0;'> - <table width='100%' border='0' cellpadding='0' cellspacing='2'> - <tr> - <td align="right"> - <span class="tabletext">${uiLabelMap.CommonUsername} </span> - </td> - <td align="left"> - <input type="text" class="inputBox" name="USERNAME" value="${username}" size="20"/> - </td> - </tr> - <tr> - <td align="right"> - <span class="tabletext">${uiLabelMap.CommonPassword} </span> - </td> - <td align="left"> - <input type="password" class="inputBox" name="PASSWORD" value="" size="20"/> - </td> - </tr> - <tr> - <td colspan="2" align="center"> - <!--<a href="javascript:document.loginform.submit()" class="buttontext">[Login]</a>--> - <input type="submit" value="${uiLabelMap.CommonLogin}" class="loginButton"/> - </td> - </tr> - </table> - </form> - </td> - </tr> - </table> + <td colspan="2" align="center"> + <input type="submit" value="${uiLabelMap.CommonLogin}"/> </td> </tr> </table> - </td> - </tr> -</table> + </form> + </div> +</div> <script language="JavaScript" type="text/javascript"> -<!-- <#if focusName> document.loginform.USERNAME.focus(); <#else> document.loginform.PASSWORD.focus(); </#if> -//--> </script> Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?view=diff&rev=528925&r1=528924&r2=528925 ============================================================================== --- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Sat Apr 14 21:26:12 2007 @@ -128,13 +128,11 @@ <include-screen name="${leftbarScreenName}" location="${leftbarScreenLocation}"/> <container id="content-main-section" style="${MainColumnStyle}"> - <container id="content-messages"> - <!-- render messages --> - <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific> - </container> + <!-- render messages --> + <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific> <decorator-section-include name="body"/> </container> - <container style="endcolumns"><label text="&nbsp;"/></container> + <container style="clear"></container> </container> </container> </container> Modified: ofbiz/trunk/framework/common/widget/LookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/LookupForms.xml?view=diff&rev=528925&r1=528924&r2=528925 ============================================================================== --- ofbiz/trunk/framework/common/widget/LookupForms.xml (original) +++ ofbiz/trunk/framework/common/widget/LookupForms.xml Sat Apr 14 21:26:12 2007 @@ -21,8 +21,7 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-form.xsd"> <!-- Geo Lookup forms --> - <form name="LookupGeo" target="LookupGeo" title="" type="single" - default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox"> + <form name="LookupGeo" target="LookupGeo" title="" type="single"> <field name="geoId" title="${uiLabelMap.SegmentGroupGeoId}"><text-find/></field> <field name="geoTypeId" title="${uiLabelMap.SegmentGroupGeoTypeId}"> <drop-down allow-empty="true"> @@ -39,7 +38,6 @@ <field name="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> <form name="listLookupGeo" list-name="listIt" target="" title="" type="list" - default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="tabletext" paginate-target="LookupGeo"> <actions> <service service-name="performFind" result-map-name="result" result-map-list-name="listIt"> Modified: ofbiz/trunk/framework/images/webapp/images/maincss.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/maincss.css?view=diff&rev=528925&r1=528924&r2=528925 ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/maincss.css (original) +++ ofbiz/trunk/framework/images/webapp/images/maincss.css Sat Apr 14 21:26:12 2007 @@ -1190,6 +1190,10 @@ color: #ff0000; } +#content-messages p { +margin: 0.5em 0 0.5em 0; +} + .label { /* Used for <input> element labels */ font-weight: bold; @@ -1427,6 +1431,17 @@ .screenlet-title-bar ul a:hover { /* placeholder */ +} + +/* login screenlet decorator */ +.login-screenlet { +margin-left: 38%; +min-width: 25em; +width: 24%; +} + +.login-screenlet .screenlet-title-bar { +text-align: center; } /* ======================================================= */ |
Free forum by Nabble | Edit this page |