myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r618327 - /myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
Date Mon, 04 Feb 2008 17:01:20 GMT
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;
 }



Mime
View raw message