Author: jmorliaguet
Date: Mon Feb 13 15:22:24 2006
New Revision: 2376

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

- move CPSSkins.notify('stored', storage) to storage.write(data)



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 Mon Feb 13 
15:22:24 2006
@@ -876,7 +876,9 @@
         filtered_data[field] = value;
       }
     });
+    // TODO compare old and new data
     this.model.def.data = filtered_data;
+    CPSSkins.notify('stored', {"target": this});
   },
 
   merge: function(data) {
@@ -920,7 +922,6 @@
   storeData: function(data) {
     /* Store the data directly */
     this.write(data);
-    CPSSkins.notify('stored', {"target": this});
   }
 
 });
@@ -940,7 +941,6 @@
       var value = unescape(results[1]);
       data = JSON.parse(value);
       this.write(data);
-      CPSSkins.notify('stored', {"target": this});
     } else {
       return;
     }
@@ -950,8 +950,6 @@
     this.write(data);
     value = escape(JSON.stringify(data));
     document.cookie = this.cookie_name + '=' + value + '; path=/';
-
-    CPSSkins.notify('stored', {"target": this});
   }
 
 });
@@ -970,7 +968,6 @@
       onComplete: function(req) {
         var data = JSON.parse(req.responseText);
         storage.write(data);
-        CPSSkins.notify('stored', {"target": storage});
       }
     }
     var parts = url.split('?');
@@ -995,7 +992,6 @@
       onComplete: function(req) {
         var data = JSON.parse(req.responseText);
         storage.write(data);
-        CPSSkins.notify('stored', {"target": storage});
       }
     });
   }
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to