Author: jmorliaguet
Date: Fri Feb 17 13:26:59 2006
New Revision: 2398

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

- registered a 'BehaviourController' (not implemented yet)

  that is, associating action handlers to css selectors
  e.g. "#menu div.item img.toggle" => toggle(...)

  to avoid cluttering templates with inline javascript.

  same idea as:
  http://bennolan.com/behaviour/

  but will need to simplify things a bit (e.g. the CPSSkins
  action handler registration interface can be used for instance)



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 Feb 17 
13:26:59 2006
@@ -402,6 +402,10 @@
     return new CPSSkins.CommandController(node, def);
   },
 
+  'behaviour': function(node, def) {
+    return new CPSSkins.BehaviourController(node, def);
+  },
+
   'form': function(node, def) {
     return new CPSSkins.FormController(node, def);
   },
@@ -442,6 +446,19 @@
 
 });
 
+CPSSkins.BehaviourController = Class.create();
+CPSSkins.BehaviourController.prototype = Object.extend(new 
CPSSkins.Controller(), {
+
+  register: function(view) {
+
+    var controller = this;
+
+    // register rules here
+
+  }
+
+});
+
 CPSSkins.FormController = Class.create();
 CPSSkins.FormController.prototype = Object.extend(new CPSSkins.Controller(), {
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to