Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. var bsync = Backbone.sync;
  2. Backbone.sync = function(method, model, success, error) {
  3. console.log('Syncing: '+method);
  4.  
  5. if(method === 'update') {
  6. var changed = model.changedAttributes();
  7. console.log(changed);
  8.  
  9. var sync_model = new Criteria(changed);
  10.  
  11. bsync(method, sync_model, success, error);
  12. } else {
  13. bsync(method, model, success, error);
  14. }
  15. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement