674 Commits

Author SHA1 Message Date
Jeremy Ashkenas
0a4399e3de Backbone.js 1.1.0 2013-10-10 21:57:30 -03:00
Jeremy Ashkenas
ac83197b03 Firming up returning models from add and remove, plus tests. 2013-10-10 21:21:59 -03:00
Jeremy Ashkenas
d9ac39fa64 Fixes #2428 -- set now returns added or merged models, so does add, so does push, so does unshift. 2013-10-10 17:14:13 -03:00
Jeremy Ashkenas
9c47a78f1a Test for #2666. 2013-10-10 10:18:45 -03:00
Tim Griesser
f6fa0cb87e Merge pull request #2766 from braddunbar/navigate-hash
Fix #2765 - Strip hash and query for matching.
2013-09-23 06:34:44 -07:00
Casey Foster
30f84f58a5 Fix the set stack overflow case with the at option too 2013-09-19 15:57:53 -05:00
Casey Foster
98356bd85d Style tweaks 2013-09-19 15:53:54 -05:00
vlad
b0884cf5e3 fix stack overflow exception fired in Collection.set with large collection (with chrome/nodejs/v8) 2013-09-19 21:37:14 +03:00
Brad Dunbar
f0572b0e51 Fix #2765 - Strip hash and query for matching. 2013-09-19 09:54:57 -04:00
Adam Krebs
866b84d9a9 remove jQuery-specific selector 2013-09-16 11:01:58 -04:00
Adam Krebs
2bd5df99c5 remove $(document).ready(...) from tests 2013-09-16 10:51:32 -04:00
Tim Griesser
cfe4492863 adding test case for #2612 2013-09-11 20:30:28 -04:00
Tim Griesser
09e0cb3371 model#parse may no longer set the idAttribute 2013-09-11 20:08:37 -04:00
Jeremy Ashkenas
8810453495 Adding test from #2619 2013-09-11 17:51:10 -03:00
Jeremy Ashkenas
10b0825dbb Fixes #2623 -- make 'invalid' events pass consisent arguments. Error should go second, after the model in question. 2013-09-11 17:44:35 -03:00
Jeremy Ashkenas
22ab3ea78a Fixing borked listeners test. #2724 2013-09-11 15:33:37 -03:00
Jeremy Ashkenas
6e5683f606 Fixes #2629, by removing the no-longer-used sortedIndex 2013-09-11 14:49:23 -03:00
Jeremy Ashkenas
42370dd80f Test from #2724 for listener cleanup. 2013-09-11 14:20:05 -03:00
Brad Dunbar
a72700921f Add favicon to test/index.html 2013-09-07 13:44:29 -04:00
Brad Dunbar
15b7d77003 Avoid calling pushState with an empty url. 2013-07-05 17:20:35 -04:00
Brad Dunbar
151bd73d26 Never include trailing slash on the root. 2013-07-05 16:00:45 -04:00
Brad Dunbar
0a662d6974 Fix #2656 - Trailing slash on root. 2013-07-05 15:40:35 -04:00
Brad Dunbar
09259964df QUnit 1.12.0 2013-07-03 11:03:19 -04:00
Brad Dunbar
fa411d6240 Fix #2606 - Collection#create success arguments. 2013-06-11 16:15:07 -04:00
Casey Foster
6f9c1ece1e Ensure Collection#get does not return a false negative during the change:attr event 2013-06-10 09:32:02 -05:00
Casey Foster
9dbffe31f4 Add "difference" collection method
Seeing as "without" is already included and "difference" is just a different API
for without, I see no reason for not adding it. Prior to this commit, one would
have to do `collection.without.apply(collection, other.models)` which is
definitely not as nice as `collection.difference(other.models)`. Useful for
cases like `availableSeats = allSeats.difference(reservedSeats.models)`.
2013-06-09 12:37:24 -05:00
Brad Dunbar
5f93ba79fa Do not load the hash as a fallback. 2013-05-29 14:59:53 -04:00
Brad Dunbar
3567dc60f0 Fix #2538 - Only transition if both pushState and hashChange are requested. 2013-05-28 08:59:11 -04:00
Casey Foster
6ac7704c30 Fix same mutation problem with existing/non-existing mix of models 2013-05-15 15:37:37 -05:00
Casey Foster
61987e8deb Force add true and remove false flags in add, merge optional 2013-05-08 00:33:34 -05:00
Casey Foster
fd0cb9695d Fix bug causing mutations while merging with nested models
Again, I'm not a huge fan of this solution to the merge + defaults problem, but
this will work until somone more clever than I figures out what to do or we
reevaluate the whole existance checking ordeal.
2013-05-01 13:38:33 -05:00
Brad Dunbar
dc5de0190e Revert non-model sync commits.
Revert "Allow non-model object as second argument, with test."
This reverts commit 32743e6b60.

Revert "trigger request event only if model extends Backbone.Events, and fix whitespace"
This reverts commit 6d72e1be35.

Revert "add if statement and add passing test"
This reverts commit 2caf748651.
2013-04-22 11:22:23 -04:00
Tim Griesser
32743e6b60 Allow non-model object as second argument, with test. 2013-04-21 21:02:37 -04:00
Rune Skjoldborg Madsen
2caf748651 add if statement and add passing test 2013-04-21 20:23:25 -04:00
Casey Foster
f61bd29d30 Add failing merge with defaults test 2013-04-12 10:54:53 -05:00
Brad Dunbar
51eed189bf Dispense with View#options merging. 2013-04-09 09:38:23 -04:00
Brad Dunbar
a22cbc7f36 Fix #2458 - Options are not attached to views. 2013-04-08 13:58:15 -04:00
Jeremy Ashkenas
165849e0ba Merge pull request #2085 from caseywebdev/reorder
Fix #2068 - `set` respects input order in absence of comparator
2013-04-03 19:30:28 -07:00
Casey Foster
d12e4cf881 set respects input order in absence of comparator 2013-04-03 19:18:59 -05:00
William Humphreys-Cloutier
746aa1d37e return from Backbone.history.navigate whether a route was matched. 2013-04-01 21:59:09 -04:00
Casey Foster
4db2676477 Don't validate twice in 2013-03-29 14:16:00 -05:00
Casey Foster
8e7208e0d8 Fix #2446 save should always set with validate: true by default 2013-03-29 13:46:17 -05:00
Genadi Samokovarov
3bfbcd4123 Don't accept urlRoot from Model and url from Collection 2013-03-25 23:07:46 +02:00
Genadi Samokovarov
e91b36c0cb Don't attach url if passed as an option in Model 2013-03-23 19:34:27 +02:00
Jeremy Ashkenas
1c17c2efee Merge pull request #2393 from braddunbar/route-names
Use empty route name for anonymous routes.
2013-03-19 22:54:17 -07:00
Brad Dunbar
3d431346c7 Use empty route name for anonymous routes. 2013-03-20 01:42:29 -04:00
Jeremy Ashkenas
fe251a477d Restoring model.set() with 'silent' 2013-03-20 12:01:53 +08:00
Jeremy Ashkenas
2b8f116dcc Adding a test for slashes with splats, github-style 2013-03-20 11:11:18 +08:00
Jeremy Ashkenas
d6e283ec3e Fixes #2321, fixes #2014 -- decode route arguments. 2013-03-20 10:50:42 +08:00
Jeremy Ashkenas
4ab7d055c0 Merge pull request #2391 from tgriesser/model-options
Attaching url and urlRoot on the model if passed
2013-03-19 17:17:57 -07:00