Tim Griesser
09e0cb3371
model#parse may no longer set the idAttribute
2013-09-11 20:08:37 -04: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
c19827019a
Fixes #2724 , leak with non-specific calls to stopListening.
2013-09-11 15:39:54 -03:00
Jeremy Ashkenas
6e5683f606
Fixes #2629 , by removing the no-longer-used sortedIndex
2013-09-11 14:49:23 -03:00
Jeremy Ashkenas
2acf58e862
More listen* var name tweaks.
2013-09-11 14:13:52 -03:00
Andy Locascio
86170d9488
Fixing semantics of listeners hash
2013-08-30 10:41:02 -04:00
Matt Hartzler
7b7dd1b07e
remove null options guard
...
no need to check for null options here as the first line of the
function already assumes an options object.
2013-07-30 09:10:23 -05:00
Carl Danley
cc9f46677b
fix spelling error in documentation
2013-07-18 22:23:49 -04:00
David
1c3510213d
whitespace
2013-07-13 16:09:02 -07: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
25f39490ee
Replace non-standard #substr with #slice.
2013-07-05 12:40:44 -04:00
Brad Dunbar
8c9a6ad8e7
Add missing comma.
2013-07-03 07:50:53 -04:00
Brad Dunbar
b4455a6fb6
Be explicit about boolean "trigger" option.
...
Closes #2647 .
2013-07-02 12:37:20 -04:00
Kim Joar Bekkelund
2f773493c1
Removed unnecessary variable 'matched'
2013-06-26 14:19:03 +02: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
Casey Foster
dec76e1d86
Avoid double _validate calls in _prepareModel
2013-06-05 16:49:58 -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
Jeremiah Orr
971173c521
Update PATCH/xhr check so that IE9 works
...
Fixes #2476
2013-05-21 10:13:35 -04:00
Tim Griesser
f69f1e6d7e
Merge pull request #2539 from fixe/patch-1
...
Added missing word to emulateHTTP comment
2013-05-17 06:19:16 -07:00
Casey Foster
6ac7704c30
Fix same mutation problem with existing/non-existing mix of models
2013-05-15 15:37:37 -05:00
Tiago Ribeiro
12c6595b03
Added missing word to emulateHTTP comment
2013-05-15 16:33:57 +02: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
1e1e0658ad
Don't mutate options in add or set
2013-05-08 00:11:49 -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
Ted Han
6b3e52cd9d
Fixing licensing typo.
2013-04-26 10:08:32 -05:00
Ted Han
921799c310
Updating license to reflect DocumentCloud's correct attribution.
2013-04-26 00:37:25 -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
6d72e1be35
trigger request event only if model extends Backbone.Events, and fix whitespace
2013-04-21 20:23:26 -04:00
Rune Skjoldborg Madsen
2caf748651
add if statement and add passing test
2013-04-21 20:23:25 -04:00
Casey Foster
8141f4fbc2
Fix #2471 merging with defaults
2013-04-12 15:52:08 -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
Tim Griesser
624a5076ec
very minor code formatting
2013-03-30 17:06:33 -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
Brad Dunbar
42d3588b73
Fix #2417 - Use apply to implement slice.
2013-03-22 08:50:09 -04:00
Jeremy Ashkenas
699fe32712
Backbone.js 1.0
2013-03-20 20:13:55 +08:00
Jeremy Ashkenas
9414b9a7c3
D-D-D-Documentation Refactor.
2013-03-20 15:11:25 +08: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