Jeremy Ashkenas
a97880cb27
merged
2012-12-11 11:24:07 -05:00
Jeremy Ashkenas
5cab60be4f
Defaulting remove:true for Collection#update
2012-12-11 11:20:19 -05:00
Jeremy Ashkenas
68413a04f4
Merge pull request #1896 from braddunbar/push-sort
...
Fix #1894 , Collection#push should not sort.
2012-12-11 07:26:56 -08:00
Brad Dunbar
6c0cda6707
Fix #1894 , Collection#push should not sort.
2012-12-11 10:19:36 -05:00
Casey Foster
f71004fc7a
Add failing test case for different idAttribute fields
2012-12-10 21:28:12 -08:00
Jeremy Ashkenas
a645760286
Change Collection#sort's event from 'reset' to 'sort', so you can optimize further if you wish.
2012-12-10 23:48:25 -05:00
Jeremy Ashkenas
5713b5ee96
s/event/run
2012-12-10 17:04:33 -05:00
Jeremy Ashkenas
d4d2daf891
Fixes #618 -- support for a simple version of PATCH
2012-12-10 16:31:02 -05:00
Jeremy Ashkenas
104e9baebb
Merging in Collection#update -- revised implementation, some tweaks: models are retained by default, there's no new 'update' event.
2012-12-10 15:59:23 -05:00
Jeremy Ashkenas
d6d264bebd
Merge branch 'collection-update' of https://github.com/caseywebdev/backbone
2012-12-10 14:47:35 -05:00
Jeremy Ashkenas
ec97a1cef9
Fixes #1468 -- add a 'request' event that allows folks to watch for spinners etc. Passes the XHR on which you can .then, .error, and so on.
2012-12-10 14:10:41 -05:00
Jeremy Ashkenas
615b08c9e8
Merge pull request #1881 from gsamokovarov/refactor-events-test
...
Refactor events tests
2012-12-10 10:16:07 -08:00
Genadi Samokovarov
188eb98ab6
Add asynchronous test for once
2012-12-10 19:05:02 +02:00
Casey Foster
c6ca92850c
Merge branch 'master' into collection-update
2012-12-10 08:02:43 -08:00
Casey Foster
764c38f112
Pass models in update trigger
...
Let `sort` trigger "sort" in an effort to phase out `reset`
Avoid unneccessary array rebuild in `update`
2012-12-10 08:02:15 -08:00
Jeremy Ashkenas
0991608f55
Rewriting comment.
2012-12-10 10:59:54 -05:00
Jeremy Ashkenas
4976b66652
Merge pull request #1889 from caseywebdev/global-events
...
Backbone extends Events
2012-12-10 07:58:01 -08:00
Casey Foster
d08611a504
Simplify test for Backbone Events inheritance
2012-12-10 07:52:21 -08:00
Casey Foster
a3da45efd5
Backbone extends Events
2012-12-10 07:46:00 -08:00
Jeremy Ashkenas
2bb28cddc0
Merge pull request #1886 from gsamokovarov/patch-4
...
Replace undefined with void 0 at router's test
2012-12-10 07:42:10 -08:00
Jeremy Ashkenas
4da25a48a6
Passing a configured version of jshint
2012-12-10 10:31:28 -05:00
Jeremy Ashkenas
a389e81e71
removing accidental globals -- need to get lint hooked up.
2012-12-10 09:59:55 -05:00
Genadi Samokovarov
631fd34dd7
Replace undefined with void 0 at router's test
...
Spotted these after commenting on the Change Log issue.
2012-12-10 11:06:09 +02:00
Casey Foster
bee1296053
Update update to merge cleanly
2012-12-08 17:55:15 -08:00
Casey Foster
c51b9cc5fd
Rebasing update
...
Reuse prepared model in Collection#update
Remove extra whitespace
Trigger `update` after Collection#update unless silent
Don't create new models in Collection#update
Remove `slice` call from Collection#update
It isn't necessary since the array isn't being modified. `add` and
`remove` both slice the arrays they are passed, so simply reading
and passing on the pristine array to those functions is harmless.
Simplify excessive ternary in Collection#update
`update` supports simple add/remove/merge options
Cleanup `update`, support for any combination of add/merge/remove
Save a potentially useless `slice` in `update`
Add comments and more tests for Collection#update
Avoid splice and slice, they're too slow!
2012-12-08 17:48:55 -08:00
Jeremy Ashkenas
7dbfecc6c1
Fixes #697 -- Add 'once' to backbone events, supporting event maps, off, and all that jazz
2012-12-07 17:56:56 -05:00
Jeremy Ashkenas
5af6879f7d
Fixes #1876 -- add travis badge to backbonejs.org
2012-12-07 17:13:37 -05:00
Jeremy Ashkenas
62b80bfc32
Fixes #1340 -- reset events include previous list of models, for added convenience.
2012-12-07 16:20:24 -05:00
Jeremy Ashkenas
6dadc92765
Merge branch 'encoded-fragments' of https://github.com/braddunbar/backbone
2012-12-07 15:24:55 -05:00
Tim Branyen
f416c5be6d
bumping the version in master, reflecting the wip state
2012-12-07 09:57:59 -05:00
Jeremy Ashkenas
23cc302a51
Fixes #1477 -- Changing Backbone's internal logic so that validation always happens, even when silent: true. Defining a validate should never allow state to become invalid, even during a silent change.
2012-12-06 16:48:29 -05:00
Jeremy Ashkenas
362b91c8e4
Fixes #1456 . Enhances Backbone.Events to support jQuery-style event maps, in 'on' and 'off'.
2012-12-06 16:12:19 -05:00
Jeremy Ashkenas
8711f3c781
Fixes #1870 -- allow empty bodies for difficult endpoints.
2012-12-06 15:43:25 -05:00
Jeremy Ashkenas
193ba773ba
Fixes #1871 -- move the Catalog of Events to the top of the docs.
2012-12-06 15:36:19 -05:00
Casey Foster
aefd78f949
Merge branch 'master' into collection-update
...
Conflicts:
test/collection.js
2012-12-05 10:31:31 -08:00
Casey Foster
54ac6b0e4c
Cleanup collection#update
2012-12-05 10:19:59 -08:00
Jeremy Ashkenas
828f15acc3
our noglobals flag to QUnit breaks the test suite in Safari (for whatever reason) ... removing it.
2012-12-04 17:58:01 -05:00
Jeremy Ashkenas
6d19aba9ee
remove the Ender test suite. We never update it -- and I can't remember ever hearing about anyone actually using Ender w/ Backbone.
2012-12-04 17:57:08 -05:00
Jeremy Ashkenas
a7be84ef37
merged.
2012-12-04 17:41:57 -05:00
Jeremy Ashkenas
f918d9d015
Adding Jolicloud as an example app
2012-12-03 14:18:49 -05:00
Casey Foster
1b985790a4
Simplify conditional in Collection#update
2012-12-01 12:33:23 -08:00
Casey Foster
beffc15a0b
Add Collection#update to better use collection events
2012-12-01 12:26:11 -08:00
Brad Dunbar
0b2225655b
Tweak sort test a bit.
2012-12-01 07:46:01 -05:00
Casey Foster
59850645e6
Only sort on add when it make sense
2012-11-30 15:40:01 -08:00
Tim Griesser
e5a3b0bba0
consistent 'parse' option on collection constructor & reset
2012-11-30 11:47:01 -05:00
brad dunbar
d0bed60f84
Merge pull request #1853 from tgriesser/qunit
...
noglobals check mandatory for browser qunit and npm runner
2012-11-29 14:20:11 -08:00
Tim Griesser
a2a32cde62
Merge pull request #1 from braddunbar/noglobals
...
Force noglobals.
2012-11-29 11:54:23 -08:00
Brad Dunbar
f668e842aa
Force noglobals.
2012-11-29 14:17:28 -05:00
Tim Griesser
f2c6412f4c
noglobals check mandatory for browser qunit and node runner
2012-11-29 13:33:49 -05:00
Jeremy Ashkenas
1b2a286471
Merge pull request #1852 from braddunbar/noglobals
...
Use noglobals in `npm test`.
2012-11-29 08:47:55 -08:00