Commit Graph

717 Commits

Author SHA1 Message Date
Adam Krebs
90c36cadac add View#delegate as a single event listener version of delegateEvents for easier overriding 2014-03-04 13:42:40 +02:00
Adam Krebs
0cdb38b03f revert c1e62cda: add View#make back in for overriding 2014-03-04 13:42:40 +02: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
Adam Krebs
16e548397e pass along model and comparator to cloned collection. Fixes #3013 2014-03-02 23:13:17 +02:00
Casey Foster
5bc7333a2a Re #2976 Allow id values to be generated from a function given attrs 2014-02-27 10:55:53 -06:00
Brad Dunbar
f7c71996de Tweak and merge. 2014-02-25 11:22:33 -05:00
Ville Lautanala
a31d86390b Check that model exists before trying to verify uniqueness
When calling fetch with {add: false} and model does not exist in
collection, model uniqueness check tries to access id of undefined. This
verifies that model is set before checking for existing models.
2014-02-25 01:18:58 +02:00
Brad Dunbar
e88d34dd18 Tweak a bit. 2014-02-22 13:30:21 -05:00
Maksim Horbachevsky
520218769b Do not trigger router/history events if Router#execute returns false 2014-02-22 17:46:02 +03:00
Brad Dunbar
5b49aae75f Handle newlines in route params. 2014-02-20 05:53:34 -05:00
Adam Krebs
494e021a65 bump test underscore to 1.6.0 and remove shim config from test-amd.html. closes #2999 2014-02-16 02:35:42 -05:00
Casey Foster
990ab04a45 Fix #2976 Do not add multiple models with same id 2014-02-03 13:19:27 -06:00
Brad Dunbar
12fe2d0208 Add a route test for unicode paths. 2014-01-14 16:37:57 -05:00
brad dunbar
d6ac995c9f Merge pull request #2890 from braddunbar/search-params
Search params
2014-01-06 14:21:47 -08:00
Brad Dunbar
066acdc7ed Search params. 2013-11-23 13:12:01 -05:00
Ryan Mohr
814d36205c Added query string parsing support for pushState with hashChange
Also includes rename of Backbone.qs to
Backbone.History.parseQueryString.
2013-11-22 10:19:50 -10:00
Ryan Mohr
05b1df09ca Fragment now includes query string and hash for pushState.
Hash is only included when wantsHashChange.
2013-11-22 10:13:15 -10:00
Ryan Mohr
ddbdd0660c Removed fragment stripper. Changes to query params will trigger route change. 2013-11-21 14:04:03 -10:00
Ryan Mohr
6fb8e7af33 Query string now parsed if Backbone.qs defined 2013-11-21 14:03:56 -10:00
Ryan Mohr
a50317b511 All routes can now optionally be queried.
The raw query string will be passed as last argument.
2013-11-21 14:03:49 -10:00
Adam Krebs
a06d4176d9 copy most recent qunit fixtures from test/index.html so tests pass 2013-11-21 10:53:36 -05:00
Adam Krebs
c84c0f7a63 Shim for AMD underscore test dependency to export _ object 2013-11-21 10:31:29 -05:00
Adam Krebs
25d5679024 Move favicon.ico to root directory so it shows up on all pages. Closes #2883 2013-11-20 09:32:14 -05:00
Brad Dunbar
56e3221325 Tweak fixture attachment. 2013-11-19 17:37:09 -05:00
kupriyanenko
ba9eeb52ba Add support for runnig tests with jQuery-compatible libraries 2013-11-18 00:32:20 +02:00
Adam Krebs
d9faafd838 Fix AMD tests. jQuery is modern enough that we dont need a shim. Remove JSLitmus, and add in stubbed xhr environment file 2013-11-07 09:47:30 -05:00
Jeremy Ashkenas
ab5d2eb4c6 Adding AMD support to Backbone. 2013-11-07 09:18:59 -03:00
jrburke
ea29bd9119 UMD wrapper for AMD, node and browser globals. 2013-11-06 16:25:24 -08:00
Casey Foster
47331efca8 Fix #2846 nested "change" events trigger with correct options 2013-11-06 14:38:41 -06:00
Adam Krebs
bd662597ca Merge pull request #2851 from braddunbar/old-ie-tests
Fix #2850 - Use `hashChange: false` where appropriate.
2013-11-05 08:31:41 -08:00
Brad Dunbar
9c448381dc Style tweak, remove jQuery dependency. 2013-11-04 16:08:26 -05:00
Brad Dunbar
c6908e6edf Fix #2850 - Use hashChange: false where appropriate. 2013-11-04 15:40:50 -05:00
Casey Foster
01d9f0f9b1 Close #2847 assume obj as an id first in Collection#get 2013-11-04 10:16:42 -06:00
Tim Griesser
fb8dfda0ed _addReference, to mirror _removeReference 2013-10-29 19:53:54 -04:00
Jeremy Ashkenas
dba0ec83a3 Merge pull request #2829 from braddunbar/new-methods
Add new methods from underscore 1.5.2.
2013-10-25 04:48:29 -07:00
Brad Dunbar
1226e7b0e3 Remove speed test from unit test suite. 2013-10-25 07:31:56 -04:00
Brad Dunbar
2d52d8f795 Add new methods from underscore 1.5.2. 2013-10-25 07:25:43 -04:00
brad dunbar
4cb0a7ef13 Merge pull request #2827 from akre54/fix-router-test
Fix router test
2013-10-24 06:19:29 -07:00
Adam Krebs
beb3b2780b fix old form of _.bindAll and pass it a fn name 2013-10-24 09:12:42 -04:00
Adam Krebs
f0c9dcc50a upgrade test dep underscore to 1.5.2 2013-10-24 09:11:37 -04:00
Luke Rodgers
da55501da7 Use QUnit raises instead of throws.
`throws` is a future reserved word.
2013-10-17 00:01:38 -04:00
Jaynti Kanani
cc1d114860 refactor to more better fix and add some more tests 2013-10-16 11:04:22 +05:30
Jaynti Kanani
ddc05e36dd allow operation with dense array for Backbone collection 2013-10-11 18:15:01 +05:30
Jeremy Ashkenas
0a4399e3de Backbone.js 1.1.0 2013-10-10 21:57:30 -03:00
Jeremy Ashkenas
ac83197b03 Firming up returning models from add and remove, plus tests. 2013-10-10 21:21:59 -03:00
Jeremy Ashkenas
d9ac39fa64 Fixes #2428 -- set now returns added or merged models, so does add, so does push, so does unshift. 2013-10-10 17:14:13 -03:00
Jeremy Ashkenas
9c47a78f1a Test for #2666. 2013-10-10 10:18:45 -03:00
Tim Griesser
f6fa0cb87e Merge pull request #2766 from braddunbar/navigate-hash
Fix #2765 - Strip hash and query for matching.
2013-09-23 06:34:44 -07:00
Casey Foster
30f84f58a5 Fix the set stack overflow case with the at option too 2013-09-19 15:57:53 -05:00
Casey Foster
98356bd85d Style tweaks 2013-09-19 15:53:54 -05:00