Commit Graph

655 Commits

Author SHA1 Message Date
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
Jeremy Ashkenas
155bd064a9 Revert "Removing HTTP PATCH support from Backbone. Revert this commit as soon as jQuery supports PATCH."
This reverts commit 46bf8c8197.
2013-03-20 07:41:21 +08:00
Tim Griesser
b490e477f7 attaching url and urlRoot on the model if passed 2013-03-19 15:36:00 -04:00
Tim Griesser
8b0973c48e adding validationError as options property 2013-03-19 10:55:35 -04:00
Jeremy Ashkenas
83eb26f971 removing some underscore model methods, adding others 2013-03-19 20:07:53 +08:00
Jeremy Ashkenas
4e3f923f83 Merge pull request #2082 from akre54/underscore-methods-on-model-2
Add underscore methods (map, keys, values) to models
2013-03-19 05:02:45 -07:00
Jeremy Ashkenas
c779865c18 Merge pull request #2104 from akre54/collection-tests
Add reset collection memory and merge tests
2013-03-19 04:54:26 -07:00
Jeremy Ashkenas
46bf8c8197 Removing HTTP PATCH support from Backbone. Revert this commit as soon as jQuery supports PATCH. 2013-03-19 19:37:51 +08:00
Jeremy Ashkenas
04da5ade56 removing (99% unused) zepto version of tests. 2013-03-19 19:22:46 +08:00
Jeremy Ashkenas
b7096f8f74 typo 2013-03-19 19:16:34 +08:00
Jeremy Ashkenas
2b42cc069c Merge pull request #2191 from byroot/feature-ignore-undefined-methods-in-views-events
Improve consistency: get rid of "a zealous early error breaking apps in inconvenient ways"
2013-03-19 04:13:33 -07:00
Jeremy Ashkenas
e6e7fe878b Fixes #2216, fixes #2239, allow routes to be defined anonymously. 2013-03-19 18:59:31 +08:00
Jeremy Ashkenas
a920fed91b Fixes #2262 -- always use parsed attributes. 2013-03-19 18:45:05 +08:00
Jeremy Ashkenas
0f1b88bae9 #2321 -- unicode test 2013-03-19 18:10:37 +08:00
Jeremy Ashkenas
ad37b3f9c9 Renaming Collection#update to Collection#set for parallelism ... After a fetch, set is now the default, and reset is the opt-in. 2013-03-19 18:05:26 +08:00
Jeremy Ashkenas
1b212abcac Merge pull request #2375 from davidinjc/routes_function
Allow extending Router.routes by accepting a function
2013-03-18 18:40:01 -07:00
Sam Breed
5f5c501735 fixing broken comparator test in IE8 (missing return statement) 2013-03-15 23:03:50 -06:00
David Lee
02d6c350b4 Fix test: making vars local 2013-03-15 12:17:32 -04:00
David Lee
29ad43e610 Write a test for making Router.routes accept a function
[#2255]
2013-03-15 11:57:16 -04:00
Brad Dunbar
26efd06a21 Tweak url attachment a bit. 2013-03-11 10:03:58 -04:00