Casey Foster
83c81005fe
Re #3029 Guard against unavailable edge underscore proxies
2014-02-28 12:26:26 -06:00
Jeremy Ashkenas
1853297cc9
Merge pull request #3006 from akre54/history-native-hooks
...
History native calls
2014-02-27 13:05:33 -05:00
Brad Dunbar
49123e9ab1
Don't be clever.
2014-02-26 17:05:50 -05:00
Brad Dunbar
e6fc18f299
A facelift for Events#off.
...
* Reduce nesting by bailing out early when there is no action to take.
* Rename abbreviated variables for readability.
* Add comments and spacing.
2014-02-26 16:31:11 -05:00
Brad Dunbar
64ff32f492
More consistency in loops.
2014-02-26 14:51:35 -05:00
Brad Dunbar
2e82a1e638
A little cleanup of Collection#set.
...
* Remove variable with only one reference.
* Consistent loops.
* Use `#slice` instead of clone when guaranteed array.
2014-02-25 22:22:38 -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
Jimmy Yuen Ho Wong
674f101ad8
Create iframe conditional on options and hashchange and pushstate support
2014-02-22 22:48:18 +08: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
f9f7131a06
Add documentation to the iframe approach.
2014-02-21 11:23:49 -05:00
Brad Dunbar
8dc036c324
Add a comment about clearInterval.
2014-02-20 17:35:38 -05:00
Jeremy Ashkenas
53f77901a4
Backbone 1.1.2
2014-02-20 16:34:01 -05:00
Jeremy Ashkenas
01f7f9b4c7
fixes #3004 , edge case for titanium
2014-02-20 16:26:27 -05:00
Brad Dunbar
b1bcf0a9c0
Remove onpopstate check.
2014-02-20 06:17:30 -05:00
Brad Dunbar
5b49aae75f
Handle newlines in route params.
2014-02-20 05:53:34 -05:00
Adam Krebs
feeab3faa6
Merge pull request #4 from braddunbar/history
...
Check `documentMode` and combine checks.
2014-02-19 23:59:11 -05:00
Adam Krebs
91ef885137
improve inline comments
2014-02-19 23:56:49 -05:00
Brad Dunbar
2c50dc52e8
Check documentMode and combine checks.
2014-02-19 11:30:11 -05:00
Brad Dunbar
18e15e2a9a
Remove isExplorer RegEx.
2014-02-19 10:43:15 -05:00
Brad Dunbar
87dce15d3c
Pass useCapture to removeEventListener.
2014-02-19 10:28:26 -05:00
Brad Dunbar
573070fde9
Remove _oldIE variable.
...
* No need for `_oldIE` when we can just use `this.iframe`.
* Added `this._hasHashchange`.
2014-02-19 10:19:42 -05:00
Adam Krebs
4ab05ad5ff
check for onpopstate in window instead of window.onpopstate
2014-02-19 09:14:38 -05:00
Adam Krebs
5d305bf72b
remove first window argument from add/removeEventListener
2014-02-19 09:14:38 -05:00
Adam Krebs
0101416800
cleanup oldIE sniff code and iframe creation per @jdalton
2014-02-19 09:14:36 -05:00
Adam Krebs
111599736a
add window.popstate checks for IE7 backwards compat
2014-02-19 09:00:17 -05:00
Adam Krebs
6ed0cdd8d2
add in addEventListener shim from @wyuenho ( 0844b00c) to remove jQuery
...
dependency in History
2014-02-19 08:58:43 -05:00
Jeremy Ashkenas
f1479e62eb
Fixes #2997 — don't bother trying to load jQuery on the server-side.
2014-02-14 17:39:07 -05:00
Jeremy Ashkenas
6ccc1583e7
Backbone.js 1.1.1
2014-02-13 14:57:41 -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
1f5340b36a
Merge branch 'branch-1.1.0' of https://github.com/skyhood/backbone
...
Conflicts:
backbone.js
2014-01-14 16:30:15 -05:00
Elisa Oinonen
2e3eed8d95
decode location.pathname
2014-01-09 15:47:39 +02:00
brad dunbar
d6ac995c9f
Merge pull request #2890 from braddunbar/search-params
...
Search params
2014-01-06 14:21:47 -08:00
Tim Griesser
8c10b4cedb
Minor code tweaks to pass linting
2014-01-05 09:53:23 -05:00
Tim Griesser
d381ee92fd
Move delete back to model.remove
...
Reverts part of #2838 to prevent unexpected
behavior in collection/model remove events.
2013-12-18 12:06:36 -05:00
Brad Dunbar
2599c52e71
Simplify Model#url, split long line.
2013-12-10 17:45:28 -05:00
Jeremy Ashkenas
dc779e2182
Tweaking #2905 -- long line styles.
2013-12-03 08:22:18 -08:00
Brad Dunbar
b966c94a38
Split up long lines for style and readability.
2013-12-03 11:06:00 -05:00
Brad Dunbar
791033dc1a
Add Router#execute hook.
2013-11-25 13:20:41 -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
9436340725
remove shadowed _. Use only the UMD loader for deps
2013-11-21 10:42:57 -05:00
Blake Embrey
6dcec29831
Make isNew use the has functionality to avoid forcing multiple odd overrides.
2013-11-14 23:07:19 -05:00
Jeremy Ashkenas
9280d855e3
Fixes #2824 — create() triggering an improper parse()
2013-11-09 10:57:48 -03:00
Jeremy Ashkenas
888959f2ba
Merge branch 'master' of https://github.com/jashkenas/backbone
2013-11-07 12:56:54 -03:00
Jeremy Ashkenas
d1de6e8911
Fixes #2836 -- default to id if there's funny business going on with a missing idAttribute
2013-11-07 12:56:50 -03:00