Commit Graph

908 Commits

Author SHA1 Message Date
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
Andrey Kuzmin
ffa4fa597d Added failing test case 2015-06-02 13:58:13 -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
f79e0bcf53 Fix failing IE6 test
It was a false positive. Our “location” parsing uses an A tag, which
doesn’t always work the way the real location parsing does.
2015-06-02 12:26:41 -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
13de636df1 Ensure fetch'd data is only parsed once 2015-05-30 02:27:51 -04:00
Justin Ridgewell
415c3a7a13 Collection#set shouldn't parse
Fixes #3636, #2824.

Reverts #1407.
2015-05-30 02:27:51 -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
61e765087d Test that Collection#remove _only_ returns removed models
Add (currently) failing tests for #3512.
2015-05-27 11:42:42 -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
Justin Ridgewell
11071babd4 Test #setElement 2015-05-23 20:35:03 -04:00
Justin Ridgewell
00226d5a57 Test #remove returns view 2015-05-23 20:34:55 -04:00
Justin Ridgewell
dcbd0ea8e6 Test #undelegateEvents returns view 2015-05-23 20:34:32 -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
5c8c40fe37 Test #render returns view 2015-05-23 20:33:13 -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
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
Jeremy Ashkenas
6ef574669b Merge pull request #3594 from jridgewell/eventsApi-refinements
Refine eventsApi
2015-05-13 16:11:31 -04:00
Adam Krebs
c731f721f3 Merge branch 'master' into bb-120 2015-05-13 11:59:33 -04:00
Jeremy Ashkenas
4aa539d3db Merge pull request #3577 from jridgewell/destroy-zalgo
Always call success async
2015-05-13 11:19:39 -04:00
Adam Krebs
6ea3bfb665 merge in master branch 2015-05-13 11:10:03 -04:00
Justin Ridgewell
9ad11ddf80 Ensure #on and #off **never** alter callback list 2015-05-01 20:20:21 -04:00
Justin Ridgewell
020bec3b22 Refine eventsApi
Based off code from https://github.com/jashkenas/backbone/pull/3476
2015-05-01 20:20:21 -04:00
Brad Dunbar
1eb03c8354 Clean up. 2015-04-28 07:17:15 -04:00
Brad Dunbar
c8968853a2 Simplify. 2015-04-28 07:13:54 -04:00
Brad Dunbar
24daf350e4 Use more descriptive test names. 2015-04-28 06:56:40 -04:00
Brad Dunbar
21180e7234 Handle roots with regex characters. 2015-04-28 06:55:10 -04:00
Brad Dunbar
c1e70a28aa If the root doesn't match, no routes can match. 2015-04-28 06:34:28 -04:00
Justin Ridgewell
d7943fe4c0 Always call success async
Let's not [unleash
Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony
).
2015-04-23 14:03:50 -04:00
Adam Krebs
401fdbd02c Merge branch 'master' into bb-120
Conflicts:
	index.html
2015-03-20 11:44:34 -04:00
Adam Krebs
bf731534aa Merge pull request #3507 from akre54/matches-with-callback
Matches with predicate
2015-03-20 11:33:01 -04:00
Jeremy Ashkenas
dfec4b837d Merge pull request #3463 from jridgewell/on-does-not-alter
Do not alter the "on" events array
2015-03-04 11:35:24 -05:00
Justin Ridgewell
8b28f31e95 Merge pull request #3523 from braddunbar/test-scripts
Sync test scripts with karma config.
2015-03-03 10:12:08 -05:00
Brad Dunbar
6c63ef2cb5 Set the pathname explicitly for phantomjs. 2015-03-03 07:50:31 -05:00
Brad Dunbar
75b9c0db0a Sync test scripts with karma config. 2015-03-03 07:48:31 -05:00
Jeremy Ashkenas
e109f6d3e7 Merge pull request #3434 from braddunbar/decode-fragment
Decode unicode escapes without decoding `%25`.
2015-02-23 11:48:55 -05:00
Adam Krebs
74fdd620d7 fix comma at end of collections test 2015-02-22 11:58:06 -05:00
Graeme
f02ba1f47b Run test suite using karma 2015-02-20 15:12:09 -05:00
Adam Krebs
499f6af3b9 allow Model#matches to take a predicate function 2015-02-19 09:39:00 -05:00
Adam Krebs
96f7746393 bump Underscore dependency to 1.7.0 2015-02-19 09:35:51 -05:00
Adam Krebs
bc014663f2 Remove AMD test. We know it works, no need to keep an extra file around. 2015-02-19 00:06:50 -05:00
Adam Krebs
4fd9da4f81 style tweaks 2015-02-17 19:24:35 -05:00
Adam Krebs
0df246e1f6 Merge pull request #3488 from platinumazure/include-updated-options-in-sync-callback
Include updated options in sync callbacks
2015-02-17 19:20:02 -05:00
Kevin Partington
b331afede1 Small style tweaks per akre54's comments on the pull request. 2015-02-17 19:13:19 -05:00