Commit Graph

2453 Commits

Author SHA1 Message Date
Jimmy Yuen Ho Wong
d78fb34aff Prefix all hooks with _ and introduce _undelegate 2014-03-04 13:42:40 +02:00
Jimmy Yuen Ho Wong
5f66f9af18 Rename make to _createContext and have _ensureElement and setElement delegate to it 2014-03-04 13:42:40 +02:00
Jimmy Yuen Ho Wong
ad44cb41b6 Further isolate $.remove by exposing removeElement in case subclasses forgot to clean up 2014-03-04 13:42:40 +02:00
Jimmy Yuen Ho Wong
3369bf486b Speed up method calls in delegateEvents and delegate 2014-03-04 13:42:40 +02:00
Jimmy Yuen Ho Wong
be1cba3331 Move delegate up and move check into undelegateEvents 2014-03-04 13:42:40 +02:00
Adam Krebs
4e5b28221c save two lines in View#make: jquery handles nulls nicely 2014-03-04 13:42:40 +02:00
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
Adam Krebs
41283909e6 Merge pull request #3037 from rsofaer/update-docs-rails-4
Change the reference to rails in the 'sync' docs to reflect Rails 4
2014-03-04 02:20:17 +02:00
Raphael Sofaer
7a52396a1b Change the reference to rails in the 'sync' docs to reflect Rails 4 2014-03-03 11:11:18 -08:00
Jeremy Ashkenas
36e4925b9c #2985 -- use 'change-id' as the event name 2014-03-03 13:00:04 -05: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
Jeremy Ashkenas
0c1838be63 Merge pull request #3032 from akre54/clone-opts
Pass along model and comparator to cloned collection
2014-03-03 08:23:55 -05:00
Adam Krebs
16e548397e pass along model and comparator to cloned collection. Fixes #3013 2014-03-02 23:13:17 +02:00
brad dunbar
bdc5c63944 Merge pull request #3029 from Crisfole/update/underscore
Add new `_.partition`
2014-02-28 13:59:42 -05:00
Jeremy Ashkenas
7612699f52 Merge pull request #3030 from caseywebdev/_-guard
Re #3029 Guard against unavailable edge underscore proxies
2014-02-28 13:48:19 -05:00
Casey Foster
83c81005fe Re #3029 Guard against unavailable edge underscore proxies 2014-02-28 12:26:26 -06:00
Christopher Pfohl
fa7e617edf Add new _.partition 2014-02-28 08:50:09 -05:00
Jeremy Ashkenas
1853297cc9 Merge pull request #3006 from akre54/history-native-hooks
History native calls
2014-02-27 13:05:33 -05: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
Adam Krebs
16b6f1ee23 Merge pull request #10 from wyuenho/history-native-hooks
Create iframe conditional on options and hashchange and pushstate support
2014-02-27 08:55:56 +02:00
Jeremy Ashkenas
d4b5f590f8 Merge pull request #3026 from braddunbar/off
A facelift for `Events#off`.
2014-02-26 18:23:32 -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
Jeremy Ashkenas
0a5ffe817a Merge pull request #3025 from braddunbar/loops
More consistency in loops.
2014-02-26 15:08:47 -05:00
Brad Dunbar
64ff32f492 More consistency in loops. 2014-02-26 14:51:35 -05:00
Jeremy Ashkenas
261b94aa4c Merge pull request #3023 from braddunbar/set-cleanup
A little cleanup of `Collection#set`.
2014-02-26 08:19:36 -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
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
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
Adam Krebs
dc6a697779 Merge pull request #9 from braddunbar/history
Resolve merge conflicts, add documentation.
2014-02-21 11:30:24 -05:00
Brad Dunbar
f9f7131a06 Add documentation to the iframe approach. 2014-02-21 11:23:49 -05:00
Jeremy Ashkenas
a717a71a0f Merge pull request #3011 from braddunbar/clear-interval
Add a comment about clearInterval.
2014-02-20 17:59:35 -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 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
Adam Krebs
a91f6ac900 Merge pull request #6 from braddunbar/history
Remove `onpopstate` check.
2014-02-20 08:10:04 -05:00
Jeremy Ashkenas
07f60793c6 Merge pull request #3010 from braddunbar/newline
Handle newlines in route params.
2014-02-20 07:40:03 -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
Adam Krebs
e5eeea4a0c Merge pull request #3 from braddunbar/history
Remove `isExplorer` RegEx.
2014-02-19 10:49:20 -05:00
Brad Dunbar
18e15e2a9a Remove isExplorer RegEx. 2014-02-19 10:43:15 -05:00
Adam Krebs
501d7bf67b Merge pull request #2 from braddunbar/history
Remove `_oldIE` variable.
2014-02-19 10:30:32 -05:00
Brad Dunbar
87dce15d3c Pass useCapture to removeEventListener. 2014-02-19 10:28:26 -05:00