Commit 6533ae6b authored by Pascal Hartig's avatar Pascal Hartig

Backbone: Update Backbone, jQuery

parent 35fe2471
// Backbone.js 1.1.1 // Backbone.js 1.1.2
// (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Backbone may be freely distributed under the MIT license. // Backbone may be freely distributed under the MIT license.
...@@ -17,9 +17,8 @@ ...@@ -17,9 +17,8 @@
// Next for Node.js or CommonJS. jQuery may not be needed as a module. // Next for Node.js or CommonJS. jQuery may not be needed as a module.
} else if (typeof exports !== 'undefined') { } else if (typeof exports !== 'undefined') {
var _ = require('underscore'), $; var _ = require('underscore');
try { $ = require('jquery'); } catch(e) {} factory(root, exports, _);
factory(root, exports, _, $);
// Finally, as a browser global. // Finally, as a browser global.
} else { } else {
...@@ -42,7 +41,7 @@ ...@@ -42,7 +41,7 @@
var splice = array.splice; var splice = array.splice;
// Current version of the library. Keep in sync with `package.json`. // Current version of the library. Keep in sync with `package.json`.
Backbone.VERSION = '1.1.1'; Backbone.VERSION = '1.1.2';
// For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
// the `$` variable. // the `$` variable.
...@@ -1293,7 +1292,7 @@ ...@@ -1293,7 +1292,7 @@
return optional ? match : '([^/?]+)'; return optional ? match : '([^/?]+)';
}) })
.replace(splatParam, '([^?]*?)'); .replace(splatParam, '([^?]*?)');
return new RegExp('^' + route + '(?:\\?(.*))?$'); return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
}, },
// Given a route, and a URL fragment that it matches, return the array of // Given a route, and a URL fragment that it matches, return the array of
...@@ -1450,7 +1449,7 @@ ...@@ -1450,7 +1449,7 @@
// but possibly useful for unit testing Routers. // but possibly useful for unit testing Routers.
stop: function() { stop: function() {
Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl); Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
clearInterval(this._checkUrlInterval); if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
History.started = false; History.started = false;
}, },
......
File mode changed from 100644 to 100755
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment