Comparing version 0.5.2 to 0.5.3
@@ -1,2 +0,2 @@ | ||
// Backbone.js 0.5.2 | ||
// Backbone.js 0.5.3 | ||
// (c) 2010 Jeremy Ashkenas, DocumentCloud Inc. | ||
@@ -28,3 +28,3 @@ // Backbone may be freely distributed under the MIT license. | ||
// Current version of the library. Keep in sync with `package.json`. | ||
Backbone.VERSION = '0.5.2'; | ||
Backbone.VERSION = '0.5.3'; | ||
@@ -45,3 +45,3 @@ // Require Underscore, if we're on the server, and it's not already present. | ||
// Turn on `emulateHTTP` to use support legacy HTTP servers. Setting this option will | ||
// Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option will | ||
// fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and set a | ||
@@ -646,3 +646,3 @@ // `X-Http-Method-Override` header. | ||
'contains', 'invoke', 'max', 'min', 'sortBy', 'sortedIndex', 'toArray', 'size', | ||
'first', 'rest', 'last', 'without', 'indexOf', 'lastIndexOf', 'isEmpty']; | ||
'first', 'rest', 'last', 'without', 'indexOf', 'lastIndexOf', 'isEmpty', 'groupBy']; | ||
@@ -772,3 +772,3 @@ // Mix in each Underscore method as a proxy to `Collection#models`. | ||
} | ||
return fragment.replace(hashStrip, ''); | ||
return decodeURIComponent(fragment.replace(hashStrip, '')); | ||
}, | ||
@@ -819,3 +819,6 @@ | ||
} | ||
return this.loadUrl(); | ||
if (!this.options.silent) { | ||
return this.loadUrl(); | ||
} | ||
}, | ||
@@ -957,2 +960,3 @@ | ||
if (!(events || (events = this.events))) return; | ||
if (_.isFunction(events)) events = events.call(this); | ||
$(this.el).unbind('.delegateEvents' + this.cid); | ||
@@ -1079,3 +1083,3 @@ for (var key in events) { | ||
// Don't process data on a non-GET request. | ||
if (params.type !== 'GET') { | ||
if (params.type !== 'GET' && !Backbone.emulateJSON) { | ||
params.processData = false; | ||
@@ -1082,0 +1086,0 @@ } |
@@ -31,8 +31,2 @@ // An example Backbone application contributed by | ||
this.save({done: !this.get("done")}); | ||
}, | ||
// Remove this Todo from *localStorage* and delete its view. | ||
clear: function() { | ||
this.destroy(); | ||
this.view.remove(); | ||
} | ||
@@ -107,3 +101,3 @@ | ||
this.model.bind('change', this.render, this); | ||
this.model.view = this; | ||
this.model.bind('destroy', this.remove, this); | ||
}, | ||
@@ -157,3 +151,3 @@ | ||
clear: function() { | ||
this.model.clear(); | ||
this.model.destroy(); | ||
} | ||
@@ -237,3 +231,3 @@ | ||
clearCompleted: function() { | ||
_.each(Todos.done(), function(todo){ todo.clear(); }); | ||
_.each(Todos.done(), function(todo){ todo.destroy(); }); | ||
return false; | ||
@@ -240,0 +234,0 @@ }, |
@@ -13,3 +13,3 @@ { | ||
"main" : "backbone.js", | ||
"version" : "0.5.2" | ||
"version" : "0.5.3" | ||
} |
@@ -121,4 +121,4 @@ $(document).ready(function() { | ||
el: $('body'), | ||
events: { | ||
"fake$event.namespaced": "run" | ||
events: function() { | ||
return {"fake$event.namespaced": "run"}; | ||
}, | ||
@@ -125,0 +125,0 @@ run: function() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6481616
73
13081