Adam Krebs
c33dcdeffd
Merge branch 'method-chain' from akre54/method-chain
2014-05-27 14:52:11 -04:00
Adam Krebs
ce6780877f
add Model#chain back in. closes gh-3161
2014-05-27 14:51:50 -04:00
Brad Dunbar
5573ef72ca
Add comment, remove anchors.
2014-05-17 08:54:35 -04:00
Brad Dunbar
be176709f6
Handle incorrect hash/search values in IE6.
...
In IE6, the hash/search value will not be correct when the hash
fragment contains '?'.
2014-05-16 18:29:21 -04:00
Casey Foster
11cc0e863f
Revert "Make new tests more thorough"
...
This reverts commit f814b85db6 .
Revert "Return `id` assumption for simple polymorphic `Collection#model` factories."
This reverts commit 3f7fbdeec6 .
Conflicts:
test/collection.js
Revert "#2985 -- use 'change-id' as the event name"
This reverts commit 36e4925b9c .
Revert "Merge pull request #2985 from caseywebdev/generate-id"
This reverts commit 60b9cc1d18 , reversing
changes made to 0c1838be63 .
Conflicts:
test/collection.js
2014-04-23 12:02:09 -05: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
Adam Krebs
ccdb757d0d
Revert "Added reverse option in the collection sort method"
...
This reverts commit cea2f3fb86 .
Conflicts:
backbone.js
test/collection.js
2014-04-15 12:03:12 -04:00
Adam Krebs
285e07b6b3
cleanup reverse line
2014-04-14 12:21:31 -04:00
Ferran Basora
cea2f3fb86
Added reverse option in the collection sort method
...
Added the reverse option to be able to sort the collection in the
inverse order specified by the comparator. Useful for one argument
comparators returning string values.
For boolean and integer comparators are easy to find the inverse
function to reverse the collection but for string comparators it's
not as easy as it seems.
2014-04-09 09:45:17 +02:00
Brad Dunbar
7c4fc695b8
Simplify fragment logic.
...
* #getPath/#getHash don't need to be stripped.
* Use #navigate where appropriate.
2014-04-04 16:34:38 -04:00
Brad Dunbar
015a85f966
Add #getPath to mirror #getHash.
...
Rather than pass a "force" option to #getFragment, just
extract to a separate method.
2014-04-04 12:58:04 -04:00
Brad Dunbar
9ef54fadc2
Just slice the root.
2014-03-28 18:07:44 -04:00
Brad Dunbar
a79f7ac830
History#atRoot handles params without path.
2014-03-27 22:43:33 -04:00
Brad Dunbar
d137401359
Remove unnecessary checks and variables.
2014-03-27 14:20:04 -04:00
smelnikov
a020fbd7fb
Minor spelling fixes in comments
2014-03-27 10:52:45 -04:00
Henrik Joreteg
f45788c13b
rename to _isModel, add semi-colon, move to be next to other internal methods
2014-03-24 09:36:32 -07:00
Henrik Joreteg
3edb08519a
Potential fix for #3051 . Add isModel method to collections
2014-03-24 09:35:36 -07:00
Brad Dunbar
623207831e
Fix #3078 - Router#execute receives route name.
2014-03-23 17:36:20 -04:00
Adam Krebs
66d57adb51
Add comment about overriding _createElement
2014-03-21 10:49:00 +02:00
Nate Hunzaker
a04d7da6e4
DOM element creation should be overrideable
...
- Add test for _createElement
- Send tag name to _createElement
2014-03-20 19:34:13 -04:00
Tim Griesser
f5dba8edf4
Fixes #3028 assign collection in prepareModel
2014-03-18 17:25:57 -04:00
Jeremy Ashkenas
3994c1cb85
Merge pull request #3003 from akre54/view-native-hooks
...
View hooks for native and non-jQuery libraries
2014-03-16 19:13:18 -04:00
Jeremy Ashkenas
2543be20f2
Merge pull request #3048 from braddunbar/error
...
Pass along `textStatus` and `errorThrown`.
2014-03-15 14:32:53 -04:00
Brad Dunbar
7180d5ce0a
Add #_setAttributes and clean up #setElement.
2014-03-14 12:27:16 -04:00
Brad Dunbar
72f7da4208
A little clarification.
...
* Rename #_remove as #_removeElement.
* Add #_setAttributes instead of using #setElement.
* Slim down tests a bit.
* #delegate returns this.
2014-03-14 11:56:16 -04:00
Jimmy Yuen Ho Wong
ad39972d5d
Return undefined from delegate
2014-03-14 18:04:18 +08:00
Adam Krebs
4e8caf4471
no need for repeated comment on remove
2014-03-14 06:38:18 +04:00
Adam Krebs
3f79ea88bf
fix leftover merge conflict
2014-03-14 06:36:20 +04:00
Adam Krebs
06586f3283
shorter comment
2014-03-14 06:23:24 +04:00
Adam Krebs
c5c0d2ef0c
Merge branch 'master' into view-native-hooks
...
Conflicts:
backbone.js
2014-03-14 06:20:59 +04:00
Adam Krebs
264bd9b3da
comments cleanup
2014-03-13 20:33:48 +04:00
Adam Krebs
764eef407b
shorter undelegate
2014-03-13 15:27:35 +04:00
Adam Krebs
b59b621b29
shorter delegate method thanks to jQuery empty selector checks
2014-03-13 12:55:57 +04:00
Brad Dunbar
ab802ba4a0
Always delegate in #setElement.
2014-03-13 01:00:33 -04:00
Adam Krebs
be11f3a010
add an undelegate method to View and pass back the listener from delegate
2014-03-12 11:07:33 +04:00
Adam Krebs
20ed07489e
rename _setEl to _setElement for parity
2014-03-11 11:29:07 +04:00
Jimmy Yuen Ho Wong
b840669fa7
Rename _removeElement to _remove and test _remove for event undelegation
2014-03-10 21:18:13 +08:00
Adam Krebs
58c9a2abc6
remove undelegateEvents call from remove
2014-03-10 21:18:13 +08:00
Simon Fishel
6b0314e0e4
remove un-used local variables
2014-03-09 20:41:01 -07:00
Brad Dunbar
cbaa8d144b
Pass along textStatus and errorThrown.
2014-03-06 17:07:53 -05:00
Casey Foster
3f7fbdeec6
Return id assumption for simple polymorphic Collection#model factories.
...
Also, add tests to make sure it doesn't break in the future.
2014-03-05 07:48:27 -06:00
Adam Krebs
986540f46f
swap argument ordering to setElement, boolean goes last
2014-03-05 09:16:47 +02:00
Adam Krebs
c5aa603b48
rephrase _setEl comment
2014-03-05 09:16:42 +02:00
Adam Krebs
7e95b9cc2b
short-circuit on attributes
2014-03-05 01:07:24 +02:00
Adam Krebs
7339bed6c5
Merge branch 'master' into view-native-hooks
2014-03-04 23:00:05 +02:00
Brad Dunbar
b362ea0fcc
Fix #3015 - History#stop cleans up iframe.
2014-03-04 11:35:31 -05:00
Adam Krebs
f13181fbc0
rename _createContext to _setEl
2014-03-04 13:42:42 +02:00
Jimmy Yuen Ho Wong
fd6425441d
Rename delegate's method param to listener to tell people it's ok to attach an unbound function as handler
2014-03-04 13:42:42 +02:00
Adam Krebs
446ee523fa
save a var in _createContext
2014-03-04 13:42:42 +02:00
Adam Krebs
e30e6b9344
small cleanup in _createContext
2014-03-04 13:42:42 +02:00