Author: jmorliaguet Date: Sun Apr 2 14:04:38 2006 New Revision: 2759 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Log:
- simplification 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 Sun Apr 2 14:04:38 2006 @@ -1795,20 +1795,19 @@ attachControllers: function() { var view = this; - var controllers_id = view.getControllers(); - controllers_id.each(function(c) { - var controller = CPSSkins.getControllerById(c); - if (controller) { view.attach(controller); } + var view_id = view.hash(); + var controllers_ids = view.getControllers(); + controllers_ids.each(function(c) { + var controller = CPSSkins.getControllerById(c); + if (controller) { + controller.views.add(view_id); + controller.unregister(view); + controller.register(view); + controller.update(view); + } }); }, - attach: function(controller) { - controller.views.add(this.hash()); - controller.unregister(this); - controller.register(this); - controller.update(this); - }, - observe: function(model) { model.addObserver(this); this.model = model; -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins