Commit Graph

625 Commits

Author SHA1 Message Date
Jamie Rolfs
3d6b20ca7a Normalizing root url on Backbone.History.start, consistently matching root url for atRoot in History.start regardless of trailing slash 2012-07-26 11:44:07 -06:00
Jamie Rolfs
86cffe9bc2 Fixed Backbone.History.navigate and Backbone.History.start so any url changes include a slash between the root and route fragment when using pushState 2012-07-26 09:54:54 -06:00
Brad Dunbar
ddefd21167 Consistent use of === and void 0. 2012-07-18 14:13:14 -04:00
Genadi Samokovarov
9b7dd43c8f Put short if statements on one line and add some whitespace 2012-07-18 13:57:03 +03:00
tbranyen
5f57f8cca4 reduced extends to single return 2012-07-16 21:57:40 -04:00
Dmitriy Fabrikant
131e169c93 removed redundant extend 2012-07-16 16:10:27 -04:00
Brad Dunbar
d8477f4b45 Revert #1353 for further discussion.
This reverts commit 7054ca4a2a, reversing
changes made to 7828d6d22d.
2012-06-25 17:55:19 -04:00
Brad Dunbar
c18b7763f8 Add a test and tweak whitespace for #1448. 2012-06-25 08:33:27 -04:00
Brad Dunbar
6a8232a36e Merge pull request #1448 from ganmor/sortfix.
Move sort after merge.
2012-06-25 08:26:47 -04:00
Brad Dunbar
ff561ca206 Fix #1447 - model.save does not delete options.wait. 2012-06-25 07:39:48 -04:00
ganmor
6df4874f69 Move sort after merge 2012-06-25 10:37:46 +02:00
Brad Dunbar
af5e8f5c72 Fix #1433 - Do not save invalid models. 2012-06-22 08:02:00 -04:00
Jeremy Ashkenas
bc931c31e4 Fixing Routing. 2012-06-18 10:14:46 -04:00
Jeremy Ashkenas
2eeaa4a716 merged 2012-06-18 09:50:12 -04:00
Jeremy Ashkenas
76de397c64 Merge pull request #1414 from braddunbar/root-trailing-slash
Fix #1387 - getFragment trims trailing slash before removing root.
2012-06-18 06:49:15 -07:00
Brad Dunbar
be5d4fd769 Fix #1366 - Root should not be prepended to history.fragment. 2012-06-16 12:45:08 -04:00
Brad Dunbar
b6b9ec72ff Fix #1365 - Destroy: new models execute success callback. 2012-06-16 11:33:05 -04:00
Brad Dunbar
54ec530eea Provide a default implementation of sync. 2012-06-16 10:55:03 -04:00
Brad Dunbar
4286e0c5ec Fix #1403 - Trigger "sync" unconditionally. 2012-06-16 10:45:01 -04:00
Casey Foster
f24ca5a0ed #1412 - Trigger "sync" event for fetch also 2012-06-15 07:33:38 -07:00
Brad Dunbar
27e9e4743c Fix #1387 - getFragment trims trailing slash before removing root.
* The root should not be stripped when dealing with hashes.
* The trailing slash can be removed since the fragment is
  stripped anyway.  This could probably be done only once
  in `start`, but is saved for a later patch.
* The mock pathname needs to prepend a slash in IE since
  anchor.pathname does not contain it.
2012-06-15 00:05:03 -04:00
David Marble
6a39bfd8f3 Move collection assignment a few lines up so this.collection is available in Model.parse 2012-06-13 14:52:42 -04:00
Brad Dunbar
2e2e9f7e96 Use mock location to test Backbone.history. 2012-06-12 11:57:50 -04:00
brad dunbar
a8553e1774 Merge pull request #1380 from DjebbZ/master
Small typo in comment
2012-06-06 06:48:24 -07:00
DjebbZ
6454074dcd Small typo in comment : missing "`". 2012-06-06 15:35:08 +03:00
brad dunbar
d7e77b1af8 Merge pull request #1327 from TheBits/silent-merge
Merge model with silent flag
2012-06-06 04:36:10 -07:00
Brad Dunbar
85bd0b5132 Revert "Revert "Revert "Fix #1366 - Do not prepend root to history.fragment."""
This reverts commit ba980801ce.
2012-06-04 13:00:43 -04:00
Brad Dunbar
ba980801ce Revert "Revert "Fix #1366 - Do not prepend root to history.fragment.""
This reverts commit ceb68d7314.
2012-06-04 12:49:17 -04:00
Jeremy Ashkenas
ceb68d7314 Revert "Fix #1366 - Do not prepend root to history.fragment."
This reverts commit 2b0ad77f3b.
2012-06-04 10:52:22 -04:00
Jeremy Ashkenas
97379d6694 Merge pull request #1372 from braddunbar/fragment
Fix #1366 - Do not prepend root to history.fragment.
2012-06-04 07:48:21 -07:00
brad dunbar
7054ca4a2a Merge pull request #1353 from braddunbar/destroy
Fix #1339 - Add Backbone.View#destroy.
2012-06-03 14:44:08 -07:00
Brad Dunbar
2b0ad77f3b Fix #1366 - Do not prepend root to history.fragment. 2012-06-02 10:51:11 -04:00
Félix Horro Pita
6250b6353a Pass options to success function on save, create and destroy. 2012-05-30 13:14:41 +02:00
Félix
b371d56669 Pass fetch options to success function (as error function does).
It will allow to use context (an other options) in callback function on success.
2012-05-29 12:59:04 +03:00
Brad Dunbar
dad7e2757e Fix #1339 - Add Backbone.View#destroy. 2012-05-28 16:53:42 -04:00
brad dunbar
b6dc6a224e Merge pull request #1342 from caseywebdev/master
Allow Collection to receive falsy `comparator` to override default
2012-05-24 09:26:40 -07:00
Sam Breed
98e01bbc4a adding test for falsy comparators (#1342) 2012-05-23 23:53:13 -06:00
Jeremy Ashkenas
f86674d6a7 Fixes #1343, adding Collection#slice 2012-05-23 17:13:48 -04:00
Casey Foster
6d21c05b18 Allow Collection to receive falsy comparator to override default 2012-05-23 08:50:33 -07:00
Sergey Mezentsev
ead3d48e9f Reorder code in Collection.add 2012-05-17 19:24:26 +04:00
Brad Dunbar
04bd18e38e Jettison setDomLibrary in favor of Backbone.$. 2012-05-15 17:45:58 -04:00
Jeremy Ashkenas
020ed1018a smart @braddunbar simplification. 2012-05-15 17:38:44 -04:00
Jeremy Ashkenas
1a767d6abe Changed mind. More breathing room. 2012-05-15 17:34:39 -04:00
Jeremy Ashkenas
b3425b8411 Fixing Backbone.ajax implementation. 2012-05-15 17:33:56 -04:00
lennym
ba249903e6 Copied Backbone.ajax from global DOM lib at runtime to allow calls to Backbone.setDomLibrary to take effect and improve compatibility with test frameworks that mock $.ajax 2012-05-15 17:40:19 +02:00
Brad Dunbar
192b1c0673 Events.off uses reverse iteration to avoid altering indicies.
See comments on 83a24bb2d5.
2012-05-14 11:57:57 -04:00
Brad Dunbar
83a24bb2d5 Fix #1310 - off does not skip consecutive events. 2012-05-14 07:53:01 -04:00
Jeremy Ashkenas
7d8c51a3c3 Merge pull request #1293 from wookiehangover/issue1292
Fix #1292 - unexpected results when passing undefined to Model.hasChanged
2012-05-10 14:55:01 -07:00
Brad Dunbar
0ea9f47b35 Refactor _prepareModel. 2012-05-08 06:54:14 -04:00
Sam Breed
638af0f68e updating model.previous arguments check to match hasChanged 2012-05-07 20:29:24 -06:00