Jeremy Ashkenas
5ef4921c54
merging async test.
2012-02-27 14:37:50 -05:00
Jeremy Ashkenas
f930b5f042
adding additional router test
2012-02-27 14:37:13 -05:00
Jeremy Ashkenas
83d2918bc7
removing a test that is invalid in IE.
2012-02-27 14:32:30 -05:00
Jeremy Ashkenas
54e284bced
Merge branch 'master' of github.com:documentcloud/backbone
2012-02-27 14:30:26 -05:00
Jeremy Ashkenas
07604deac0
merging in hash fixer for FF
2012-02-27 14:30:23 -05:00
Brad Dunbar
f8b37a84b5
Add test for #1048 .
2012-02-27 14:23:49 -05:00
Brad Dunbar
111d5a1f19
Add a test for #1052 .
2012-02-27 14:16:00 -05:00
Brad Dunbar
69b80f5e3a
Fixes #959 - Silent changes fire 'change:attr'.
...
* Silent changes are tracked so `'change:attr'` can be
fired next time `change` is called.
* Pending changes are tracked to prevent infinite loops
and accurately reflect nested changes.
2012-02-17 07:22:43 -05:00
Jeremy Ashkenas
e5db1c93d0
Merge pull request #1011 from wookiehangover/issue996
...
adding test coverage for route precedence as per issue #996
2012-02-15 09:04:30 -08:00
Sam Breed
8d8a3599a9
adding test coverage for route precedence as per issue #996
2012-02-14 23:18:46 -07:00
Brad Dunbar
232c888038
fixes #1003 - History is started before navigate
2012-02-15 00:39:38 -05:00
Brad Dunbar
8b285c6c83
on is a noop if no callback is provided
2012-02-14 15:22:27 -05:00
brad dunbar
1406ef1c28
Merge pull request #1001 from vertigem/feature/qunit-toolbar
...
added qunit toolbar
2012-02-14 05:44:24 -08:00
Duke
63188db42b
added qunit toolbar
2012-02-13 22:12:15 -02:00
Jeremy Ashkenas
18fba57724
Much asked-for change. Instead of throwing an early error when adding duplicate models, Backbone will simply skip them instead.
2012-02-13 14:39:36 -05:00
Jeremy Ashkenas
2a92f71dcc
Merge branch 'master' of github.com:documentcloud/backbone
2012-02-08 16:59:11 -05:00
Jeremy Ashkenas
e3ac6f8eaa
Adding Collection#push, pop, shift, and unshift to the API, returning references to the model. Fixing a too-unescaped regex.
2012-02-08 16:58:37 -05:00
Jake Harding
17459a316b
Adding test for #967 .
2012-02-07 14:17:53 -08:00
Brad Dunbar
522e090831
fixes #964 - collection.get has consistent return
2012-02-06 16:45:06 -05:00
Brad Dunbar
3ef9c3a5fc
Add tests for #908 , #933 .
2012-02-03 10:17:45 -05:00
Brad Dunbar
1d921d690a
Add tests for #906 .
2012-02-02 20:26:41 -05:00
Brad Dunbar
954da679ed
Refactor some tests.
...
* Use object for lastRequest to prevent errors.
* Ensure setDOMLibrary tests are cleaned up.
2012-02-02 19:36:50 -05:00
Jeremy Ashkenas
a865aa41f1
removing obsolete error case.
2012-02-02 17:15:28 -05:00
Jeremy Ashkenas
0ffd7ea2ca
merging in setDomLibrary
2012-02-02 16:30:56 -05:00
Jeremy Ashkenas
eb4753862e
#917 , adding an Model#isValid() function.
2012-02-02 15:54:34 -05:00
Jeremy Ashkenas
aafbcb05e5
Fixes #917 -- reverts validate() behavior to never run on silent sets.
2012-02-02 15:40:06 -05:00
Brad Dunbar
29a4359ff7
fixes #915 - nested 'change:attr' events
...
* `'change'` does not fire without changes
* nested `'change:attr'` events are fired
* `'change'` is only fired once for nested calls
* nested `'change'` events are fired
2012-02-02 10:49:27 -05:00
Brad Dunbar
ec61503c87
fixes #928 - Save sends correct attrs.
...
* Temporarily set model's attrs for `sync`.
* Remove cross-module (global) dependencies in
Collection, Model, and sync test modules.
2012-02-02 08:57:47 -05:00
Brad Dunbar
bc79feaf5a
passing falsey keys to hasChanged or previous
2012-02-01 16:06:36 -05:00
James Sanders
e97c58f547
Change name to setDomLibrary
2012-01-31 17:25:41 -07:00
James Sanders
9bd086e64b
Change from Backbone.use to Backbone.setjQuery and fix tests
2012-01-31 15:49:53 -07:00
Matt Smith
701350ab90
inject js library with Backbone.use(myLib)
2012-01-31 15:11:13 -07:00
Brad Dunbar
db95e2c1fb
fixes #907 - save with wait succeeds without validate
2012-01-31 10:02:05 -05:00
Brad Dunbar
50e8103fdf
check for duplicate models/ids
2012-01-30 15:24:41 -05:00
Jeremy Ashkenas
4b4f2c1ad6
missed an API regression in model.changedAttributes(), reimplementing in the same way as the original.
2012-01-30 12:18:58 -05:00
Brad Dunbar
2a6624cb24
use _.has for Object proto props
2012-01-30 05:52:47 -05:00
Brad Dunbar
2f654d2676
cache changed attributes
2012-01-30 05:00:41 -05:00
Brad Dunbar
0d6e5f3934
Fire 'change:attr' from change
2012-01-27 14:07:33 -05:00
Jeremy Ashkenas
ab164c450d
Overhauling 'validate' -- Receives the computed new state of the attrs, not just the delta. Now runs on model create, raising an exception if you try to 'new' and invalid model ... also runs even if changed silently.
2012-01-23 18:16:20 -05:00
Jeremy Ashkenas
96a7274cf7
Fixes #538 -- adds Backbone.history.stop() for unit testers.
2012-01-23 10:31:53 -05:00
Jeremy Ashkenas
36fde545f9
Merge pull request #872 from vovik/master
...
fixed typo in test for (presumably) equality
2012-01-22 10:04:57 -08:00
Brad Dunbar
3a891854e8
setting undefined attributes
...
* undefined attrs should still be set
* unset triggers change for undefined attrs
* values are set regardless of change/equality
2012-01-20 11:02:46 -05:00
vlad
c7c7b3c1a1
fixed typo in test for (presumably) equality
2012-01-18 13:49:09 -08:00
Brad Dunbar
b05deb5fb5
fix #871 - calling set with 'attributes' property
2012-01-18 12:45:09 -05:00
Jeremy Ashkenas
910ca3c190
Merge pull request #866 from braddunbar/add-tweaks
...
Collection#add tweaks
2012-01-17 22:50:17 -08:00
Brad Dunbar
09ab8cb17d
Collection#add tweaks
...
* leave collection in a consistent state after throw
* correct indices
2012-01-17 23:53:02 -05:00
Brad Dunbar
397d11e340
equals is deprecated; use equal instead
...
http://docs.jquery.com/QUnit/equal#actualexpectedmessage
2012-01-17 23:52:12 -05:00
Jeremy Ashkenas
cea56e523a
Fixes #563 . Initial draft of 'wait: true' for pessimistic instead of optimistic save() create() and destroy(). Makes it easier to have your asynchronous UI and eat it too.
2012-01-17 15:26:26 -05:00
Jeremy Ashkenas
0dedb05093
Merge pull request #862 from braddunbar/implicit-callback
...
Router: Use implicit callback if none provided
2012-01-17 11:02:32 -08:00
Jeremy Ashkenas
1c053d9f71
Fixes #567 ... Adds a view. for the jQuery cached reference to a view's element ... and this.setElement() as a way to easily change it, redelegating events.
2012-01-17 13:54:42 -05:00