Author: jmorliaguet
Date: Tue Apr 18 19:45:54 2006
New Revision: 2879

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:45:54 2006
@@ -603,12 +603,10 @@
 
   register: function(view) {
     Event.observe(view.widget, "click", this.clickEvent);
-    Event.observe(view.widget, "submit", this.submitEvent);
   },
 
   unregister: function(view) {
     Event.stopObserving(view.widget, "click", this.clickEvent);
-    Event.stopObserving(view.widget, "submit", this.submitEvent);
   },
 
   submitEvent: function(e) {
@@ -622,7 +620,7 @@
       views.entries().each(function(v) {
         var view = CPSSkins.getViewById(v);
         if (target.childOf(view.widget)) {
-          _request(views, view, method);
+          _request(views, view, method, params);
         }
       });
       Event.stop(e);
@@ -635,12 +633,27 @@
       target = Event.findElement(e, 'a');
     }
     if (target && target != document) {
+
+      var href = target.href;
+      var method = href;
+
+      if (href.match(/^javascript:/)) {
+        eval(href);
+      } else {
+        var parts = href.split('?');
+
+        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);
+          _request(views, view, method, params);
         }
       });
       Event.stop(e);
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to