Commit Graph

1701 Commits

Author SHA1 Message Date
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
Casey Foster
5a3ec24cc9 Really fix #1977 - models with default values merge properly 2012-12-19 09:09:22 -08: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
dd746a83e0 better to link to the method than try to re-describe it 2012-12-19 10:58:35 -05:00
Jeremy Ashkenas
9ad93cbb4f Merge pull request #1975 from philfreo/master
Correcting upgrade guide for collection.fetch({add: true})
2012-12-19 07:55:49 -08:00
Phil Freo
134d4a62ab Correcting upgrade guide for collection.fetch({add: true}) 2012-12-19 00:01:28 -05:00
Jeremy Ashkenas
5a4d405f64 Tweaked wrapError changelog mention. 2012-12-18 17:10:21 -05:00
Jeremy Ashkenas
b646ceaf31 Merge pull request #1971 from wookiehangover/issue1966
added a note about Backbone.wrapError to the 0.9.9 changelog
2012-12-18 14:08:15 -08: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
Jeremy Ashkenas
1a31cc9c4b Merge pull request #1965 from tgriesser/final-change
fixing #1964 - change event should be fired if a change occurs
2012-12-18 12:55:57 -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
4c5e2375bd Bitwise declared bitdumb, revisions ensued 2012-12-18 12:51:49 -08:00
Sam Breed
6946d5ff61 added a note about the removal of Backbone.wrapError to the 0.9.9 changelog. closes #1966 2012-12-18 12:42:09 -07:00
Jeremy Ashkenas
3dbf6dbf39 Merge pull request #1969 from caseywebdev/master
Fix typo in .npmignore
2012-12-18 08:31:56 -08:00
Casey Foster
396f0723ec Fix typo in .npmignore 2012-12-18 08:26:01 -08: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
Jeremy Ashkenas
6f0e4cc8ae Merge pull request #1955 from johtso/get-by-idattr
Improve getting of models with non-default ids
2012-12-17 13:42:57 -08:00
Jeremy Ashkenas
132f123212 Merge pull request #1957 from tgriesser/validateDocs
Fixing docs on validate
2012-12-17 11:27:52 -08:00
Tim Griesser
0745d23fd0 fixing docs on validate 2012-12-17 14:25:45 -05: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
Jeremy Ashkenas
1cc5ede86d Merge pull request #1956 from wyuenho/master
Fix #1925, Document for {sort:false}
2012-12-17 11:21:14 -08:00
Jimmy Yuen Ho Wong
75a52dbc32 Fix #1925 document for {sort:false} 2012-12-18 03:08:53 +08:00
Johannes
9ae12715e2 Make use of new .get() functionality in .update() 2012-12-17 17:48:56 +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
Jeremy Ashkenas
c13005a84a Merge pull request #1947 from cdavaz/master
default constructor should return parent value
2012-12-17 08:27:39 -08:00
Jeremy Ashkenas
25505d6700 Merge pull request #1951 from caseywebdev/parse
Fix #1939 - `parse` receives `options`
2012-12-17 08:03:15 -08:00
Derick Bailey
64aa208b5a fixed typo on context var in stopListening 2012-12-17 09:01:32 -06:00
Derick Bailey
90099afc31 accounting for event maps 2012-12-17 09:00:42 -06:00
Derick Bailey
d6dd3d8647 updated docs to add context param in listenTo and stopListening 2012-12-17 08:17:03 -06:00
Derick Bailey
015e60dbb7 allow context as 4th parameter of stopListening 2012-12-17 08:15:28 -06:00
Derick Bailey
74c674d682 allow context as 4th parameter to Events#listenTo method 2012-12-17 08:08:27 -06:00
Casey Foster
5f7240844c Fix #1939 - parse receives options 2012-12-16 13:03:05 -08:00
Chris Davaz
3666613020 default constructor should return parent value
I came across this issue with a class that caches instances when
they are firste created. Subsequent calls to the constructor will
return the cached instance if available. This relies on a feature
of JavaScript described here:

http://bclary.com/2004/11/07/#a-13.2.2

Note Step 7 in the reference document. By not returning the value
from the default constructor, subclasses of Backbone classes that
rely on this feature will break.
2012-12-14 16:07:27 -08:00
Jeremy Ashkenas
523fb81779 Merge pull request #1940 from gsamokovarov/document-id-classname
Document View#id and View#className as functions
2012-12-14 13:38:24 -08:00
Jeremy Ashkenas
ff5876add2 Merge pull request #1941 from gsamokovarov/update-bullet-typo
Fix typo in update changelog bullet
2012-12-14 13:37:54 -08:00
Jeremy Ashkenas
c1a9384e9c Merge pull request #1944 from tgriesser/isEqualChange
Fix #1943 - use _.isEqual to check model change
2012-12-14 13:23:57 -08:00
Jeremy Ashkenas
8a4af7212e tweaking catalog of events 2012-12-14 16:01:23 -05:00
Jeremy Ashkenas
31655fc6b2 Merge pull request #1945 from akre54/docs-route-event
Document `route` event of Backbone.history
2012-12-14 12:58:36 -08:00