Also update Underscore to 1.6. Includes the development versions of both, which are not included in the build.
Here is Backbone's changelog:
* Made the return values of Collection’s `set`, `add`, `remove`, and `reset` more useful. Instead of returning `this`, they now return the changed (added, removed or updated) model or list of
models. (This means they can no longer be chained.)
* Backbone Views no longer automatically attach options passed to the constructor as `this.options` and Backbone Models no longer attach `url` and `urlRoot` options, but you can do it yourself if you prefer. (But if you extend `wp.Backbone.View`, options will be attached for you.)
* All `"invalid"` events now pass consistent arguments. First the model in question, then the error object, then options.
* You are no longer permitted to change the id of your model during `parse`. Use `idAttribute` instead.
* On the other hand, `parse` is now an excellent place to extract and vivify incoming nested JSON into associated submodels.
See [27171] (next commit) for changes made to WordPress to be compatible with Backbone 1.1.
props gcorne, georgestephanis.
see #26799.
Built from https://develop.svn.wordpress.org/trunk@27170
git-svn-id: http://core.svn.wordpress.org/trunk@27035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update media JS to reflect changes. Please open new tickets for remaining issues.
props koopersmith.
fixes#23830.
git-svn-id: http://core.svn.wordpress.org/trunk@23893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* When overriding `Backbone.sync()`, ensure the `sync` and `error` events fire consistently.
* `Model#make()` has been removed. Use `$` instead, and be sure to grab the DOM node where necessary (using `[0]`).
* `Collection#get()` now accepts `cid`s. `Collection#getByCid()` has been removed.
* When overriding the `State` constructor, bind `change` callbacks after the default `Model` constructor is called, because the `Model` constructor no longer passes the `silent` flag when calling `set()` for the default attributes.
* In 'change' events, `options.changes` was removed. It can now be accessed through `model.changed`. Check if any attributes have changed by calling `model.hasChanged()`. Also, don't mess with `model.changed`; it persists beyond the scope of a single event.
* `options.index` is no longer be set in the `add` event callback. Use `collection.indexOf(model)` can be used to retrieve the index of a model instead.
props gcorne. fixes#23262.
git-svn-id: http://core.svn.wordpress.org/trunk@23589 1a063a9b-81f0-0310-95a4-ce76da25c4cd