Author: jmorliaguet
Date: Fri Jan  6 16:22:34 2006
New Revision: 2159

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

- simpler 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 Fri Jan  6 
16:22:34 2006
@@ -62,15 +62,15 @@
   },
 
   /* Controller */
-  getHandlers: function(controller) {
-    return this.Controllers[controller].handlers;
+  getController: function(view) {
+    var controller = view.getAttribute("controller");
+    return this.Controllers[controller];
   },
 
   notify: function(view, object, action, param) {
-    var controller = view.getAttribute("controller");
+    var controller = this.getController(view);
     if (!controller) return;
-    var handlers = this.Controllers[controller].handlers;
-    var handler = handlers[action];
+    var handler = controller.handlers[action];
     if (handler) {
       handler(object, param);
     }
@@ -158,7 +158,7 @@
 
   register: function(handlers) {
     Object.extend(this.handlers, handlers);
-  }
+  },
 
 }
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to