Jeremy Ashkenas
dd83f2057c
Fixes #788
2011-12-19 11:20:37 -05:00
Magnus Holm
67f689df9c
Col.fetch() should create models with parse:true:
...
This is done in two steps:
1. Col.fetch() now defaults to parse:true
2. Col.reset() and _prepareModel now passes along
parse:true.
This means that Col.add() also accepts the
parse:true option.
2011-12-04 18:27:36 +01:00
Magnus Holm
bdbcfa9da2
parse:true runs the attributes through parse():
...
`new Model(attr, {parse:true})` will now call
Model.prototype.parse(attr). This is useful if
you want to create a model out of an object
structure from an external server.
2011-12-04 17:48:47 +01:00
Jeremy Ashkenas
9fc7443d34
merging in #758 -- although the API leaves something to be desired.
2011-11-23 17:32:04 -05:00
Jeremy Ashkenas
6687cde196
merging in #739 -- a massive simplification.
2011-11-23 16:48:39 -05:00
Jeremy Ashkenas
bc9fbcbefb
Merge branch 'set-unset-clear' of https://github.com/braddunbar/backbone
2011-11-23 15:57:24 -05:00
Jeremy Ashkenas
1332246b8f
merging in #750 -- support for replaceSTate
2011-11-23 14:59:14 -05:00
Jeremy Ashkenas
30a89ac5cc
Merge branch 'replaceState' of https://github.com/lmp/backbone
2011-11-23 14:03:39 -05:00
Jeremy Ashkenas
66800f5c8e
Upgrading our Underscore.js test dep to 1.2.2
2011-11-23 13:30:07 -05:00
Aidan Feldman and Tim Harper
df7c279dc2
Navigate learns to change the route without adding a history entry
...
Also, instead of accepting a single boolean for trigger, the navigate
method now accepts an options object, with the following options:
- replace
- trigger
If you pass true instead of an options object, it's interpreted as
{trigger: true}
* pushState support - Aidan Feldman
* hashtag support and IE7 support - Tim Harper
* Tests were a joint effort.
2011-11-17 15:42:29 -07:00
Brad Dunbar
93ad86cfa9
add tests for #730 and #565
2011-11-10 13:45:27 -05:00
Brad Dunbar
66d209d4f9
unit test for ignore values when unsetting
2011-11-10 10:10:17 -05:00
Brad Dunbar
3f004196bd
assert that change is only triggered once
2011-11-09 14:05:58 -05:00
Brad Dunbar
20a2e3408a
set _changing = false only if !alreadyChanging
2011-11-09 13:56:43 -05:00
Jeremy Ashkenas
35600be547
Merge branch 'events' of https://github.com/braddunbar/backbone
2011-10-31 11:49:04 -04:00
Jeremy Ashkenas
39061ff48a
Merge branch 'master' of github.com:documentcloud/backbone
2011-10-31 11:00:02 -04:00
Brad Dunbar
de2430554e
implement callbacks as linked list
2011-10-31 07:15:03 -04:00
Tim Branyen
2156b9e28f
Merge pull request #699 from jasonm/jm-bump-qunit
...
Update QUnit to 1.1.0 (newest stable)
2011-10-29 14:03:11 -07:00
Tim Branyen
9982e314cb
Merge pull request #700 from iros/673
...
#673 - Adding index as a property on the options object that gets passed
2011-10-29 13:30:58 -07:00
Irene Ros
80769fcf99
#673 - Adding index as a property on the options object that gets passed when the add/remove callbacks get triggered on a collection.
2011-10-29 16:29:18 -04:00
Tim Branyen
fbffb36819
Merge pull request #698 from alexgraul/master
...
Fix for Issue #690
2011-10-29 13:21:15 -07:00
Jason Morrison
6717e42849
Bump jQuery test suite dependency from 1.5 to 1.6.4
2011-10-29 16:18:19 -04:00
Jason Morrison
c336e4b3d5
Update QUnit
2011-10-29 16:12:36 -04:00
Jeremy Ashkenas
b2407efb43
Merge branch 'router_no_callback' of https://github.com/derickbailey/backbone
2011-10-29 15:53:32 -04:00
Alex Graul
970ce0762c
fix for wrapped errors inside success callbacks on save, issue #690
2011-10-29 15:51:41 -04:00
Jeremy Ashkenas
c37e2f9bd1
Merge branch 'master' of https://github.com/alexgraul/backbone
2011-10-29 13:28:02 -04:00
Alex Graul
567e0a3c2d
Fix for adding models with custom set methods to collections, issue #539
2011-10-29 13:23:01 -04:00
Jeremy Ashkenas
b4f680e371
Merge branch 'master' of https://github.com/iros/backbone
2011-10-29 12:39:38 -04:00
Irene Ros
2be771412b
Setting _unsetAttributes to false in unset rather than changedAttributes so that the unset attributes aren't lost on subsequent calls of changedAttributes. Added test to verify this behavior.
2011-10-29 12:27:46 -04:00
Irene Ros
f499fc8cfc
Merge branch 'master' of github.com:spmason/backbone
2011-10-29 11:39:35 -04:00
Jeremy Ashkenas
32ae113298
upgrading to the latest version of Underscore.
2011-10-29 11:24:36 -04:00
Derick Bailey
6799c8e8be
added a test and code to allow a router to define a route with no callback method for the route name
2011-10-06 19:09:53 -05:00
Les Hill
ef40512d84
Rename to undelegateEvents
...
As suggested by @jashkenas https://github.com/documentcloud/backbone/pull/620#issuecomment-2132400
2011-09-19 10:30:45 -07:00
Les Hill
1aaffa1302
Clear event callbacks with clearEvents
2011-09-18 23:29:51 -07:00
Jacob Thornton
084e0288e7
add support and tests for ender jeesh
2011-08-18 16:41:42 -07:00
Steve Mason
5310996d09
Test for unset attributes not being returned by changedAttributes
2011-08-11 08:55:12 +01:00
Jeremy Ashkenas
6bb43c1b81
fixes #244 -- allow View#events to be defined as a function, making it easier to call super.
2011-08-03 16:41:49 -04:00
Jeremy Ashkenas
49a16bdd32
Merge pull request #500 from keithcirkel/master
...
Issue #482
2011-07-26 10:22:43 -07:00
Chris Moore
3145b4db22
isNew should use id, not idAttribute
2011-07-25 17:48:09 -04:00
Keith Cirkel
6ef6f759b6
Add a third "context" argument to Backbone.Event.Bind which, when passed, will bind the callback to the provided context.
...
Example:
Backbone.Event.Bind('event', this.event, this);
Before this commit the way to do this was as follows:
Backbone.Event.Bind('event', _.bind(this.event, this));
2011-07-25 22:47:48 +01:00
Jeremy Ashkenas
6d07d2f0e2
multiple models with the same ID should be allowed in a collection.
2011-07-05 16:40:23 -04:00
Jeremy Ashkenas
da6d0b90ca
resolving merge conflict, removing old test.
2011-07-05 09:42:15 -04:00
Jeremy Ashkenas
fcbedad8cd
Addinga a test case for #459
2011-07-05 09:00:12 -04:00
Jeremy Ashkenas
d2082a54cf
issue #451 + test.
2011-07-01 18:54:49 -04:00
Jeremy Ashkenas
af674c98c5
almost to 0.5.0...
2011-07-01 12:36:11 -04:00
Jeremy Ashkenas
b5112b40a3
Merge pull request #414 from niallsmart/master
...
Fix for issue #413 - collection.add should fail for duplicates
2011-06-29 19:15:08 -07:00
Jeremy Ashkenas
ba1d9a1efd
removing complex router text (unfixable)
2011-06-29 21:20:33 -04:00
Jeremy Ashkenas
4138b58195
Merge pull request #430 from reconbot/master
...
Add complex query string router test
2011-06-29 18:17:22 -07:00
Gavin Huang
4e9037b018
Model is no longer considered to be new if its id is a falsey value
2011-06-23 16:09:41 +08:00
Gavin Huang
573c347553
Fix unit test for model.isNew()
2011-06-23 16:08:16 +08:00