Jeremy Ashkenas
0a4399e3de
Backbone.js 1.1.0
2013-10-10 21:57:30 -03:00
Jeremy Ashkenas
41f815dbc9
Mild DRY-ing, and fixing logic error.
2013-10-10 21:32:19 -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
ce69368fcc
Merge pull request #2783 from caseywebdev/gh-2470
...
Fix #2470 Do not mutate options in _prepareModel
2013-10-10 06:03:23 -07:00
Jeremy Ashkenas
f627855149
Merge pull request #2795 from akre54/shorter-defaults
...
Shorter defaults in model ctor
2013-10-10 05:54:02 -07:00
Adam Krebs
cdceabe6c4
shorter defaults in model ctor, shorter extends in history
2013-10-08 10:19:07 -04:00
Casey Foster
5644a5909a
Fix #2470 Do not mutate options in _prepareModel
2013-09-25 15:00:56 -05: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
Jeremy Ashkenas
abcb3cf3ef
Removing extra preparemodel calls.
2013-09-11 21:19:37 -03:00
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