Author: jmorliaguet
Date: Tue Apr 18 19:30:45 2006
New Revision: 2877

Modified:
   cpsskins/branches/jmo-perspectives/lib/cpsskins/src/cpsskins.js
Log:

- fix



Modified: cpsskins/branches/jmo-perspectives/lib/cpsskins/src/cpsskins.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/lib/cpsskins/src/cpsskins.js     
(original)
+++ cpsskins/branches/jmo-perspectives/lib/cpsskins/src/cpsskins.js     Tue Apr 
18 19:30:45 2006
@@ -616,7 +616,15 @@
     if (target && target != document) {
       var method = target.getAttribute('action');
       var params = Form.serialize(target);
-      this._call(target, method, params);
+      if (!method) return;
+      var _request = this._request;
+      var views = this.views;
+      views.entries().each(function(v) {
+        var view = CPSSkins.getViewById(v);
+        if (target.childOf(view.widget)) {
+          _request(views, view, method);
+        }
+      });
       Event.stop(e);
     }
   },
@@ -627,34 +635,18 @@
       target = Event.findElement(e, 'a');
     }
     if (target && target != document) {
-      var href = target.href;
-      if (href.match(/^javascript:/)) {
-        eval(href);
-      } else {
-        var parts = href.split('?');
-        var method = href;
-        if (parts.length == 2) {
-          method = parts[0];
-          params = parts[1];
+      var _request = this._request;
+      var views = this.views;
+      views.entries().each(function(v) {
+        var view = CPSSkins.getViewById(v);
+        if (target.childOf(view.widget)) {
+          _request(views, view, target.href);
         }
-        this._call(target, method, params);
-      }
+      });
       Event.stop(e);
     }
   },
 
-  _call: function(target, url, params) {
-    if (!url) return;
-    var _request = this._request;
-    var views = this.views;
-    views.entries().each(function(v) {
-      var view = CPSSkins.getViewById(v);
-      if (target.childOf(view.widget)) {
-        _request(views, view, url, params);
-      }
-    });
-  },
-
   _request: function(views, view, url, params) {
     var options = {
       onComplete: function(req) {
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to