Jeremy Ashkenas
dca02ecab7
Fixes #1053 -- updating comment to reflect changed style of validate()
2012-02-27 14:56:21 -05:00
Jeremy Ashkenas
07604deac0
merging in hash fixer for FF
2012-02-27 14:30:23 -05:00
Jeremy Ashkenas
b37a09662e
Merge pull request #1048 from marat-dreizin/master
...
Added ability to avoid an additional '$()' call in 'setElement' method if current 'element' is already wrapped with '$()'
2012-02-27 11:14:50 -08:00
Jeremy Ashkenas
c9599d6ba0
fixing or= JS style for sync options.
2012-02-27 14:04:44 -05:00
Oli
daea564e8a
Made Backbone.sync options parameter optional
2012-02-27 18:04:59 +00:00
Marat Dreizin
0d1d278c7b
Added ability to avoid an additional '$()' call in 'setElement' method if current 'element' is already wrapped with '$()'
2012-02-25 02:05:12 +03:00
Brad Dunbar
e3098484ce
Use local references to Model, View, etc.
2012-02-18 12:35:50 -05:00
Brad Dunbar
f92fa9a0bd
Clean up Backbone.Events.
...
* Refactor `Backbone.Events` for increased clarity.
* Update documentation to include multiple events.
* Use `event` consistently throughout.
2012-02-18 09:19:26 -05:00
Jeremy Ashkenas
c6b28149fa
Merge pull request #982 from braddunbar/change
...
Fixes #959 - Silent changes fire `'change:attr'`.
2012-02-17 05:06:52 -08:00
Brad Dunbar
afbca7229c
Fixes #1016 - Expose changed.
...
* Expose `changed` as a public hash of changes.
* Initialize `changed`, `_pending`, and `_silent`
in the constructor instead of checking in `set`.
* Ensure `changed` matches `attributes`.
2012-02-17 07:22:43 -05:00
Brad Dunbar
82ee97d36b
Use null for uninitialized variables.
2012-02-17 07:22:43 -05:00
Brad Dunbar
69b80f5e3a
Fixes #959 - Silent changes fire 'change:attr'.
...
* Silent changes are tracked so `'change:attr'` can be
fired next time `change` is called.
* Pending changes are tracked to prevent infinite loops
and accurately reflect nested changes.
2012-02-17 07:22:43 -05:00
Otto Allmendinger
5071967e32
fix error message on missing event callback
2012-02-16 11:48:58 +01:00
Brad Dunbar
232c888038
fixes #1003 - History is started before navigate
2012-02-15 00:39:38 -05:00
Brad Dunbar
8b285c6c83
on is a noop if no callback is provided
2012-02-14 15:22:27 -05:00
Jeremy Ashkenas
a603e5a843
resolving merge with master.
2012-02-13 14:41:46 -05:00
Jeremy Ashkenas
18fba57724
Much asked-for change. Instead of throwing an early error when adding duplicate models, Backbone will simply skip them instead.
2012-02-13 14:39:36 -05:00
vlad
3761d28188
fixes #972 by cleaning up a messy conditional
2012-02-08 17:05:38 -08:00
Jeremy Ashkenas
2a92f71dcc
Merge branch 'master' of github.com:documentcloud/backbone
2012-02-08 16:59:11 -05:00
Jeremy Ashkenas
e3ac6f8eaa
Adding Collection#push, pop, shift, and unshift to the API, returning references to the model. Fixing a too-unescaped regex.
2012-02-08 16:58:37 -05:00
Stan Angeloff
b993441e5e
Tiny spelling error, no functional changes.
2012-02-07 14:09:48 +02:00
Jake Harding
402508d80f
Getting the hash value from location.href rather than location.hash as a workaround to the Firefox bug where location.hash is decoded.
2012-02-06 20:29:26 -08:00
Brad Dunbar
522e090831
fixes #964 - collection.get has consistent return
2012-02-06 16:45:06 -05:00
Brad Dunbar
3ef9c3a5fc
Add tests for #908 , #933 .
2012-02-03 10:17:45 -05:00
Jeremy Ashkenas
a865aa41f1
removing obsolete error case.
2012-02-02 17:15:28 -05:00
Jeremy Ashkenas
4337fc3ff3
comments for setDomLibrary
2012-02-02 16:34:09 -05:00
Jeremy Ashkenas
0ffd7ea2ca
merging in setDomLibrary
2012-02-02 16:30:56 -05:00
Jeremy Ashkenas
8a427f3018
DRY-ing up _validate
2012-02-02 16:22:10 -05:00
Jeremy Ashkenas
738e25dd4d
options.silent respected in _prepareModel ... prepping for a 0.9.1
2012-02-02 16:19:19 -05:00
Jeremy Ashkenas
d187f7f989
Merge pull request #906 from tomasztunik/master
...
Fixes issue #904
2012-02-02 13:02:01 -08:00
Jeremy Ashkenas
eb4753862e
#917 , adding an Model#isValid() function.
2012-02-02 15:54:34 -05:00
Jeremy Ashkenas
0e709e456f
Merge branch 'master' of github.com:documentcloud/backbone
2012-02-02 15:40:13 -05:00
Jeremy Ashkenas
aafbcb05e5
Fixes #917 -- reverts validate() behavior to never run on silent sets.
2012-02-02 15:40:06 -05:00
Jeremy Ashkenas
fc2c4ded7c
Merge pull request #920 from braddunbar/$
...
use `$` as DOM abstraction library
2012-02-02 12:17:48 -08: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
Brad Dunbar
9bdaa62224
use $ as DOM abstraction library
2012-01-31 22:49:03 -05:00
James Sanders
e97c58f547
Change name to setDomLibrary
2012-01-31 17:25:41 -07:00
James Sanders
9bd086e64b
Change from Backbone.use to Backbone.setjQuery and fix tests
2012-01-31 15:49:53 -07:00
Matt Smith
701350ab90
inject js library with Backbone.use(myLib)
2012-01-31 15:11:13 -07: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