Justin Ridgewell
e81474880b
Don't bother with Collection#set unless models
2015-06-03 02:52:57 -04:00
Justin Ridgewell
fdea29dfc8
Collection#add shouldn't parse a model instance
...
Fixes #3636 , but in a backwards compatible way.
2015-06-02 14:06:50 -04:00
Justin Ridgewell
c95d9775e7
Revert "Merge pull request #3644 from jridgewell/collection-parse"
...
This reverts commit ff57b54cbb , reversing
changes made to 5ea158506f .
2015-06-02 13:55:21 -04:00
Jeremy Ashkenas
ff57b54cbb
Merge pull request #3644 from jridgewell/collection-parse
...
Collection parse
2015-06-02 13:29:58 -04:00
Justin Ridgewell
1c6b7639ff
Merge pull request #3613 from ahumphreys87/jsdomRouter
...
Fix opening and closing iframe document in jsdom
2015-06-02 11:09:47 -04:00
Justin Ridgewell
80ef9d5fef
Merge pull request #3655 from akre54/code-reorg
...
Code reorg
2015-06-01 12:02:20 -04:00
Adam Krebs
9be4131258
fix typo in once comment
2015-06-01 11:53:10 -04:00
Adam Krebs
565b2a1952
Move addUnderscoreMethods out of Backbone.Events, adjust comment now that array methods is only 1 method
2015-06-01 11:36:43 -04:00
Justin Ridgewell
cac05d4192
Merge pull request #3647 from jridgewell/collection-removeModels
...
Remove unnecessary assignment
2015-06-01 10:38:57 -04:00
Justin Ridgewell
a41a2056f9
Merge pull request #3603 from jridgewell/event-map-context
...
Juggle context param with event maps
2015-06-01 10:29:14 -04:00
Justin Ridgewell
53a4e701bb
Remove unnecessary assignment
2015-05-31 01:54:37 -04:00
Justin Ridgewell
be7fc95964
Update model's id with #get
2015-05-31 00:34:12 -04:00
Justin Ridgewell
1a8ed2efc6
Variable cleanup
2015-05-30 23:13:02 -04:00
Justin Ridgewell
415c3a7a13
Collection#set shouldn't parse
...
Fixes #3636 , #2824 .
Reverts #1407 .
2015-05-30 02:27:51 -04:00
Graeme Yeates
dbcfc15b8a
Merge pull request #3639 from jridgewell/collection-removeModels
...
Fix syntax error
2015-05-27 11:55:40 -04:00
Justin Ridgewell
196cee7289
Fix syntax error.
2015-05-27 11:53:37 -04:00
Jeremy Ashkenas
2e465970e0
Merge pull request #3637 from jridgewell/collection-removeModels
...
Return removed models from #_removeModels
2015-05-27 11:49:44 -04:00
Justin Ridgewell
e926394658
#_removeReference now removes references
2015-05-27 11:44:27 -04:00
Justin Ridgewell
a910bace09
Collection#remove returns removed model
2015-05-27 01:00:45 -04:00
Justin Ridgewell
46c90648c3
Return removed models from #_removeModels
2015-05-27 01:00:00 -04:00
Jeremy Ashkenas
165034b861
Merge pull request #3628 from jridgewell/model-fetch-style
...
Model#fetch parse option
2015-05-26 17:34:04 -04:00
Jeremy Ashkenas
751d6b19a3
Merge pull request #3629 from jridgewell/model-save-style
...
Model#save style
2015-05-26 17:33:20 -04:00
Jeremy Ashkenas
17adb0bbd3
Merge pull request #3630 from jridgewell/test-view
...
Test View
2015-05-26 17:31:43 -04:00
Jeremy Ashkenas
e78e9a2a07
Merge pull request #3627 from jridgewell/model-set-style
...
Model#set style
2015-05-26 16:00:55 -04:00
Adam Krebs
61d18408ad
Merge pull request #3625 from jridgewell/model-isValid-style
...
Use defaults in #isValid
2015-05-24 09:43:55 -04:00
Adam Krebs
68292f8c78
Merge pull request #3626 from jridgewell/model-changedAttributes-style
...
Un-golf #changedAttributes
2015-05-24 09:42:27 -04:00
Adam Krebs
a6731e1b4d
Merge pull request #3631 from jridgewell/model-url
...
Grab id using #get in Model#url
2015-05-24 09:41:02 -04:00
Justin Ridgewell
dc9b8f152f
Don't mutate attrs
2015-05-24 02:04:24 -04:00
Justin Ridgewell
3601b80b98
Cleanup Model#save success callback
2015-05-24 02:04:24 -04:00
Justin Ridgewell
0a091770b0
Default parse during extend
2015-05-24 02:04:24 -04:00
Justin Ridgewell
39a596efae
Make it apparent what temporarily needs waited attributes
2015-05-24 02:04:24 -04:00
Justin Ridgewell
4d70b87185
Declare variable when it's used
2015-05-24 00:30:51 -04:00
Justin Ridgewell
b5fd59e2fe
Grab id using #get in #url
...
Also, use the same slash normalizing as Router and History
2015-05-23 20:44:43 -04:00
Justin Ridgewell
1f4fb29323
Un-golf #delegateEvents
2015-05-23 20:41:31 -04:00
Justin Ridgewell
8266bd4609
Remove unneeded assignment
...
Since 1.7, `_.pick` no longer throws on `null`
2015-05-23 20:41:03 -04:00
Justin Ridgewell
dc52dec96c
#undelegate returns view
2015-05-23 20:34:10 -04:00
Justin Ridgewell
fda1f62824
#delegate returns view
2015-05-23 20:33:35 -04:00
Justin Ridgewell
9407713f19
Default parse during extend
2015-05-23 12:58:35 -04:00
Justin Ridgewell
0c2953a0d8
Respect parse option in Model#fetch
...
Expand #3508 to cover `Model#fetch`
2015-05-23 12:58:35 -04:00
Justin Ridgewell
962bbe9692
Declare the var when we use it
2015-05-23 12:36:47 -04:00
Justin Ridgewell
632a2b3b67
Use defaults in #isValid
2015-05-23 12:33:08 -04:00
Justin Ridgewell
cd11702167
Un-golf #changedAttributes
2015-05-23 12:29:00 -04:00
Andrew Humphreys
dced7c89d1
use local iframe window to open/close
2015-05-21 20:44:25 +01:00
Andrew Humphreys
4cf2274a2c
fix opening and closing iframe doc for jsdom
2015-05-16 14:13:24 +01:00
Justin Ridgewell
dba0faad09
Collection#invoke should collect arguments
...
Fixes https://github.com/jashkenas/backbone/issues/3610 .
2015-05-15 20:26:58 -04:00
Justin Ridgewell
6ecee63738
Juggle context param with event maps
...
When using event maps, it's a little nicer to specify the `context`
parameter as the second argument. This keeps backwards compatibility,
though the feature wasn't documented.
```javascript
obj.on({
a: method,
b: other
}, context);
```
When you explicitly pass a `context`, we don't override.
```javascript
obj.on({
a: function() { ok(this === context); },
}, otherContext, context);
```
2015-05-13 20:41:51 -04:00
Jeremy Ashkenas
bc73e25c5e
Fixes #3512
2015-05-13 18:03:53 -04:00
Jeremy Ashkenas
a1c65e2420
s/updated/update
2015-05-13 17:39:05 -04:00
Jeremy Ashkenas
3150eec295
merged in 'updated'
2015-05-13 17:37:54 -04:00
Graeme Yeates
cebd831680
Amend #3566 fix; global detection
...
Amendment to 5a6ffcb873
2015-05-13 16:34:45 -04:00