Author: jmorliaguet
Date: Wed Mar  1 23:38:50 2006
New Revision: 2504

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

- fix: nodes inside panels were parsed several times.



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 Wed Mar  1 
23:38:50 2006
@@ -47,7 +47,7 @@
   _handlers: $H({}),
 
   _loaded: 0,
-  _initialized: 0,
+  _initialized: $H({}),
 
   init: function() {
     CPSSkins._parse(document);
@@ -169,15 +169,15 @@
   // first stage
   _parse: function(node) {
     var elements = $A(node.getElementsByTagName("ins"));
-    this._initialized = 0;
+    this._initialized[node] = 0;
     var length = elements.length;
     var progress = new Object();
 
     this.registerEventHandler("initialized", progress, function(event) {
-      this._initialized += 1;
-      if (this._initialized >= length) {
-        this._load(node);
-        this.unsubscribe("initialized");
+      this._initialized[node] += 1;
+      if (this._initialized[node] >= length) {
+        CPSSkins._load(node);
+        CPSSkins.unsubscribe("initialized", {'subscriber': progress});
       }
     }.bind(this));
     CPSSkins.subscribe("initialized", {'subscriber': progress});
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to