Fixed invalid HTML generated by the menu widget. Updated BlueLight theme to use valid HTML.
When creating new themes for OFBiz, it is important to follow the guidelines here: http://docs.ofbiz.org/display/OFBIZ/OFBiz+maincss.css+HTML+Element+Collection+Styles git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@767221 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -239,17 +239,16 @@ public class HtmlMenuRenderer extends HtmlWidgetRenderer implements MenuStringRe
|
||||
}
|
||||
writer.append(">");
|
||||
appendWhitespace(writer);
|
||||
String menuTitle = modelMenu.getTitle(context);
|
||||
if (UtilValidate.isNotEmpty(menuTitle)) {
|
||||
writer.append("<h2>" + menuTitle + "</h2>");
|
||||
appendWhitespace(writer);
|
||||
}
|
||||
writer.append("<ul>");
|
||||
appendWhitespace(writer);
|
||||
writer.append("<li>");
|
||||
String menuTitle = modelMenu.getTitle(context);
|
||||
if (UtilValidate.isNotEmpty(menuTitle)) {
|
||||
appendWhitespace(writer);
|
||||
writer.append(" <h2>" + menuTitle + "</h2>");
|
||||
}
|
||||
appendWhitespace(writer);
|
||||
writer.append(" <ul>");
|
||||
|
||||
appendWhitespace(writer);
|
||||
}
|
||||
|
||||
@@ -264,12 +263,12 @@ public class HtmlMenuRenderer extends HtmlWidgetRenderer implements MenuStringRe
|
||||
//String menuContainerStyle = modelMenu.getMenuContainerStyle(context);
|
||||
writer.append(" </ul>");
|
||||
appendWhitespace(writer);
|
||||
writer.append(" <br class=\"clear\"/>");
|
||||
appendWhitespace(writer);
|
||||
writer.append("</li>");
|
||||
appendWhitespace(writer);
|
||||
writer.append("</ul>");
|
||||
appendWhitespace(writer);
|
||||
writer.append(" <br class=\"clear\"/>");
|
||||
appendWhitespace(writer);
|
||||
writer.append("</div>");
|
||||
appendWhitespace(writer);
|
||||
renderEndingBoundaryComment(writer, "Menu Widget", modelMenu);
|
||||
|
||||
@@ -26,9 +26,9 @@ under the License.
|
||||
<div class="breadcrumbs">
|
||||
<div class="breadcrumbs-start">
|
||||
<div id="main-navigation">
|
||||
<h2>${uiLabelMap.CommonHome}</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<h2>${uiLabelMap.CommonHome}</h2>
|
||||
<ul>
|
||||
<#list displayApps as display>
|
||||
<#assign thisApp = display.getContextRoot()>
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
var DropDownMenu = Class.create();
|
||||
DropDownMenu.prototype = {
|
||||
initialize: function(menuElement) {
|
||||
menuElement.childElements().each(function(node){
|
||||
// if there is a submenu
|
||||
var submenu = $A(node.getElementsByTagName("ul")).first();
|
||||
if(submenu != null){
|
||||
// make sub-menu invisible
|
||||
Element.extend(submenu).setStyle({display: 'none'});
|
||||
// toggle the visibility of the submenu
|
||||
node.onmouseover = node.onmouseout = function(){
|
||||
Element.toggle(submenu);
|
||||
}
|
||||
}
|
||||
});
|
||||
var menuTitle = $A(menuElement.getElementsByTagName("h2")).first();
|
||||
menuElement.childElements().each(function(node){
|
||||
// if there is a submenu
|
||||
var submenu = $A(node.getElementsByTagName("ul")).first();
|
||||
if(submenu != null){
|
||||
// make sub-menu invisible
|
||||
Element.extend(submenu).setStyle({display: 'none'});
|
||||
// toggle the visibility of the submenu
|
||||
if (menuTitle != null) {
|
||||
menuTitle.onmouseover = menuTitle.onmouseout = function(){Element.toggle(submenu);};
|
||||
menuTitle = null;
|
||||
}
|
||||
node.onmouseover = node.onmouseout = function(){Element.toggle(submenu);};
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,7 +24,7 @@ Event.observe(window, "load", function(){
|
||||
});
|
||||
|
||||
document.observe('dom:loaded', function(){
|
||||
var mainmenu = new DropDownMenu($('main-navigation'));
|
||||
var mainmenu = new DropDownMenu($('main-navigation'));
|
||||
var appmenu = new DropDownMenu($('app-navigation'));
|
||||
});
|
||||
|
||||
|
||||
@@ -1069,8 +1069,8 @@ padding-bottom: 1em;
|
||||
font-size: 130%;
|
||||
}
|
||||
|
||||
#main-navigation ul li h2,
|
||||
#app-navigation ul li h2 {
|
||||
#main-navigation h2,
|
||||
#app-navigation h2 {
|
||||
color: #FFFFFF;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
|
||||
Reference in New Issue
Block a user