Commit Graph

550 Commits

Author SHA1 Message Date
Paul Uithol
ed5a88d445 Make it possible to take advantage of jQuery.Deferred with Backbone, without breaking compatibility by changing return values.
Implemented by adding a "promise" attribute to Backbone.Model and Backbone.Collection, set by Backbone.Model's "fetch", "save", "destroy" and Backbone.Collectin's "fetch" and "create".
2011-03-22 17:35:05 +01:00
Jeremy Ashkenas
da52ae1c43 Merge branch 'fix-comment' of https://github.com/jimmydo/backbone 2011-03-21 11:00:14 -04:00
Jeremy Ashkenas
c9a634982a Upgrade tests to Zepto 0.5 2011-03-21 10:32:56 -04:00
Jeremy Ashkenas
d149451fd4 Issue #278. Allow 'extend' to be overrideable+inheritable. 2011-03-21 10:28:22 -04:00
Jeremy Ashkenas
d97d8bf336 Upgrading Backbone.js tests to Underscore 1.1.5 2011-03-20 20:26:17 -04:00
Jimmy Do
7ceab2ca63 Fix incorrect prototype.constructor comment
prototype.constructor does not affect instanceof
2011-03-17 14:14:18 -07:00
Jeremy Ashkenas
e2a5c18308 Adding Mobile SoundCloud as an example. 2011-03-10 12:16:39 -05:00
Jason Davies
ee2ec9213e Fix typo 2011-03-09 18:37:48 +00:00
Jason Davies
83250a5a62 Only set request content type for create/update 2011-03-09 18:35:26 +00:00
Matt Smith
12e9d95b45 add helper method to cleanup isNew test 2011-03-03 17:40:26 -05:00
Matt Smith
4595b48ffb refine the isNew test 2011-03-03 17:35:09 -05:00
Matt Smith
8971361bdc split out test for positive and negative ids 2011-03-03 17:33:19 -05:00
Matt Smith
5ebd949c7f use hash literal directly
This will make it harder to forget to instantiate the model.
2011-03-03 17:20:38 -05:00
Matt Smith
13acb8a822 fix documentation and tests for negative ids
The documentation said that a model was considered new if it had a negative id.
The test had the right message, but failed to instantiate the model the for the second assertion, and the assertion was inverted.
2011-03-03 17:06:16 -05:00
Dmitry Baranovskiy
0cdc525961 Fixed escapeHTML function
to skip not only &***;, but also &#***; and &x***;
2011-03-02 08:12:24 +11:00
Jeremy Ashkenas
7216d99350 merged gh-pages in. 2011-02-28 10:06:56 -05:00
Jeremy Ashkenas
52953c14ef Adding mql's Substance.io 2011-02-28 10:00:32 -05:00
Raimonds Simanovskis
5a89ed3272 destroy of non-persisted model should not call sync 2011-02-15 15:17:20 +02:00
Jeremy Ashkenas
6c968b652a Issue #224 ... underlining links, updating docs. 2011-02-14 17:00:39 -05:00
Jeremy Ashkenas
f4a394b906 Issue #223 ... fixing json2.js link. 2011-02-14 16:51:05 -05:00
Jeremy Ashkenas
0ca0481af4 adding basecamp mobile, instagreat, and tilemill 2011-02-14 16:48:25 -05:00
Jeremy Ashkenas
02c40e5526 linking to the documentcloud workspace 2011-02-14 15:48:37 -05:00
Jeremy Ashkenas
ce059570c2 .get -> .escape in the docs 2011-02-14 15:43:07 -05:00
Jeremy Ashkenas
a5079aba1c merging #179 + refactor, view 'attributes' for this.el 2011-02-07 16:10:08 -05:00
Jeremy Ashkenas
512ff7e728 Merge branch 'master' of https://github.com/hippich/backbone 2011-02-07 16:02:14 -05:00
Jeremy Ashkenas
4489d7f5f1 Merging in a test for Issue #204 2011-02-07 15:02:20 -05:00
Johannes J. Schmidt
aab49ebded encodeURIComponent this.id
in Backbone.Model.prototype.url
2011-02-07 15:00:07 -05:00
Jeremy Ashkenas
c6d2c69d82 ditto 2011-02-07 14:49:56 -05:00
Jeremy Ashkenas
c5160fca23 fixing lingering idAttribute spot -- thanks, jdknezek 2011-02-07 14:37:07 -05:00
Jeremy Ashkenas
b86d3f6afc Issue #209 ... unsetting a missing attribute should not fire a change event. 2011-02-07 14:16:31 -05:00
Jeremy Ashkenas
1a9404cfe8 Initial support for models with non-default id attribute names (MongoDB, CouchDB). Various tickets. 2011-02-07 13:59:52 -05:00
Jeremy Ashkenas
d04bf67b21 Fixing test-zepto.html HTML. 2011-02-07 11:51:28 -05:00
Jeremy Ashkenas
164ad725c7 Upgrading Backbone.js (test) dependencies to latest jQuery, Zepto, and Underscore. 2011-02-07 11:50:22 -05:00
Jeremy Ashkenas
ac8c3dd9db Changing route order behavior. Issue #189. Declarative route maps are the same, procedural route() calls can now override previously-defined routes. 2011-02-07 11:10:56 -05:00
Jeremy Ashkenas
ec6842009c Merging in #167, unsetting 'id' 2011-02-07 10:34:42 -05:00
Jeremy Ashkenas
0383ef78c6 Merge branch 'unset_id' of https://github.com/reverie/backbone 2011-02-07 10:31:41 -05:00
Jeremy Ashkenas
7d4d527c8c No periods on errors. 2011-02-07 10:28:39 -05:00
Jeremy Ashkenas
f1e0f6b5c1 Throw an error if Backbone.history.start is called twice. 2011-02-07 10:28:13 -05:00
Jeremy Ashkenas
1944234c74 Merge branch 'master' of https://github.com/jed/backbone 2011-02-07 10:18:05 -05:00
Jeremy Ashkenas
51f9ce6b26 Adding an index.js for npm, Issue #207 2011-02-06 09:27:38 -05:00
Jeremy Ashkenas
4c41ea7c7d Merging issue #216 (+ others) validation on Collection#create. 2011-02-06 08:48:38 -05:00
Kris Jordan
7442f826f1 Forcing Collection.create to run through validation before saving. 2011-02-06 01:13:52 -05:00
Jed Schmidt
e398583d38 keep custom sync methods for a given model/collection scoped to this. 2011-02-03 20:25:12 -08:00
Jeremy Ashkenas
79b33ae78e Merge branch 'gh-pages' 2011-02-01 10:00:45 -05:00
Jeremy Ashkenas
3619844543 Adding CloudEdit as an example. 2011-02-01 10:00:29 -05:00
Jeremy Ashkenas
a2f0468595 merging in fixes for models in multiple collections ... 2011-01-22 11:46:07 -05:00
Joshua Peek
14000a8bb9 Improve multiple collection support
Preserve original model collection when adding/removing from another collection
Destroying a model removes it from all collections
2011-01-22 10:15:51 -06:00
Jeremy Ashkenas
65f68309bf merging in tzigla example. 2011-01-19 14:16:21 -05:00
Jeremy Ashkenas
d4a091b02f Adding Tzigla to the examples. 2011-01-19 14:13:35 -05:00
Jeremy Ashkenas
0c033312b3 Pushing the QuietWrite.com example. 2011-01-19 11:13:50 -05:00