Author: jmorliaguet
Date: Sat Feb 25 22:09:31 2006
New Revision: 2469

Modified:
   cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
   cpsskins/branches/jmo-perspectives/ui/framework/doc/index.txt
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/behaviour/cpsskins_behaviour_test.html
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualactions_test.html
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualmenu_test.html
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_dragdrop_test.html
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_observer_test.html
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_template_test.html
   cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html
   
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/treeview/cpsskins_treeview.pt
Log:

- renamed registerHandlers as addActions



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 Sat Feb 25 
22:09:31 2006
@@ -36,6 +36,11 @@
 var CPSSkins = {
   Version: "0.7",
 
+  Controllers: $H({}),
+  Effects: $H({}),
+  Storages: $H({}),
+  Widgets: $H({}),
+
   _subscribers: $H({}),
   _models: $H({}),
   _controllers: $H({}),
@@ -44,11 +49,6 @@
   _currentPerspective: "",
   _previousPerspective: "",
 
-  Controllers: $H({}),
-  Effects: $H({}),
-  Storages: $H({}),
-  Widgets: $H({}),
-
   init: function() {
     CPSSkins.parse(document);
   },
@@ -99,12 +99,12 @@
     context.parentNode.replaceChild(div, context);
   },
 
-  /* Public events */
-  registerHandlers: function(handlers) {
+  /* Action handlers */
+  addActions: function(handlers) {
     Object.extend(CPSSkins._handlers, handlers);
   },
 
-  /* Internal events */
+  /* Event system */
   subscribe: function(eventid, event) {
     if (!(eventid in CPSSkins._subscribers)) {
       CPSSkins._subscribers[eventid] = [];

Modified: cpsskins/branches/jmo-perspectives/ui/framework/doc/index.txt
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/doc/index.txt       
(original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/doc/index.txt       Sat Feb 
25 22:09:31 2006
@@ -319,7 +319,7 @@
   - switchPerspective(perspective)
 
 
-  - registerHandlers(handlers)
+  - addActions(handlers)
 
 
   - subscribe(eventid, event)

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/behaviour/cpsskins_behaviour_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/behaviour/cpsskins_behaviour_test.html
     (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/behaviour/cpsskins_behaviour_test.html
     Sat Feb 25 22:09:31 2006
@@ -44,7 +44,7 @@
       Element.setStyle(target, {'background-color': null});
     }
 
-    CPSSkins.registerHandlers(
+    CPSSkins.addActions(
       {'say-hello': sayHello,
        'focus-area': focusArea,
        'unfocus-area': unfocusArea

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualactions_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualactions_test.html
       (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualactions_test.html
       Sat Feb 25 22:09:31 2006
@@ -118,7 +118,7 @@
         context.getAttribute('id') + ' => ' + options.choice + '\n';
     }
 
-    CPSSkins.registerHandlers({'displayChoice': displayChoice});
+    CPSSkins.addActions({'displayChoice': displayChoice});
   </script>
 
   <pre id="message"></pre>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualmenu_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualmenu_test.html
  (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_contextualmenu_test.html
  Sat Feb 25 22:09:31 2006
@@ -177,7 +177,7 @@
         context.getAttribute('id') + ' =&gt; ' + options.choice + '\n';
     }
 
-    CPSSkins.registerHandlers({'displayChoice': displayChoice});
+    CPSSkins.addActions({'displayChoice': displayChoice});
   </script>
 
   <pre id="message"></pre>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_dragdrop_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_dragdrop_test.html
        (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_dragdrop_test.html
        Sat Feb 25 22:09:31 2006
@@ -65,7 +65,7 @@
     function displayInfo(event) {
     }
 
-    CPSSkins.registerHandlers({'displayInfo': displayInfo});
+    CPSSkins.addActions({'displayInfo': displayInfo});
   </script>
 
 </body>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_observer_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_observer_test.html
        (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_observer_test.html
        Sat Feb 25 22:09:31 2006
@@ -125,6 +125,18 @@
   <p>The views observe the model.
      When the model changes the views get updated.</p>
 
+  <ins class="controller">
+  {"id": "show-hide-menu",
+   "type": "focus observer"
+  }
+  </ins>
+
+  <ins class="controller">
+  {"id": "show-hide-tooltip",
+   "type": "focus observer"
+  }
+  </ins>
+
   <h2>Model</h2>
   <ins class="model">
   {"id": "data-provider",
@@ -143,6 +155,7 @@
     {"widget": {
        "type":"tooltip"
      },
+     "controllers": ["show-hide-tooltip"],
      "show_effect": {
        "delay": 1500
      }
@@ -155,7 +168,8 @@
       "type": "contextmenu",
       "items": [
         {"type": "selection", "choices": "sizeinfo"}
-      ]
+      ],
+     "controllers": ["show-hide-menu"]
     }}
     </ins>
   </div>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_template_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_template_test.html
 (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_template_test.html
 Sat Feb 25 22:09:31 2006
@@ -42,7 +42,6 @@
 
   <p>CTAL templates are very similar to Zope Page Templates.</p>
 
-
   <ins class="model">
   {"id": "template-data",
    "data": {
@@ -73,8 +72,7 @@
    "model": "template-data",
    "render_effect": {
      "transition": "fadein"
-   }
-  }
+  }}
   </ins>
 
 </body>

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html   
    (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html   
    Sat Feb 25 22:09:31 2006
@@ -253,11 +253,11 @@
       assertEqual(CPSSkins.getControllerById("c2"), null);
     }},
 
-    testRegisterHandlers: function() { with(this) {
-      assertEqual($H(CPSSkins.Handlers).inspect(),
+    testAddActions: function() { with(this) {
+      assertEqual($H(CPSSkins._handlers).inspect(),
                   $H({}).inspect())
-      CPSSkins.registerHandlers({'handler': handler});
-      assertEqual($H(CPSSkins.Handlers).inspect(),
+      CPSSkins.addActions({'handler': handler});
+      assertEqual($H(CPSSkins._handlers).inspect(),
                   $H({'handler': handler}).inspect())
     }},
 

Modified: 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/treeview/cpsskins_treeview.pt
==============================================================================
--- 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/treeview/cpsskins_treeview.pt
        (original)
+++ 
cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/treeview/cpsskins_treeview.pt
        Sat Feb 25 22:09:31 2006
@@ -50,7 +50,7 @@
       model.setData(data);
     }
 
-    CPSSkins.registerHandlers(
+    CPSSkins.addActions(
       {'open-node': openNode,
        'close-node': closeNode
       }
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to