Author: jmorliaguet Date: Fri Mar 17 11:29:01 2006 New Revision: 2651 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Log:
- simplifications: controllers are attached to views when the views are displayed. 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 11:29:01 2006 @@ -341,24 +341,6 @@ ); } - /* register the controllers */ - var controllers_id = def.controllers || []; - controllers_id.each(function(c) { - CPSSkins.registerEventHandler("registered controller", view, - function(event) { - var controller = event.publisher; - var view = event.subscriber; - controller.views.add(id); - controller.register(view); - CPSSkins.unsubscribe("registered controller", - {'scope': controller.hash()} - ); - }); - CPSSkins.subscribe("registered controller", - {'subscriber': view, 'scope': c} - ); - }); - /* insert the widget into the DOM */ var replace = def.widget.replace; if (replace) { @@ -1662,6 +1644,7 @@ }, attach: function(controller) { + controller.views.add(this.hash()); controller.unregister(this); controller.register(this); }, -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins