James Campos
1206fbe513
update comment
2012-09-03 15:41:33 -07:00
Brad Dunbar
10db0ab258
getValue -> _.result
2012-08-31 12:44:01 -04: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
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
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
Brad Dunbar
037b3f529c
Fix #1511 - Add a comment explaining performance concerns in trigger.
2012-07-27 08:53:25 -04:00
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
Chris Baynes
3a388b69cf
Always trigger error when validation fails.
2012-07-05 16:39:31 +02:00
Chris Baynes
306e20ecab
Trigger error even when providing a callback.
2012-07-05 15:45:01 +02: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
Evan Morikawa
66a79f1496
isValid now takes an optional 'options' parameter that gets passed through to validate. Needed so one can test validation under a variety of contexts
2012-06-23 17:28:19 -04: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