Adding a comment and renaming on_bulk_change to on_change

pull/37/head
Sylvain Corlay 12 years ago
parent e77b21cb22
commit 75cb63fba2

@ -266,7 +266,12 @@ define(["widgets/js/manager",
}
},
on_bulk_change: function(keys, callback, context) {
on_change: function(keys, callback, context) {
// on_change(["key1", "key2"], foo, context) differs from
// on("change:key1 change:key2", foo, context).
// If the widget attributes key1 and key2 are both modified,
// the second form will result in foo being called twice
// while the first will call foo only once.
this.on('change', function() {
if (keys.some(this.hasChanged, this)) {
callback.apply(context);

Loading…
Cancel
Save