Commit Graph

96 Commits

Author SHA1 Message Date
Jeremy Ashkenas
3d8fe92f1e Issue #78. Changes the Backbone.sync API to enable passing through of options ... like {data} in fetch() 2010-12-13 10:15:09 -05:00
Sam Stephenson
34d1d0ac93 Multiple views may listen for events on the same element 2010-12-11 23:16:53 -06:00
Jeremy Ashkenas
53ae5b5cdf Issue #132 ... initial _changed after new with attributes. 2010-12-10 11:58:41 -05:00
Jeremy Ashkenas
e8be47f28b merge mkelley's urlBase, renamed to urlRoot. 2010-12-10 10:32:52 -05:00
Jeremy Ashkenas
03aa12a683 Merge branch 'master' of https://github.com/mkelly12/backbone 2010-12-10 10:31:50 -05:00
Jeremy Ashkenas
17602c3927 Make Backbone View's delegateEvents only ever unbind the events that it adds itself. 2010-12-10 09:58:32 -05:00
Jeremy Ashkenas
6ea500b0dd Fixing un-released models from refresh'd collections. Issue #128 2010-12-08 16:38:33 -05:00
Jeremy Ashkenas
0c1bbbcc97 Adding Model#has to Backbone... 2010-12-08 12:23:17 -05:00
Matt Todd
21a3675db9 Implement model.is() for attr test, with docs, tests 2010-12-07 02:45:34 -05:00
Jeremy Ashkenas
bbcf19684c A silent change to a model will now make hasChanged() return true ... Issue #105 2010-12-03 09:54:27 -05:00
Matt
524901083e Add urlBase option to model to allow specifying restful url without using a collection 2010-12-02 14:23:13 -08:00
Jeremy Ashkenas
b085fa0099 Events#trigger ... making it safe to unbind your own event within a trigger() call. 2010-12-02 09:59:26 -05:00
Jeremy Ashkenas
d4dc736a82 adding a bit more of a test for changedattributes. 2010-12-02 09:47:12 -05:00
Jeremy Ashkenas
6a0ac93086 Fixing Issue #109 -- ignore 'add' and 'remove' events that originate from models shared with other collections. 2010-12-02 09:31:55 -05:00
Jeremy Ashkenas
c7a7aa5b10 Updating test-zepto.html to latest Underscore 2010-12-01 12:58:59 -05:00
Jeremy Ashkenas
0057523e1b Merge branch 'zepto' of https://github.com/sstephenson/backbone 2010-12-01 12:55:21 -05:00
Jeremy Ashkenas
418b77ffff Upgrading test suite to latest Underscore. 2010-12-01 12:55:05 -05:00
Sam Stephenson
de44d9ec34 Update to Zepto 0.2 2010-12-01 11:02:08 -06:00
Sam Stephenson
e0cb5ee3b6 Zepto support 2010-11-30 16:53:21 -06:00
Jeremy Ashkenas
6e4046df02 All Backbone events now pass through their options as the ffinal argument. 2010-11-30 16:04:55 -05:00
Jeremy Ashkenas
fa9a4c879d Passing through the options argument to 'change' events. 2010-11-30 15:35:43 -05:00
Jeremy Ashkenas
7ae0384120 first draft of Model#escape 2010-11-29 12:58:47 -05:00
Matt
57194beffa Fix recursion error when saving from within a change event. 2010-11-22 20:49:33 -08:00
Jeremy Ashkenas
f3e961da08 Issue #80. Adding default attributes to Backbone.Model 2010-11-22 14:22:21 -05:00
Jeremy Ashkenas
f63c99511e Merge branch 'master' of github.com:documentcloud/backbone 2010-11-18 09:43:01 -05:00
Jeremy Ashkenas
327ba8c54d Fixing id=0 2010-11-18 09:42:54 -05:00
Samuel Clay
52c460bc12 Allowing collections to remove models by either Cid or Id (prefering cid). 2010-11-17 14:50:39 -05:00
Jeremy Ashkenas
11dcf246c7 Using a save join() for the default implementation of Model#url 2010-11-16 17:36:53 -05:00
Jeremy Ashkenas
151417e7bc separating out emulateHTTP from emulateJSON, with tests. 2010-11-08 15:42:09 -05:00
Jeremy Ashkenas
be37cf0178 passing silent: true now suppresses validations. Issue #52 2010-11-08 15:21:54 -05:00
Jeremy Ashkenas
6de4a8cc37 all tests pass in IE7 2010-11-08 14:56:21 -05:00
Jeremy Ashkenas
4aafb6b27d Adding tests for Backbone.Controller 2010-11-08 14:52:30 -05:00
Jeremy Ashkenas
9a74dbc9c3 Make protoProps optional, when inheriting. 2010-11-06 09:48:56 -04:00
Jeremy Ashkenas
65c52763d3 fixing more model.collection in initialize. 2010-11-04 23:52:21 -04:00
Jeremy Ashkenas
ece51d2383 Allowing a collection to be passed into a model via the options. 2010-11-04 23:45:48 -04:00
Raimonds Simanovskis
771b87f17c added options argument to Backbone.Model initialize function 2010-11-03 18:28:40 +02:00
Jeremy Ashkenas
d651d82e92 don't send any data up, if you're not sending any data up ... fixes destroy. 2010-11-02 13:48:10 -04:00
Jeremy Ashkenas
2d4ebd0271 Merging Issue #46. Use full JSON requests, falling back to encoded forms with emulateHttp. 2010-11-01 13:54:07 -04:00
Jeremy Ashkenas
77b15e5916 Merge branch 'master' of http://github.com/mrjjwright/backbone 2010-11-01 13:25:37 -04:00
Jeremy Ashkenas
b4d573c943 Merging in Chris Lloyd's Model#clear. Making validations run, if defined, on Model#clear and Model#unset 2010-11-01 11:43:05 -04:00
Jeremy Ashkenas
f0ecfcd279 Issue #44 -- Model#set, empty string vs null. 2010-11-01 10:26:44 -04:00
John Wright
6c972695db Default behavior for Backbone.sync is now to send everything as application/json. Emulating http and sending data as form url-encoded can be turned on with Backbone.emulateHttp 2010-10-29 10:47:59 -06:00
John Wright
302c0d5cee Added Backbone.emulateJSON to enable the current behavior of syncing and made sending the body as application/json without a wrapping model param, the default 2010-10-28 20:21:59 -06:00
Jeremy Ashkenas
1d57168c8f Adding one line to Backbone.js to provide seamless CoffeeScript integration (inheritance from Backbone.Model, View, Collection) + tests 2010-10-27 09:17:38 -04:00
Jeremy Ashkenas
cc744682dd Reworking the localStorage plugin. 2010-10-26 10:12:49 -04:00
Jeremy Ashkenas
6efd643e14 simplifying localStorage interface a bit. 2010-10-25 16:40:09 -04:00
Jeremy Ashkenas
3a47769a7e Nice improvements to the rendering ... more templates, less javascript. 2010-10-25 15:33:33 -04:00
Jeremy Ashkenas
092131db0a A little further on. 2010-10-25 14:58:22 -04:00
Jeremy Ashkenas
6e7894d8fa Streamlined event delegation from models through collections. Added documentation for 0.2.0 enhancements. 2010-10-25 11:23:04 -04:00
Jeremy Ashkenas
a7195a975d Issue #28 -- handleEvents -> delegateEvents, which is now called in the constructor. 2010-10-25 10:51:23 -04:00