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
Adam Krebs
401fdbd02c
Merge branch 'master' into bb-120
...
Conflicts:
index.html
2015-03-20 11:44:34 -04:00
Adam Krebs
74fdd620d7
fix comma at end of collections test
2015-02-22 11:58:06 -05:00
Adam Krebs
4fd9da4f81
style tweaks
2015-02-17 19:24:35 -05:00
Kevin Partington
b331afede1
Small style tweaks per akre54's comments on the pull request.
2015-02-17 19:13:19 -05:00
Adam Krebs
19f9905fec
Merge branch 'master' into bb-120
...
Conflicts:
backbone.js
docs/backbone.html
test/collection.js
test/events.js
2015-02-13 17:20:43 -05:00
Kevin Partington
1088d18a21
Collection#fetch, Model#save, Model#fetch, and Model#destroy should all pass extra sync options to success callbacks.
2015-02-10 20:28:20 -06:00
Kevin Partington
780c84744a
Collection#create passes extra options added by model sync to success callback
2015-02-10 19:59:22 -06:00
Jeremy Ashkenas
713c288475
Merge pull request #3455 from jridgewell/listenTo-memory-leak
...
Fix listenTo memory leak
2015-02-03 14:16:15 -05:00
Jeremy Ashkenas
c1ce7a7484
Merge pull request #3423 from jridgewell/ajax_context
...
Call the success callback with context
2015-02-02 13:48:49 -05:00
Justin Ridgewell
0c200ca31f
Delete events hash if there are none.
2015-01-24 14:56:10 -05:00
Brad Dunbar
1b0c67bdf8
Collection#set - options.at accepts a string.
...
Closes #3353 .
2015-01-23 06:33:15 -05:00
James Hartig
8569f8985c
Collection.add accepts negative indexes for the at option
2015-01-22 17:38:12 -05:00
Adam Krebs
04f912ca38
Code style cleanup in collection tests and add an extra sort test
2015-01-22 17:38:12 -05:00
James Hartig
545a12ec8e
Order should trigger a sort iff order was changed
2015-01-22 17:38:12 -05:00
robrobbins
51084c63a0
use number of assertions, not another var
2015-01-22 17:38:12 -05:00
robrobbins
a35d88ee81
listen for invalid, not error
2015-01-22 17:38:11 -05:00
admangum
2878091da6
clone options passed to reset
2015-01-22 17:38:08 -05:00
Adam Krebs
342b24b9b3
don't just test for the presence of options, test that it points to the same object as passed in.
2015-01-22 17:38:08 -05:00
Hadrien Milano
b4f65f7aa1
fix wrong test: collection.model must be a function
2015-01-22 17:38:08 -05:00
Hadrien Milano
5025d3ce71
fix flawed test
2015-01-22 17:38:08 -05:00
JD Isaacks
7e4f140072
Set correct number of assertions
2015-01-22 17:38:07 -05:00
JD Isaacks
63790cd1d6
Add test for negative indexes in at method
2015-01-22 17:38:07 -05:00
Justin Ridgewell
c2b2a71c29
Call the success callback with context
...
Fixes https://github.com/jashkenas/backbone/issues/3283 .
2014-12-22 12:01:28 -05:00
James Hartig
c3b09ddb98
Collection.add accepts negative indexes for the at option
2014-11-14 16:06:14 -05:00
Adam Krebs
0519e7df6f
Code style cleanup in collection tests and add an extra sort test
2014-11-13 12:06:44 -05:00
Adam Krebs
bc88f125f1
Merge pull request #3381 from fastest963/orderSort
...
Order should trigger a sort iff order was changed
2014-11-13 11:43:29 -05:00
James Hartig
787ee49d7e
Order should trigger a sort iff order was changed
2014-11-13 11:39:11 -05:00
robrobbins
f2fe23e339
use number of assertions, not another var
2014-11-12 15:12:05 -07:00
robrobbins
51d076c9be
listen for invalid, not error
2014-11-11 12:45:52 -07:00
admangum
dae5424bd5
clone options passed to reset
2014-10-09 12:31:35 -07:00
Adam Krebs
833ab6f327
don't just test for the presence of options, test that it points to the same object as passed in.
2014-10-03 14:03:55 -04:00
Hadrien Milano
cdce75ef76
fix wrong test: collection.model must be a function
2014-10-03 17:59:35 +02:00
Hadrien Milano
e10ab33e73
fix flawed test
2014-10-02 22:15:26 +02:00
Adam Krebs
4927b6e3f0
Merge pull request #3281 from jisaacks/master
...
Allow Collection.at to accept negative indexes
2014-09-25 12:22:18 -04:00
James Hartig
34e1a1e40c
Send correct 'at' when firing 'add' event
2014-09-11 13:04:36 -04:00
JD Isaacks
bcd7549bc9
Set correct number of assertions
2014-09-02 10:33:05 -04:00
JD Isaacks
992fc7b794
Add test for negative indexes in at method
2014-09-02 10:28:48 -04:00
Casey Foster
4e2d20918f
Allow Collections to determine uniqueness, not Models
2014-06-21 08:00:13 -05:00
Casey Foster
11cc0e863f
Revert "Make new tests more thorough"
...
This reverts commit f814b85db6 .
Revert "Return `id` assumption for simple polymorphic `Collection#model` factories."
This reverts commit 3f7fbdeec6 .
Conflicts:
test/collection.js
Revert "#2985 -- use 'change-id' as the event name"
This reverts commit 36e4925b9c .
Revert "Merge pull request #2985 from caseywebdev/generate-id"
This reverts commit 60b9cc1d18 , reversing
changes made to 0c1838be63 .
Conflicts:
test/collection.js
2014-04-23 12:02:09 -05:00
Adam Krebs
ccdb757d0d
Revert "Added reverse option in the collection sort method"
...
This reverts commit cea2f3fb86 .
Conflicts:
backbone.js
test/collection.js
2014-04-15 12:03:12 -04:00
Adam Krebs
edb2a21d13
cleanup reverse tests
2014-04-14 12:20:07 -04:00
Ferran Basora
cea2f3fb86
Added reverse option in the collection sort method
...
Added the reverse option to be able to sort the collection in the
inverse order specified by the comparator. Useful for one argument
comparators returning string values.
For boolean and integer comparators are easy to find the inverse
function to reverse the collection but for string comparators it's
not as easy as it seems.
2014-04-09 09:45:17 +02:00
Tim Griesser
f5dba8edf4
Fixes #3028 assign collection in prepareModel
2014-03-18 17:25:57 -04:00
Casey Foster
f814b85db6
Make new tests more thorough
2014-03-05 07:57:39 -06:00
Casey Foster
3f7fbdeec6
Return id assumption for simple polymorphic Collection#model factories.
...
Also, add tests to make sure it doesn't break in the future.
2014-03-05 07:48:27 -06:00
Brad Dunbar
b362ea0fcc
Fix #3015 - History#stop cleans up iframe.
2014-03-04 11:35:31 -05:00
Jeremy Ashkenas
60b9cc1d18
Merge pull request #2985 from caseywebdev/generate-id
...
Re #2976 Allow `id` values to be generated from a function given attrs
2014-03-03 12:56:08 -05:00