You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2008/02/04 18:01:20 UTC
svn commit: r618327 -
/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
Author: weber
Date: Mon Feb 4 09:01:18 2008
New Revision: 618327
URL: http://svn.apache.org/viewvc?rev=618327&view=rev
Log:
(TOBAGO-611) ajax reload of menu components don't work in IE
<http://issues.apache.org/jira/browse/TOBAGO-611>
Modified:
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js?rev=618327&r1=618326&r2=618327&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js Mon Feb 4 09:01:18 2008
@@ -58,11 +58,9 @@
menubar.removeChild(menubar.firstChild);
}
menubar.appendChild(htmlElement);
- var subitems = createSubmenus(menubar.menu);
- body.appendChild(subitems);
-
-
+ createSubmenus(menubar.menu, body);
+
initMenuItems(menubar.menu);
setItemWidth(menubar.menu);
setItemPositions(menubar.menu);
@@ -76,9 +74,16 @@
}
}
-function createSubmenus(menu) {
- var htmlElement = document.createElement('div');
- htmlElement.className = "tobago-menuBar-submenuroot";
+function createSubmenus(menu, body) {
+ var id = menu.id + Tobago.SUB_COMPONENT_SEP + "submenuroot";
+ var htmlElement = Tobago.element(id);
+ if (!htmlElement) {
+ htmlElement = document.createElement('div');
+ htmlElement.className = "tobago-menuBar-submenuroot";
+ htmlElement.id = id;
+ body.appendChild(htmlElement);
+ }
+
htmlElement.innerHTML = menu.toHtml(true);
return htmlElement;
}