Jeremy Ashkenas
aafbcb05e5
Fixes #917 -- reverts validate() behavior to never run on silent sets.
2012-02-02 15:40:06 -05:00
Jeremy Ashkenas
ad870b256c
Fixes #933 , Fixes #908
2012-02-02 14:41:36 -05:00
Jeremy Ashkenas
799b9b3dd4
Revert "Fixes #935 . ensuring that sync is triggered on the collection after the model is removed."
...
This reverts commit 0cbcdc96eb .
2012-02-02 14:13:19 -05:00
Jeremy Ashkenas
0cbcdc96eb
Fixes #935 . ensuring that sync is triggered on the collection after the model is removed.
2012-02-02 14:09:54 -05:00
Brad Dunbar
17d0f12a59
use a while loop instead of do...while
2012-02-02 11:24:39 -05:00
Brad Dunbar
29a4359ff7
fixes #915 - nested 'change:attr' events
...
* `'change'` does not fire without changes
* nested `'change:attr'` events are fired
* `'change'` is only fired once for nested calls
* nested `'change'` events are fired
2012-02-02 10:49:27 -05:00
Brad Dunbar
ec61503c87
fixes #928 - Save sends correct attrs.
...
* Temporarily set model's attrs for `sync`.
* Remove cross-module (global) dependencies in
Collection, Model, and sync test modules.
2012-02-02 08:57:47 -05:00
Brad Dunbar
bc79feaf5a
passing falsey keys to hasChanged or previous
2012-02-01 16:06:36 -05:00
Brad Dunbar
c860070ca3
refactor _changed to prevent confusion
2012-02-01 09:13:31 -05:00
Jeremy Ashkenas
bbee6f17ce
Merge pull request #909 from josscrowcroft/master
...
Return `this` from View.setElement()
2012-01-31 07:30:58 -08:00
Brad Dunbar
7a486392f1
ensure options is present
2012-01-31 10:21:56 -05:00
Brad Dunbar
db95e2c1fb
fixes #907 - save with wait succeeds without validate
2012-01-31 10:02:05 -05:00
Joss Crowcroft
4ad12bcd0a
Return this from View.setElement
2012-01-31 17:18:16 +08:00
Jeremy Ashkenas
843eacfcd3
Merge pull request #903 from tomasztunik/master
...
Removed duplicated variable definitions
2012-01-30 13:35:23 -08:00
Tomasz Tunik
73858ecf31
Removed multiple definitions for already defined variable
2012-01-30 22:27:16 +01:00
Jeremy Ashkenas
5ce976bf6a
Backbone.js 0.9.0
2012-01-30 16:24:40 -05:00
Brad Dunbar
8ce8753930
leaked global
2012-01-30 15:52:23 -05:00
Tomasz Tunik
f52ef8c724
Fixed small leak introduced by #901
2012-01-30 21:45:20 +01:00
Brad Dunbar
50e8103fdf
check for duplicate models/ids
2012-01-30 15:24:41 -05:00
Brad Dunbar
fb97ef1e86
one more refactor...
2012-01-30 13:57:00 -05:00
Brad Dunbar
ef9d40aa82
factor away else branch
2012-01-30 13:28:34 -05:00
Jeremy Ashkenas
4b4f2c1ad6
missed an API regression in model.changedAttributes(), reimplementing in the same way as the original.
2012-01-30 12:18:58 -05:00
Jeremy Ashkenas
ac580caffa
Fixes #892 ... make .route() chainable.
2012-01-30 11:03:16 -05:00
Jeremy Ashkenas
31046e0562
Merge pull request #897 from dcneiner/jquery-zepto-context
...
Made minor optimization to scoped jQuery/Zepto method $ on the Backbone.View
2012-01-30 06:30:27 -08:00
Brad Dunbar
2a6624cb24
use _.has for Object proto props
2012-01-30 05:52:47 -05:00
Brad Dunbar
2f654d2676
cache changed attributes
2012-01-30 05:00:41 -05:00
Douglas Neiner
018c19a12a
Updated context find (.$) to use new cached, wrapped this.$el.
2012-01-29 08:51:51 -06:00
Doug Neiner
e1762ed077
Made minor optimization to scoped jQuery/Zepto method $ on the Backbone.View
2012-01-29 00:43:45 -06:00
Brad Dunbar
db12a2351f
documentation for #893
2012-01-27 14:30:32 -05:00
Brad Dunbar
0d6e5f3934
Fire 'change:attr' from change
2012-01-27 14:07:33 -05:00
Jeremy Ashkenas
67a6092890
comments++
2012-01-25 14:03:07 -05:00
Jeremy Ashkenas
c5ddc6b8f8
fixing accidental global 'l' in loop.
2012-01-25 10:24:53 -05:00
Jeremy Ashkenas
3cf646b57d
Merge branch 'master' of github.com:documentcloud/backbone
2012-01-23 18:16:50 -05:00
Jeremy Ashkenas
ab164c450d
Overhauling 'validate' -- Receives the computed new state of the attrs, not just the delta. Now runs on model create, raising an exception if you try to 'new' and invalid model ... also runs even if changed silently.
2012-01-23 18:16:20 -05:00
Jeremy Ashkenas
617fc7d056
Merge pull request #887 from nhajratw/master
...
Just updated the Copyright date
2012-01-23 14:16:31 -08:00
Nayan Hajratwala
94333d2d36
updated date
2012-01-23 17:07:35 -05:00
Jeremy Ashkenas
71641fbe03
moving the methodMap inside of the Backbone.sync section.
2012-01-23 15:06:31 -05:00
Jeremy Ashkenas
3e5f7132a8
Fixes #886 , pass through options.parse when creating a new collection.
2012-01-23 14:58:28 -05:00
Jeremy Ashkenas
49804535dc
Fixes #490 -- named, but not splatted params, must match at least one character.
2012-01-23 11:00:09 -05:00
Jeremy Ashkenas
96a7274cf7
Fixes #538 -- adds Backbone.history.stop() for unit testers.
2012-01-23 10:31:53 -05:00
Jeremy Ashkenas
a9a3499af1
linking to backbonejs.org directly
2012-01-22 12:55:05 -05:00
Jeremy Ashkenas
04c2d10f30
resolved merge
2012-01-22 12:45:39 -05:00
Jeremy Ashkenas
efa58fd2d7
making method colon style consistent -- no space before the colon.
2012-01-22 12:44:25 -05:00
Brad Dunbar
66161b06fd
Model.constructor only take attrs, not models.
...
As per discussion in #873 .
2012-01-20 15:53:39 -05:00
Brad Dunbar
3a891854e8
setting undefined attributes
...
* undefined attrs should still be set
* unset triggers change for undefined attrs
* values are set regardless of change/equality
2012-01-20 11:02:46 -05:00
Brad Dunbar
b05deb5fb5
fix #871 - calling set with 'attributes' property
2012-01-18 12:45:09 -05:00
Brad Dunbar
09ab8cb17d
Collection#add tweaks
...
* leave collection in a consistent state after throw
* correct indices
2012-01-17 23:53:02 -05:00
Brad Dunbar
b2a2d6fff6
added/removed should be add/remove
2012-01-17 21:55:45 -05:00
Jeremy Ashkenas
f417ddd1ab
Fixes #555 -- don't return the parent constructor's value.
2012-01-17 16:13:28 -05:00
Jeremy Ashkenas
cea56e523a
Fixes #563 . Initial draft of 'wait: true' for pessimistic instead of optimistic save() create() and destroy(). Makes it easier to have your asynchronous UI and eat it too.
2012-01-17 15:26:26 -05:00