126 Commits

Author SHA1 Message Date
Craig Martin
e0a5cc75ba eliminate shadowed variable declarations
Also, add eslint rule no-shadow to enforce
2016-01-19 12:34:08 -05:00
Jordan Eldredge
be1f2a87c5 Add ESLint rule: eqeqeq
Underscore uses this triple-equals syntax for its module loader.
2015-12-28 21:37:17 -08:00
Jordan Eldredge
d91405d54f Enable ESLint rule: 'quotes' for tests
These changes were done automatically by ESLint's `--fix` tag. Thanks ESLint!
2015-12-18 13:27:48 -08:00
Jordan Eldredge
2ae117a7cb Add ESLint rule: key-spacing 2015-12-16 10:00:19 -08:00
Jordan Eldredge
b0a6274290 Non-controversial ESLint whitespace rules
In an attempt to bring our ESLint rules closer to those in Underscore, I've
started by adding some whitespace rules which don't involve any significantly
opinionated changes.
2015-12-16 07:43:26 -08:00
Kevin Partington
9c681906a4 Tests: Migrated unit tests to QUnit 2.0 syntax. (fixes #3813) 2015-10-06 23:35:30 -05:00
jdalton
74427c9e76 Remove the only _.bindAll use. 2015-06-09 11:01:57 -07:00
Justin Ridgewell
f79e0bcf53 Fix failing IE6 test
It was a false positive. Our “location” parsing uses an A tag, which
doesn’t always work the way the real location parsing does.
2015-06-02 12:26:41 -04:00
Brad Dunbar
1eb03c8354 Clean up. 2015-04-28 07:17:15 -04:00
Brad Dunbar
c8968853a2 Simplify. 2015-04-28 07:13:54 -04:00
Brad Dunbar
24daf350e4 Use more descriptive test names. 2015-04-28 06:56:40 -04:00
Brad Dunbar
21180e7234 Handle roots with regex characters. 2015-04-28 06:55:10 -04:00
Brad Dunbar
c1e70a28aa If the root doesn't match, no routes can match. 2015-04-28 06:34:28 -04:00
Brad Dunbar
6c63ef2cb5 Set the pathname explicitly for phantomjs. 2015-03-03 07:50:31 -05:00
Jeremy Ashkenas
e109f6d3e7 Merge pull request #3434 from braddunbar/decode-fragment
Decode unicode escapes without decoding `%25`.
2015-02-23 11:48:55 -05:00
Adam Krebs
d52b5f92ae Revert "History's root" 2015-02-17 17:41:06 -05:00
Justin Ridgewell
e58e6f0e41 Fix issue with atRoot matching.
This is to support legacy:

When an app is served at `/root`, but registers its root as `/root/`, we
should still consider the current location as the root when
transitioning from a pushState enabled browser to a hashChange browser.
2015-01-12 18:38:20 -05:00
Justin Ridgewell
50f364c111 Add test case for root with mandatory trailing slash 2015-01-12 16:50:54 -05:00
Justin Ridgewell
ab304871d7 Simplify History.root 2015-01-12 15:22:32 -05:00
Brad Dunbar
7af3329175 Ensure a search test fails when appropriate. 2015-01-04 11:38:51 -05:00
Brad Dunbar
7ed58e4d39 Decode unicode escapes without decoding %25.
Fixes #3426.
2015-01-04 11:09:59 -05:00
Brad Dunbar
7e67491049 Leave out unnecessary trailing slash. 2014-11-26 16:49:50 -05:00
Brad Dunbar
efb60cc223 Ensure iframe hash is set. 2014-11-16 10:16:26 -05:00
Brad Dunbar
ea9f5b8c47 Transition with search params. 2014-10-24 11:42:19 -04:00
Brad Dunbar
23599e7472 Update trailing slash for search params. 2014-10-23 18:16:29 -04:00
Brad Dunbar
1ed87107cb Add test for urls in params. 2014-06-05 00:35:24 -04:00
Brad Dunbar
5821bc03a3 Decode the fragment before comparing.
Since #getFragment decodes the fragment, #navigate should
match this behavior (using decodeURI, not decodeURIComponent).
2014-04-17 13:10:11 -04:00
Brad Dunbar
a79f7ac830 History#atRoot handles params without path. 2014-03-27 22:43:33 -04:00
Brad Dunbar
623207831e Fix #3078 - Router#execute receives route name. 2014-03-23 17:36:20 -04: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
Brad Dunbar
12fe2d0208 Add a route test for unicode paths. 2014-01-14 16:37:57 -05: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
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
Adam Krebs
beb3b2780b fix old form of _.bindAll and pass it a fn name 2013-10-24 09:12:42 -04:00
Jeremy Ashkenas
9c47a78f1a Test for #2666. 2013-10-10 10:18:45 -03:00
Brad Dunbar
f0572b0e51 Fix #2765 - Strip hash and query for matching. 2013-09-19 09:54:57 -04:00
Adam Krebs
2bd5df99c5 remove $(document).ready(...) from tests 2013-09-16 10:51:32 -04:00
Brad Dunbar
15b7d77003 Avoid calling pushState with an empty url. 2013-07-05 17:20:35 -04:00
Brad Dunbar
151bd73d26 Never include trailing slash on the root. 2013-07-05 16:00:45 -04:00
Brad Dunbar
0a662d6974 Fix #2656 - Trailing slash on root. 2013-07-05 15:40:35 -04:00
Brad Dunbar
5f93ba79fa Do not load the hash as a fallback. 2013-05-29 14:59:53 -04:00