Commit Graph

679 Commits

Author SHA1 Message Date
Jeremy Ashkenas
57e1e7d083 Merge pull request #1612 from joshvermaire/chain_navigation
allow for chaining of router navigation
2012-09-28 12:15:04 -07:00
Jeremy Ashkenas
9ba384627c Merge pull request #1667 from braddunbar/add
Fix #1604 - Refactor add, remove index option.
2012-09-26 11:53:45 -07:00
Brad Dunbar
a45ab0095f Remove dead code.
Since the root will always contain a leading slash and
the fragment will never contain a leading slash, the
fragment will never start with the root.
2012-09-24 14:37:18 -04:00
Brad Dunbar
142d2ac832 Fix #1604 - Refactor add, remove index option.
* Avoid temporary constructs by splicing duplicates during traversal.
* Remove `index` option.
* Avoid creating empty options.
2012-09-22 08:59:37 -04:00
Brad Dunbar
a424341355 Fix #1653 - Ensure that History can be used outside of the browser.
* Dispense with options argument.
* Use `window` to retrieve location/history by default.
* Don't throw outside of the browser, allowing location and
  history to be replaced appropriately.
2012-09-17 14:38:48 -04:00
Jeremy Ashkenas
161c3a21d7 Merge pull request #1656 from braddunbar/sortby-groupby
Fix #1655 - sortBy & groupBy use attributes.
2012-09-17 08:35:18 -07:00
Brad Dunbar
c344201f6e Fix #1655 - sortBy & groupBy use attributes. 2012-09-17 11:31:46 -04:00
Jeremy Ashkenas
ff0ddbcee2 Merge pull request #1650 from braddunbar/#
Fix #1649 - Set location.hash with a leading #.
2012-09-17 08:26:34 -07:00
Jeremy Ashkenas
8ea7d9a01d Merge pull request #1644 from braddunbar/default-options
Refactor reset/sort.
2012-09-14 10:49:57 -07:00
Brad Dunbar
07b6760a87 Style - Split long line into two. 2012-09-14 11:02:30 -04:00
Brad Dunbar
7c993bd3fd Fix #1649 - Set location.hash with a leading #. 2012-09-14 10:56:50 -04:00
Brad Dunbar
85fca58bb9 Refactor reset/sort.
* Avoid creating unnecessary objects/arrays.
* Add test for sort-style comparator context.
2012-09-14 08:13:33 -04:00
Brad Dunbar
36a733a8bc Tweak string comparator implementation. 2012-09-14 08:05:41 -04:00
Brad Dunbar
8fdcaf207a Merge pull request #1587 from krawaller/master.
Conflicts:
	test/collection.js
2012-09-14 07:19:57 -04:00
KungD
8f29954011 removed prefix logic 2012-09-14 07:22:22 +02:00
KungD
4707b02056 removed automatic sorting in anticipation of sort option to .set 2012-09-12 18:27:10 +02:00
KungD
342a525e12 automatic resort when sorting attribute changes 2012-09-12 06:43:55 +02:00
KungD
43491f6f28 minor performance refactor 2012-09-12 06:09:48 +02:00
Brad Dunbar
c19459a816 Remove unnecessary frag variable. 2012-09-05 16:06:05 -04:00
Brad Dunbar
8a7076acf8 Fix #1619 - Streamline rootStripper implementation. 2012-09-04 16:19:24 -04:00
Jerome Lecomte
1efeae70de fix #1619: fix navigation when root is empty
broken by commit d015ef1118
2012-09-04 14:31:30 -04:00
Brad Dunbar
d015ef1118 pushState/replaceState takes a relative url. 2012-09-04 09:53:46 -04:00
Jeremy Ashkenas
d52c612b07 Merge pull request #1611 from braddunbar/collection-proxy
Avoid creation of extra array in collection proxy.
2012-09-04 05:50:35 -07:00
James Campos
1206fbe513 update comment 2012-09-03 15:41:33 -07:00
Josh Vermaire
9a58173c63 allow for chaining of router navigation 2012-09-02 16:46:33 -07:00
Brad Dunbar
f8b5f7fad0 Avoid creation of extra array in collection proxy. 2012-09-02 11:35:41 -04:00
Brad Dunbar
10db0ab258 getValue -> _.result 2012-08-31 12:44:01 -04:00
KungD
a8388e2757 refactored to replace comparator string with the generated function instead of generating on every sort call 2012-08-31 12:05:03 +02:00
Brad Dunbar
f49272e19e Fix variable scope error, provide test. 2012-08-29 18:41:08 -04:00
Brad Dunbar
1f3f45252f Consolidate sync/error events in Backbone.sync. 2012-08-29 16:14:48 -04:00
Brad Dunbar
4335fa885a Merge pull request #1472 from 'contiamo/master'. 2012-08-29 14:57:11 -04:00
Brad Dunbar
d9f1e00f9f No need to default options to {}. 2012-08-29 10:40:53 -04:00
Brad Dunbar
2af9f4d542 Merge pull request #1445 from 'emorikawa/master'. 2012-08-29 10:37:57 -04:00
KungD
8fafad1208 changed suffix syntax to prefix 2012-08-28 21:21:58 +02:00
brad dunbar
355c48011a Merge pull request #1590 from braddunbar/extend
Refactor extend.
2012-08-28 09:37:53 -07:00
Brad Dunbar
f36f11e5e3 Use Surrogate instead of Prototype. 2012-08-28 12:34:23 -04:00
Brad Dunbar
62960e787d Refactor extend.
* Use coffeescript style `this.constructor = child`.
* Extend child with parent and static props in one _.extend.
* Use _.has in place of hasOwnProperty.
2012-08-26 19:23:22 -04:00
KungD
b9e5c1e69e variable name cleanup 2012-08-26 18:49:46 +02:00
KungD
d97b88447d allowing propname arg as collection comparator 2012-08-26 18:38:16 +02:00
Brad Dunbar
e70a38ef15 Fix #1584 - Create default Backbone.history. 2012-08-26 10:11:58 -04:00
James Campos
4c6f1926a2 use inherits helper directly 2012-08-21 13:09:48 -07:00
James Campos
3c67364405 [style] coll -> collection 2012-08-21 07:00:08 -07:00
Jeremy Ashkenas
cee30cf48c Merge pull request #1557 from iros/collection.parse
Initializing collection from raw data doesn't pass it through parse method
2012-08-20 07:44:57 -07:00
Brad Dunbar
952fb884f3 Ensure that Collection proxies underscore aliases.
Added the following aliases:

* collect
* foldl
* inject
* foldr
* head
* take
* tail
2012-08-17 22:42:55 -04:00
Irene Ros
980f60e050 removing extra options check 2012-08-16 17:19:29 -04:00
Irene Ros
330f2ba182 adding model parsing for collections on initialization of a collection from raw data 2012-08-16 17:13:02 -04:00
Brad Dunbar
971a5fb383 Add View#dispose. 2012-08-15 16:31:43 -04:00
Genadi Samokovarov
51387ebc36 getValue for View::className and View::id 2012-08-02 01:18:46 +03:00
Jeremy Ashkenas
b75c3e1e70 Merge pull request #1512 from braddunbar/trigger-args-loop
Fix #1511 - Add a comment explaining performance concerns in `trigger`.
2012-07-27 08:27:34 -07:00
Brad Dunbar
9a81468be7 Tweak root normalization. 2012-07-27 10:38:52 -04:00