[Pkg-javascript-commits] [backbone] 02/09: send 'add' and 'remove' events through the model.
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 16:59:18 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.3.1
in repository backbone.
commit d190e9e71e22d21b0eeff8a6afb64f988c1d9deb
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date: Thu Nov 11 09:54:14 2010 -0500
send 'add' and 'remove' events through the model.
---
backbone.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/backbone.js b/backbone.js
index fa7836a..e0db984 100644
--- a/backbone.js
+++ b/backbone.js
@@ -520,7 +520,7 @@
this.models.splice(index, 0, model);
model.bind('all', this._boundOnModelEvent);
this.length++;
- if (!options.silent) this.trigger('add', model);
+ if (!options.silent) model.trigger('add', model, this);
return model;
},
@@ -534,9 +534,9 @@
delete this._byCid[model.cid];
delete model.collection;
this.models.splice(this.indexOf(model), 1);
- model.unbind('all', this._boundOnModelEvent);
this.length--;
- if (!options.silent) this.trigger('remove', model);
+ if (!options.silent) model.trigger('remove', model, this);
+ model.unbind('all', this._boundOnModelEvent);
return model;
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git
More information about the Pkg-javascript-commits
mailing list