Author: jmorliaguet
Date: Sun Mar 26 14:45:27 2006
New Revision: 2731

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

- optimisations



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 Mar 26 
14:45:27 2006
@@ -932,14 +932,17 @@
       zoomback = false;
     }
 
-    var action_id = this.def.dropping.action;
-    if (action_id) {
-      var action_handler = CPSSkins.getAction(action_id);
-      if (action_handler) action_handler({
-        'source': this.dragged,
-        'target': this.droptarget || this.target,
-        'context': this
-      });
+    var dropping = this.def.dropping;
+    if (dropping) {
+      var action_id = dropping.action;
+      if (action_id) {
+        var action_handler = CPSSkins.getAction(action_id);
+        if (action_handler) action_handler({
+          'source': this.dragged,
+          'target': this.droptarget || this.target,
+          'context': this
+        });
+      }
     }
 
     if (this.def.dragging.feedback) {
@@ -2049,7 +2052,11 @@
       var model = this.model;
       var view = this;
       var options = {
-        onComplete: function() {
+        onComplete: function(req) {
+          var text = req.responseText;
+          if (widget.innerHTML != text) {
+            widget.innerHTML = text;
+          }
           CPSSkins._parse(widget);
           view.attachControllers();
         }
@@ -2061,7 +2068,7 @@
         method = parts[0];
         options.parameters = parts[1];
       }
-      new Ajax.Updater(widget, method, options);
+      new Ajax.Request(method, options);
     }
   },
 
@@ -2072,7 +2079,6 @@
     if (this.script_id) {
       CPSSKins.Canvas.removeScript(this.script_id);
     }
-    this.widget.innerHTML = '';
   }
 
 });
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to