From 87c9b17aa722fb3d6b34d5b92c564eeba5516334 Mon Sep 17 00:00:00 2001
From: Brad Dunbar Backbone.Events
object.off("change", onChange);
// Removes all "change" callbacks.
-object.off("change");
+object.off("change");
// Removes the `onChange` callback for all events.
object.off(null, onChange);
@@ -755,7 +756,7 @@ Backbone.Model
you may want to override constructor, which allows
you to replace the actual constructor function for your model.
If you pass a {collection: ...} as the options, the model gains a collection property that will be used to indicate which @@ -886,16 +887,16 @@
model.attributes
- Please use set to update the attributes - instead of modifying them directly. If you'd like to retrieve and munge a - copy of the model's attributes, use toJSON + Please use set to update the attributes + instead of modifying them directly. If you'd like to retrieve and munge a + copy of the model's attributes, use toJSON instead.
@@ -932,7 +933,7 @@Remember that in JavaScript, objects are passed by reference, so if you - include an object as a default value, it will be shared among all instances. + include an object as a default value, it will be shared among all instances. Instead, define defaults as a function.
@@ -1464,32 +1465,32 @@
pushcollection.push(model, [options])
- Add a model at the end of a collection. Takes the same options as
+ Add a model at the end of a collection. Takes the same options as
add.
popcollection.pop([options])
- Remove and return the last model from a collection. Takes the same options as
+ Remove and return the last model from a collection. Takes the same options as
remove.
unshiftcollection.unshift(model, [options])
- Add a model at the beginning of a collection. Takes the same options as
+ Add a model at the beginning of a collection. Takes the same options as
add.
shiftcollection.shift([options])
- Remove and return the first model from a collection. Takes the same options as
+ Remove and return the first model from a collection. Takes the same options as
remove.
+ ajaxBackbone.ajax = function(settings){ ... };
+
+ If you want to use a custom ajax method or your ajax method doesn't support the
+ jQuery.ajax api and you need to
+ translate the options you can do so by setting Backbone.ajax. The method
+ you supply will be used instead of the default $.ajax.
+
emulateHTTPBackbone.emulateHTTP = true
@@ -2706,16 +2716,16 @@
- Art.sy is a place to discover art you'll - love. Art.sy is built on Rails, using - Grape to serve a robust - JSON API. The main site is a single page - app written in Coffeescript and uses Backbone to provide structure around - this API. An admin panel and partner CMS have also been extracted into + Art.sy is a place to discover art you'll + love. Art.sy is built on Rails, using + Grape to serve a robust + JSON API. The main site is a single page + app written in Coffeescript and uses Backbone to provide structure around + this API. An admin panel and partner CMS have also been extracted into their own API-consuming Backbone projects.
@@ -2967,18 +2977,18 @@- EDITD aims to disrupt the fashion + EDITD aims to disrupt the fashion industry with big data. The next generation of their web application - is based on a custom JavaScript framework that builds on top of - Backbone. The back end is - Django + - Elastic Search, - Handlebars.js is used for templating, - jsTestDriver for testing, and + is based on a custom JavaScript framework that builds on top of + Backbone. The back end is + Django + + Elastic Search, + Handlebars.js is used for templating, + jsTestDriver for testing, and Docco for quick documentation.
@@ -3363,7 +3373,7 @@