Commit Graph

403 Commits

Author SHA1 Message Date
Dave Tonge
c2261bf962 Modified two tests to listen for error events rather than catching exceptions when adding an invalid model to a collection 2012-10-08 05:26:55 +01:00
Radoslav Stankov
4a20d66f66 Check if model/collection support .off when disposing of the view 2012-10-05 22:04:12 +03:00
Jeremy Ashkenas
bdefd3cce1 Merge branch 'change-bug' of https://github.com/tgriesser/backbone 2012-10-03 15:11:01 -04:00
Ian Storm Taylor
3169cfe6ed swapped optional route syntax to parentheses, and adding docs 2012-10-02 19:10:59 -07:00
Ian Storm Taylor
ac8a807f49 added optional groups to route syntax, with tests 2012-10-02 19:10:59 -07:00
Brad Dunbar
3f530c2ab5 Fix #1695 - Ignore location.search during pushState transition. 2012-10-02 06:36:23 -04:00
Jeremy Ashkenas
84039f3924 Merge pull request #1693 from braddunbar/el-function
Allow view.el to be provided as a function.
2012-10-01 20:18:57 -07:00
Jeremy Ashkenas
06c764c5e8 merge conflict resolved 2012-10-01 17:06:27 -04:00
Brad Dunbar
e2d5483616 Allow view.el to be provided as a function. 2012-10-01 15:39:02 -04:00
Tim Griesser
71b6404d73 refactor change/set, fixing #1478 and #1664 2012-10-01 15:16:55 -04:00
Sam Breed
b347f9f8d4 consistently handle undefined being passed to the model constr (#1545) 2012-10-01 10:06:00 -06:00
Casey Foster
1e87356815 Added test for sorting during collection#add 2012-09-22 16:14:11 -07:00
Brad Dunbar
142d2ac832 Fix #1604 - Refactor add, remove index option.
* Avoid temporary constructs by splicing duplicates during traversal.
* Remove `index` option.
* Avoid creating empty options.
2012-09-22 08:59:37 -04:00
Brad Dunbar
a424341355 Fix #1653 - Ensure that History can be used outside of the browser.
* Dispense with options argument.
* Use `window` to retrieve location/history by default.
* Don't throw outside of the browser, allowing location and
  history to be replaced appropriately.
2012-09-17 14:38:48 -04:00
Brad Dunbar
c344201f6e Fix #1655 - sortBy & groupBy use attributes. 2012-09-17 11:31:46 -04:00
Brad Dunbar
85fca58bb9 Refactor reset/sort.
* Avoid creating unnecessary objects/arrays.
* Add test for sort-style comparator context.
2012-09-14 08:13:33 -04:00
Brad Dunbar
36a733a8bc Tweak string comparator implementation. 2012-09-14 08:05:41 -04:00
Brad Dunbar
8fdcaf207a Merge pull request #1587 from krawaller/master.
Conflicts:
	test/collection.js
2012-09-14 07:19:57 -04:00
KungD
8f29954011 removed prefix logic 2012-09-14 07:22:22 +02:00
KungD
4707b02056 removed automatic sorting in anticipation of sort option to .set 2012-09-12 18:27:10 +02:00
KungD
d2b4c1e55e test update 2012-09-12 07:06:54 +02:00
KungD
342a525e12 automatic resort when sorting attribute changes 2012-09-12 06:43:55 +02:00
Brad Dunbar
3b08fb8c89 Remove dependencies on qunit html. 2012-09-07 08:00:04 -04:00
Genadi Samokovarov
e413f63a4b Refactor test/view.js 2012-09-06 15:06:17 +03:00
Brad Dunbar
33cdab412e Drop doubled test prefixes. 2012-09-05 08:52:27 -04:00
Brad Dunbar
f3be02e1e0 Add test for transition to hashChange. 2012-09-04 17:05:34 -04:00
Jerome Lecomte
1efeae70de fix #1619: fix navigation when root is empty
broken by commit d015ef1118
2012-09-04 14:31:30 -04:00
Brad Dunbar
d015ef1118 pushState/replaceState takes a relative url. 2012-09-04 09:53:46 -04:00
Brad Dunbar
81669f51a1 test/{test.html -> index.html} 2012-09-02 14:37:52 -04:00
Brad Dunbar
8ef1730b73 Consolidate test boilerplate; use consistent names. 2012-08-31 11:39:34 -04:00
Brad Dunbar
65ed49bbaa Clean up.
* Remove accidental globals.
* Add missing semicolon.
* Clean up test.
2012-08-31 08:51:09 -04:00
Brad Dunbar
dabc5caf31 Upgrade QUnit. 2012-08-31 08:46:35 -04:00
Brad Dunbar
f49272e19e Fix variable scope error, provide test. 2012-08-29 18:41:08 -04:00
Brad Dunbar
1f3f45252f Consolidate sync/error events in Backbone.sync. 2012-08-29 16:14:48 -04:00
Brad Dunbar
4335fa885a Merge pull request #1472 from 'contiamo/master'. 2012-08-29 14:57:11 -04:00
KungD
8fafad1208 changed suffix syntax to prefix 2012-08-28 21:21:58 +02:00
KungD
d97b88447d allowing propname arg as collection comparator 2012-08-26 18:38:16 +02:00
Irene Ros
330f2ba182 adding model parsing for collections on initialization of a collection from raw data 2012-08-16 17:13:02 -04:00
Brad Dunbar
971a5fb383 Add View#dispose. 2012-08-15 16:31:43 -04:00
Brad Dunbar
281014319d Tweak id/className test. 2012-08-08 11:40:54 -04:00
Genadi Samokovarov
51387ebc36 getValue for View::className and View::id 2012-08-02 01:18:46 +03:00
Brad Dunbar
9a81468be7 Tweak root normalization. 2012-07-27 10:38:52 -04:00
Jamie Rolfs
596b12b56b Added test case for trailing slashs changes to atRoot in Backbone.history.start() 2012-07-26 12:12:41 -06:00
Jamie Rolfs
3d6b20ca7a Normalizing root url on Backbone.History.start, consistently matching root url for atRoot in History.start regardless of trailing slash 2012-07-26 11:44:07 -06:00
Jamie Rolfs
86cffe9bc2 Fixed Backbone.History.navigate and Backbone.History.start so any url changes include a slash between the root and route fragment when using pushState 2012-07-26 09:54:54 -06:00
Brad Dunbar
005173434e Fix #1377 - Saving without attrs triggers "error". 2012-07-17 18:35:25 -04:00
Chris Baynes
3a388b69cf Always trigger error when validation fails. 2012-07-05 16:39:31 +02:00
Chris Baynes
306e20ecab Trigger error even when providing a callback. 2012-07-05 15:45:01 +02:00
Brad Dunbar
c18b7763f8 Add a test and tweak whitespace for #1448. 2012-06-25 08:33:27 -04:00
Brad Dunbar
ff561ca206 Fix #1447 - model.save does not delete options.wait. 2012-06-25 07:39:48 -04:00