Author: jmorliaguet
Date: Fri Mar 17 12:53:25 2006
New Revision: 2652

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

- event fine-tuning.



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 Fri Mar 17 
12:53:25 2006
@@ -67,6 +67,10 @@
     return this._views[id];
   },
 
+  getViews: function() {
+    return this._views.pluck('value');
+  },
+
   registerControllers: function(controllers) {
     Object.extend(this.Controllers, controllers)
   },
@@ -208,6 +212,7 @@
         CPSSkins._load(node);
         CPSSkins.unsubscribe("initialized", {'scope': progress});
         CPSSkins.notify("parsed", {'publisher': node});
+        CPSSkins.getViews().invoke('attachControllers');
       }
     });
     CPSSkins.subscribe("initialized",
@@ -1249,10 +1254,6 @@
     this._data = data;
   },
 
-  hasData: function() {
-    return this._data != undefined;
-  },
-
   // high-level I/O
   getData: function() {
     this.storage.readTransaction(); /* asynchronous call */
@@ -1418,7 +1419,7 @@
         new_data[field] = current_data[field];
       }
     });
-    if (!this.model.hasData() || !this._compareData(this.read(), new_data)) {;
+    if (!this._compareData(this.read(), new_data)) {;
       this.model.writeData(new_data);
       CPSSkins.notify('stored', {'publisher': this});
     }
@@ -1676,6 +1677,7 @@
     var data = this.readData();
     if (data) {
       this.display(data);
+      CPSSkins.notify("displayed", {'publisher': this});
     }
   },
 
@@ -1683,6 +1685,7 @@
     var data = this.getData();
     if (data) {
       this.display(data);
+      CPSSkins.notify("displayed", {'publisher': this});
     }
   },
 
@@ -1692,7 +1695,6 @@
       $(this.widget).hide();
       this.applyEffect(this.def.render_effect)
     }
-    CPSSkins.notify("displayed", {'publisher': this});
   },
 
   show: function() {
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to