Author: jmorliaguet
Date: Sat Jan  7 15:31:13 2006
New Revision: 2181

Modified:
   cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
Log:

- the menu must be cleared before being rendered again



Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Sat Jan  7 
15:31:13 2006
@@ -667,7 +667,7 @@
     if (!element) return null;
     var nodes = element.childNodes;
     for (var i=0;i<nodes.length;i++) {
-      var node = nodes[i]; 
+      var node = nodes[i];
       if (node.nodeType != 1) continue;
       if (!Element.hasClassName(node, "submenu")) continue;
       return node;
@@ -684,11 +684,6 @@
     Canvas.moveTo(widget, x, y);
     Canvas.fitInsideScreen(widget);
 
-    // reset the menu
-    $A(widget.getElementsByTagName("*")).each(function(v) {
-      v.parentNode.removeChild(v);
-    });
-
     CPSSkins.addObserver(selected, this);
 
     new CPSSkins.Scheduler(widget, {
@@ -704,6 +699,12 @@
 
   render: function(data) {
     var data = Canvas.getNodeData(this.selected);
+
+    // reset the menu
+    $A(this.widget.getElementsByTagName("*")).each(function(v) {
+      v.parentNode.removeChild(v);
+    });
+
     this._renderFragment(this.widget, this.tag, data);
   },
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to