Commit Graph

544 Commits

Author SHA1 Message Date
Tim Griesser
16bcd429c8 bumping jquery to 1.7+ 2012-12-22 15:39:28 -05:00
Jeremy Ashkenas
2abe2850e5 Merge pull request #2004 from elasticsales/master
Adding test for change event only firing if setting an object with a different value
2012-12-21 12:39:18 -08:00
Brad Dunbar
6d589bad78 Fix #2003 - success callback arguments. 2012-12-21 14:06:45 -05:00
Phil Freo
e2bcc8c6ea Adding test for change event only firing if setting an object with a different value 2012-12-21 13:54:10 -05:00
Jeremy Ashkenas
1357ecd413 tricky merge with master ... 2012-12-21 12:25:45 -05:00
Casey Foster
1c131daef6 Clear up comments in last test 2012-12-21 08:19:38 -08:00
Casey Foster
09bd7fe8a8 Fix test case 2012-12-21 08:18:15 -08:00
Jeremy Ashkenas
812a8465de failing test case 2012-12-21 11:13:09 -05:00
Casey Foster
d0af33646c Even smarter sort-reduction 2012-12-21 08:07:55 -08:00
Jeremy Ashkenas
0e20e93b81 fixed leaking global 2012-12-21 10:58:46 -05:00
Tim Griesser
b3c06874ae Merge pull request #2001 from braddunbar/simple
Ensure toJSON receives the correct attributes.
2012-12-21 07:53:33 -08:00
Jeremy Ashkenas
2eab0fe3b8 hasChanged shouldn't be true after the constructor. 2012-12-21 10:51:02 -05:00
Jeremy Ashkenas
3ffcce8cb8 trying new hasChanged() semantics 2012-12-21 10:46:02 -05:00
Jeremy Ashkenas
e5c30a396a merged with simple 2012-12-21 10:24:19 -05:00
Jeremy Ashkenas
34f852803a revisited tests with simple silent 2012-12-21 10:23:16 -05:00
Casey Foster
e658535bd0 Add test for smart add-sorting 2012-12-21 06:46:23 -08:00
Brad Dunbar
1c4a1e3bc5 Fix #1980 - Named and optional params. 2012-12-21 09:39:54 -05:00
Brad Dunbar
5350dc9dea Ensure toJSON receives the correct attributes. 2012-12-21 08:53:12 -05:00
Tim Griesser
4089bf0e42 sync tests passing, tweaking save validation rules 2012-12-20 23:28:49 -05:00
Casey Foster
e7df5886c2 Bring add/sort optimization over to simple 2012-12-20 15:08:46 -08:00
Casey Foster
810c535dc0 Only sort when a model is changed or added 2012-12-20 13:24:10 -08:00
Jeremy Ashkenas
d7179e553d Pour one out on the ground for JSLitmus... 2012-12-20 16:06:17 -05:00
Jeremy Ashkenas
c0f3f424bb remove lingering silents 2012-12-20 15:39:32 -05:00
Jeremy Ashkenas
9c55b4b349 finished with the simple case for models ... hurrah 2012-12-20 15:30:29 -05:00
Jeremy Ashkenas
14bfb400fc ... progress ... 2012-12-20 14:53:33 -05:00
Brad Dunbar
7f29c8c032 Remove accidental global. 2012-12-20 11:54:26 -05:00
Brad Dunbar
9e542c0224 Add test for once without callback. 2012-12-20 11:02:59 -05:00
Genadi Samokovarov
ca88fcda5c Add test for #1989 2012-12-20 15:20:23 +02:00
Jeremy Ashkenas
f29c912dc7 right up to the edge ... nested sets are the next challenge 2012-12-19 18:15:51 -05:00
Jeremy Ashkenas
8178bf1d6b ... progress ... 2012-12-19 18:12:20 -05:00
Jeremy Ashkenas
7fce8d799b removing a bit of 'silent' 2012-12-19 17:56:33 -05:00
Jeremy Ashkenas
cc8a5c2d9c ... progress ... 2012-12-19 17:51:33 -05:00
Jeremy Ashkenas
e92c52619f progress 2012-12-19 17:35:28 -05:00
Jeremy Ashkenas
9c5d02ef15 first draft of 'simple' 2012-12-19 17:25:52 -05:00
Jeremy Ashkenas
d55ab70bab Merge branch 'master' of github.com:documentcloud/backbone 2012-12-19 11:43:58 -05:00
Jeremy Ashkenas
1ec82512aa #1938 continued. Removing the options.error callback for client-side validation, adding model.validationError for convenient reference. 2012-12-19 11:43:56 -05:00
Casey Foster
5f9380e6fb #1977 update test to fail 2012-12-19 08:41:55 -08:00
Jeremy Ashkenas
b76ca8338b Fixes #1938 -- Splits up 'error' into two events: 'error' (for XHR) and 'invalid' (for client side validation) errors. 2012-12-19 11:17:35 -05:00
Jeremy Ashkenas
dd4b08154b Fixes #1977 -- add a test to ensure that default values work with merge (they do). 2012-12-19 11:06:13 -05:00
Jeremy Ashkenas
485be3f684 merging big validate semantics change. Hopefully for the very last time. 2012-12-18 17:05:42 -05:00
Tim Griesser
76b512b383 adding validate flag for validation of models, defaulting to true on save 2012-12-18 16:13:53 -05:00
Jeremy Ashkenas
1b9335d2c3 Merge pull request #1962 from caseywebdev/sort
Trigger `sort` after `add`s for efficient reordering
2012-12-18 13:01:26 -08:00
Casey Foster
462969bc86 ok(true) 2012-12-18 13:00:05 -08:00
Tim Griesser
86a9c538e5 fixing #1964 - change event should be fired if a change occurs 2012-12-18 15:52:25 -05:00
Casey Foster
af7effe1f1 Trigger sort after adds for efficient reordering 2012-12-17 15:11:54 -08:00
Jeremy Ashkenas
7237ff9be2 Merge branch 'master' of github.com:documentcloud/backbone 2012-12-17 17:15:58 -05:00
Jeremy Ashkenas
828f121c6e Simplify internal id/cid split. Add back in update-with-nonstandard-id test. 2012-12-17 17:15:56 -05:00
Jeremy Ashkenas
b6566ef2d9 Merge pull request #1954 from derickbailey/listenTo_stopListening_context
add context as 4th parameter to listenTo and stopListening methods on Backbone.Events
2012-12-17 14:01:10 -08:00
Johannes
17fba9e8bd Fix getting model from collection by model
Previously wouldn't work if using non-default id. Thanks to @caseywebdev for pointing this out.
2012-12-17 19:21:34 +00:00
Johannes
65ec60ed12 Improve getting of models with non-default ids
Just as you can get a model from a collection using default ids by passing .get() an object i.e. col.get({id: 1}), you can now do the same when using non-default ids i.e. col.get({_id: 1}) (If the collection prototype has the correct model set).
2012-12-17 17:05:14 +00:00