Author: jonesde
Date: Thu Jan 22 17:50:28 2009 New Revision: 736887 URL: http://svn.apache.org/viewvc?rev=736887&view=rev Log: Applied patches from Bruno Busco in Jira #OFBIZ-2118 to add flexibility to menus and themes for more dramatic changes in themes, includes patches AppMenuDropDown.patch and VisualThemeMessage.patch Modified: ofbiz/trunk/framework/common/data/CommonTypeData.xml ofbiz/trunk/framework/common/widget/CommonScreens.xml ofbiz/trunk/framework/example/webapp/appheader.ftl ofbiz/trunk/framework/images/webapp/images/maincss.css ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java Modified: ofbiz/trunk/framework/common/data/CommonTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/CommonTypeData.xml?rev=736887&r1=736886&r2=736887&view=diff ============================================================================== --- ofbiz/trunk/framework/common/data/CommonTypeData.xml (original) +++ ofbiz/trunk/framework/common/data/CommonTypeData.xml Thu Jan 22 17:50:28 2009 @@ -113,7 +113,8 @@ <Enumeration enumId="VT_FTR_TMPLT_LOC" description="Footer Template Location" enumTypeId="VT_RES_TYPE" sequenceId="08"/> <Enumeration enumId="VT_FTR_JAVASCRIPT" description="Footer JavaScript File URL" enumTypeId="VT_RES_TYPE" sequenceId="09"/> <Enumeration enumId="VT_NAV_TMPLT_LOC" description="Main Navigation Template Location" enumTypeId="VT_RES_TYPE" sequenceId="10"/> - <Enumeration enumId="VT_SCREENSHOT" description="Theme Preview Screenshot" enumTypeId="VT_RES_TYPE" sequenceId="11"/> + <Enumeration enumId="VT_MSG_TMPLT_LOC" description="Main Messages Template Location" enumTypeId="VT_RES_TYPE" sequenceId="11"/> + <Enumeration enumId="VT_SCREENSHOT" description="Theme Preview Screenshot" enumTypeId="VT_RES_TYPE" sequenceId="12"/> <VisualTheme visualThemeId="DEFAULT" description="OFBiz Standard Floating Layout"/> <VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/images/maincss.css" sequenceId="01"/> <VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_RTL_STYLESHEET" resourceValue="/images/mainrtl.css" sequenceId="01"/> @@ -122,6 +123,7 @@ <VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://common/webcommon/includes/header.ftl" sequenceId="01"/> <VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://common/webcommon/includes/footer.ftl" sequenceId="01"/> <VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_NAV_TMPLT_LOC" resourceValue="component://common/webcommon/includes/appbar.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_MSG_TMPLT_LOC" resourceValue="component://common/webcommon/includes/messages.ftl" sequenceId="01"/> <VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/images/default-screenshot.gif" sequenceId="01"/> <!-- Uom Conversion Purposes --> Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=736887&r1=736886&r2=736887&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Thu Jan 22 17:50:28 2009 @@ -134,6 +134,7 @@ <set field="headerTemplateLocation" from-field="layoutSettings.VT_HDR_TMPLT_LOC[0]" default-value="component://common/webcommon/includes/header.ftl"/> <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://common/webcommon/includes/footer.ftl"/> <set field="appbarTemplateLocation" from-field="layoutSettings.VT_NAV_TMPLT_LOC[0]" default-value="component://common/webcommon/includes/appbar.ftl"/> + <set field="messagesTemplateLocation" from-field="layoutSettings.VT_MSG_TMPLT_LOC[0]" default-value="component://common/webcommon/includes/messages.ftl"/> <property-to-field resource="general" property="defaultOrganizationPartyId" field="defaultOrganizationPartyIdProperties"/> <set field="defaultOrganizationPartyId" value="${bsh:"DEFAULT".equals(userPreferences.get("ORGANIZATION_PARTY"))?defaultOrganizationPartyIdProperties:userPreferences.get("ORGANIZATION_PARTY")}" global="true"/> <property-to-field resource="general" property="currency.uom.id.default" field="defaultCurrencyUomId"/> @@ -172,7 +173,9 @@ <include-menu name="CommonAppBarMenu" location="component://common/widget/CommonMenus.xml"/> </fail-widgets> </section> - <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific> + + <!-- render messages --> + <platform-specific><html><html-template location="${messagesTemplateLocation}"/></html></platform-specific> <container style="contentarea"> <!-- may be used by sight disabled persons to skip directly to content area--> <decorator-section-include name="pre-body"/> Modified: ofbiz/trunk/framework/example/webapp/appheader.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/appheader.ftl?rev=736887&r1=736886&r2=736887&view=diff ============================================================================== --- ofbiz/trunk/framework/example/webapp/appheader.ftl (original) +++ ofbiz/trunk/framework/example/webapp/appheader.ftl Thu Jan 22 17:50:28 2009 @@ -21,6 +21,8 @@ <div id="app-navigation"> <h2>${uiLabelMap.ExampleApplication}</h2> <ul> + <li> + <ul> <#if userLogin?has_content> <li <#if selected = "${uiLabelMap.ExampleExample}"> class="selected"</#if>><a href="<@ofbizUrl>FindExample?portalPageId=${uiLabelMap.ExampleExample}</@ofbizUrl>">${uiLabelMap.ExampleExample}</a></li> <li <#if selected = "${uiLabelMap.ExampleFeature}"> class="selected"</#if>><a href="<@ofbizUrl>FindExampleFeature?portalPageId=${uiLabelMap.ExampleFeature}</@ofbizUrl>">${uiLabelMap.ExampleFeature}</a></li> @@ -37,5 +39,7 @@ <li class="opposed"><a href="<@ofbizUrl>${checkLoginUrl?if_exists}</@ofbizUrl>">${uiLabelMap.CommonLogin}</a></li> </#if> </ul> + </li> + </ul> <br class="clear" /> </div> Modified: ofbiz/trunk/framework/images/webapp/images/maincss.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/maincss.css?rev=736887&r1=736886&r2=736887&view=diff ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/maincss.css (original) +++ ofbiz/trunk/framework/images/webapp/images/maincss.css Thu Jan 22 17:50:28 2009 @@ -1029,7 +1029,7 @@ display: inline; /* IE Fix */ } -#app-navigation ul li { +#app-navigation ul li ul li { background-color: #000099; background-image: url(/images/gradient_sub_uns.gif); background-repeat: repeat-x; Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java?rev=736887&r1=736886&r2=736887&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java Thu Jan 22 17:50:28 2009 @@ -243,6 +243,10 @@ writer.append(" style=\"width:" + menuWidth + ";\""); } writer.append(">"); + appendWhitespace(writer); + writer.append("<ul>"); + appendWhitespace(writer); + writer.append("<li>"); String menuTitle = modelMenu.getTitle(context); if (UtilValidate.isNotEmpty(menuTitle)) { appendWhitespace(writer); @@ -267,6 +271,10 @@ appendWhitespace(writer); writer.append(" <br class=\"clear\"/>"); appendWhitespace(writer); + writer.append("</li>"); + appendWhitespace(writer); + writer.append("</ul>"); + appendWhitespace(writer); writer.append("</div>"); appendWhitespace(writer); renderEndingBoundaryComment(writer, "Menu Widget", modelMenu); @@ -540,3 +548,5 @@ } + + |
Free forum by Nabble | Edit this page |