Commit Graph

581 Commits

Author SHA1 Message Date
lennym
ba249903e6 Copied Backbone.ajax from global DOM lib at runtime to allow calls to Backbone.setDomLibrary to take effect and improve compatibility with test frameworks that mock $.ajax 2012-05-15 17:40:19 +02:00
Brad Dunbar
192b1c0673 Events.off uses reverse iteration to avoid altering indicies.
See comments on 83a24bb2d5.
2012-05-14 11:57:57 -04:00
Brad Dunbar
83a24bb2d5 Fix #1310 - off does not skip consecutive events. 2012-05-14 07:53:01 -04:00
Jeremy Ashkenas
7d8c51a3c3 Merge pull request #1293 from wookiehangover/issue1292
Fix #1292 - unexpected results when passing undefined to Model.hasChanged
2012-05-10 14:55:01 -07:00
Brad Dunbar
0ea9f47b35 Refactor _prepareModel. 2012-05-08 06:54:14 -04:00
Sam Breed
638af0f68e updating model.previous arguments check to match hasChanged 2012-05-07 20:29:24 -06:00
Sam Breed
c3aed6f713 simplifying hasChanged if statement 2012-05-07 19:58:52 -06:00
Sam Breed
cacd01d530 Fix #1292 - unexpected results when passing undefined to Model.hasChanged()
* additional check in hashChanged for when `attr` is present but undefined
* adds tests for expected results when passing undefined
2012-05-07 19:45:03 -06:00
Jeremy Ashkenas
36dfdab567 Merge pull request #1285 from braddunbar/ajax
Avoid throwing when $ is not defined.
2012-05-05 15:33:55 -07:00
Brad Dunbar
22606f9b25 Tweak events implementation. 2012-05-05 18:11:38 -04:00
Brad Dunbar
4dcf4bde7e Avoid throwing when $ is not defined. 2012-05-05 15:26:42 -04:00
lifesinger
15a61c08ee refactor events using array instead of linked-list to improve performance 2012-05-05 17:30:25 +08:00
Brad Dunbar
c4297e5e2e Fix #1282 - "all" callback list is retrieved for each event. 2012-05-04 13:28:17 -04:00
Brad Dunbar
46d43ae5bf null and undefined are invalid ids. 2012-05-02 17:34:59 -04:00
Genadi Samokovarov
c4f55849b4 Whitespace cleanup for extend Collection.prototype.chain function definitions. 2012-05-01 19:54:33 +03:00
Brennan Moore
f878b7cfc2 supporting url params in browsers without pushState support when pushState is enabled 2012-04-28 15:25:37 -04:00
Jeremy Ashkenas
8aee79ae41 Fixes #1223 -- new attributes left behind after a failed wait:true 2012-04-23 17:56:23 -04:00
Jeremy Ashkenas
b42cc64878 tweaking duplicate model merge:true 2012-04-23 17:09:57 -04:00
Jeremy Ashkenas
9ee0358cd6 Merge pull request #1220 from folded/master
Optionally merging updated model state on collection add.
2012-04-23 13:58:03 -07:00
Phil Freo
7eca8c78b6 Giving Collections a clone() method. 2012-04-19 11:17:41 -07:00
Brad Dunbar
5fc8005c83 Fix #1228 - tagName can be provided as a function. 2012-04-17 10:17:37 -04:00
Tobias Sargeant
7dbab65bce Support merging of updated object state on collection add. 2012-04-13 10:15:34 -04:00
Brad Dunbar
87c9b17aa7 Fix #474 - Backbone.ajax 2012-04-11 08:33:20 -04:00
Jeremy Ashkenas
67c3ea86c1 simple refactor for #1206 2012-04-10 10:27:22 -04:00
Andrew Terris
35f11ba5c5 remove unneeded line and return on window.location.assign 2012-04-09 23:20:05 -05:00
Andrew Terris
b9021b64be normalize fragment when hashChange: false in navigate 2012-04-09 21:14:02 -05:00
Jeremy Ashkenas
db4f66ba52 Fixes #1151 2012-04-09 16:16:34 -04:00
Jeremy Ashkenas
fb49233436 Merge pull request #1185 from aterris/fragment
Use window.location.pathname as the fragment when _wantsHashChange == false
2012-04-06 07:39:24 -07:00
Mitchell Cowie
74dec4d956 Bypass iframe for old IE when hash change disabled 2012-04-05 23:03:14 -06:00
Andrew Terris
7596947b06 use pathname as fragment when hashChange: false 2012-04-04 21:44:18 -05:00
Jeremy Ashkenas
091b3e5a80 Merge pull request #1181 from braddunbar/isvalid
Fix #1179 - isValid returns true in the absence of validate.
2012-04-04 07:08:33 -07:00
Brad Dunbar
af30bcf3ca off is chainable when there are no events. 2012-04-04 05:52:54 -07:00
Brad Dunbar
137b7fd670 Fix #1179 - isValid returns true in the absence of validate. 2012-04-04 05:28:40 -07:00
Jeremy Ashkenas
da97490f0b Optimizing #1172 2012-04-02 10:13:50 -04:00
Nicklas Ansman Giertz
2a1d06353f Make sure the attribute object is clone before extending it 2012-04-02 12:38:27 +02:00
Brad Dunbar
5d04588ae7 toJSON is called implicitly. 2012-03-29 07:52:16 -04:00
Raúl Naveiras
db4b617697 add ignores comparator when at option is passed 2012-03-26 16:30:26 +02:00
Jeremy Ashkenas
4d0051de76 Merge branch 'master' of github.com:documentcloud/backbone 2012-03-22 12:03:28 -04:00
Jeremy Ashkenas
af721fbc83 adding a missing typoed comment. 2012-03-22 12:03:18 -04:00
Ben Orenstein
c7034b9735 Let make take other falsy values for content. 2012-03-21 17:21:16 -04:00
Ben Orenstein
69d2c50640 Allow make to take an argument of 0. 2012-03-21 17:07:32 -04:00
Jeremy Ashkenas
863814e519 Backbone.js 0.9.2 2012-03-21 14:55:29 -04:00
Jeremy Ashkenas
56e10451d4 more comments, more spacing, more better 2012-03-21 12:21:16 -04:00
Jeremy Ashkenas
4f8d790cda more comments, more better 2012-03-21 12:07:42 -04:00
Jeremy Ashkenas
42ad7a677e fixes #1092 -- use model.get( internally instead of raw access, for easier extension / overriding. 2012-03-21 11:23:02 -04:00
Jeremy Ashkenas
f4a1ebc374 fixes #1030 -- save with wait:true with a synchronous Backbone.sync 2012-03-21 11:18:30 -04:00
Jeremy Ashkenas
e9e1abfe61 model.destroy() returns false if the model.isNew() 2012-03-21 10:40:54 -04:00
Jeremy Ashkenas
7b6dbc8dcd Merge pull request #1021 from ahamid/reset_passes_options
small patch to allow passing options through reset to model initializer
2012-03-19 14:00:58 -07:00
Jeremy Ashkenas
de599c169d Fixes #991. Add Collection#where for simple filters 2012-03-19 16:34:53 -04:00
Jeremy Ashkenas
5f41b88764 Merge pull request #1110 from braddunbar/off
Fix #1105 - Add convenience overloads for `off`.
2012-03-19 09:27:17 -07:00