Author: jmorliaguet
Date: Wed Jan  4 23:50:19 2006
New Revision: 2140

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

- simpler / less buggy code



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 Jan  4 
23:50:19 2006
@@ -23,14 +23,11 @@
 
   Perspectives: $H({}),
 
-  Panels: [],
-
   init: function() {
     var elements = document.getElementsByTagName("*");
-    var id = 0;
     $A(elements).findAll(function(e) {
       return e.tagName.match(/^cpsskins:/i)
-    }).each(function(e) {
+    }).each(function(e, index) {
       switch (e.tagName.toLowerCase()) {
         case "cpsskins:contextmenu": {
           Renderers.contextmenu(e);
@@ -41,11 +38,10 @@
           break;
         }
         case "cpsskins:panel": {
-          panel_id += 1;
           var perspectives = (e.getAttribute("perspectives")
                               || "default").split(",");
           var panel = new Renderers.panel(e);
-          panel.id = 'cpsskins-panel' + id;
+          panel.id = 'cpsskins-panel' + index;
           $A(perspectives).each(function(p) {
             if (!(p in CPSSkins.Perspectives)) {
               CPSSkins.Perspectives[p] = $A([]);
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to