Jeremy Ashkenas
5b43cd9dd1
Fixes #419 -- add a global 'route' event, on Bacckbone.history.
2012-01-13 13:47:55 -05:00
Jeremy Ashkenas
a8bd142b64
Fixes #714 , assign model.collection early, so that those overriding set() can use it from the get-go.
2012-01-13 13:19:28 -05:00
Brad Dunbar
47e1f7e6c8
(un)bind does not alter callback list during trigger
2012-01-13 08:24:47 -05:00
Jeremy Ashkenas
d5ff5e32f6
Fixes #786 (and others) -- leading slashes should never be defined as routes, or passed to navigate ... so strip 'em out proactively.
2012-01-12 18:10:41 -05:00
Jeremy Ashkenas
a49bb4f3e1
Fixes #811 -- allow you to pass a context when unbinding events as well.
2012-01-12 17:09:15 -05:00
Jeremy Ashkenas
93cb997fc3
removing overzealous events setting API.
2012-01-12 16:37:18 -05:00
Jeremy Ashkenas
feefb1c352
Merge pull request #815 from zowens/master
...
View Event Callbacks as Functions
2012-01-12 13:34:55 -08:00
Jeremy Ashkenas
4719659298
Fixes #841 , adding upgrading jquery, classname --> class in the docs.
2012-01-12 15:26:46 -05:00
Jeremy Ashkenas
1d90bb9cfc
binding the comparator function before using it, so that you can rely on properties of your collection within it.
2012-01-12 15:13:22 -05:00
Jeremy Ashkenas
8cfb243b8e
Fixes #836 , Fixes #708 -- going back to previous stance: two models with the same id can't be added to the same collection.
2012-01-11 17:03:30 -05:00
Jeremy Ashkenas
cb7090db77
fixes #838 -- allow View#attributes to be defined as a function, as well as a value.
2012-01-11 16:47:50 -05:00
Jeremy Ashkenas
bf1ffbeb67
nice refactor. removed _add and _remove and moved 'em in to the public API.
2012-01-11 13:45:16 -05:00
Jeremy Ashkenas
eb868b66c8
merging in #846
2012-01-11 12:28:38 -05:00
Jeremy Ashkenas
2312b9072c
adding a test to ensure that routes aren't triggered multiple times. #849
2012-01-11 12:11:10 -05:00
Brad Dunbar
c8919c4b05
collection.add should not alter models array
2012-01-10 17:18:11 -05:00
Zack Owens
b081fe87a5
view events can now be a function that returns an events object
2012-01-07 10:17:57 -05:00
Jeremy Ashkenas
1715c181ad
Fixes #81 -- optimize for addition of large arrays of models, not for individual inserts.
2012-01-06 15:42:43 -05:00
Jeremy Ashkenas
6b3ff7b035
Fixes #9 , Backbone comparators can now be either sort() or sortBy() iterators.
2012-01-06 14:53:43 -05:00
Jeremy Ashkenas
060da2b991
Merge pull request #842 from braddunbar/hasChanged-comparison
...
hasChanged/set should use the same comparison
2012-01-06 06:58:55 -08:00
Brad Dunbar
934aba4c6e
hasChanged/set should use the same comparison
...
When setting a value, if hasChanged and set disagree
about equality then hasChanged will return true without
firing a 'changed:*' event (or vice versa). Using the
same comparison (_.isEqual) solves this problem.
2012-01-06 09:19:23 -05:00
Jeremy Ashkenas
061fd3ba4f
Merge pull request #809 from islandr/master
...
Allow Model.urlRoot to be a function
2011-12-25 22:46:12 -08:00
Zack Owens
1c158747a0
allowing view events to be functions instead of simply names of properties on a view
2011-12-25 00:03:56 -05:00
=
b4e650b98f
A model's urlRoot can now be a function allowing definition at runtime.
2011-12-22 15:23:12 -10:00
Irene Ros
9d145abfe8
Forcing quint test execution order.
2011-12-22 12:23:50 -05:00
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