minor js library updates

This commit is contained in:
Keivan Beigi 2013-05-31 16:03:38 -07:00 committed by kay.one
parent dca32e9e0f
commit c34ae218e8
3 changed files with 53 additions and 23 deletions

View File

@ -17,7 +17,7 @@
} }
Backbone.ModelBinder = function(){ Backbone.ModelBinder = function(){
_.bindAll(this); _.bindAll.apply(_, [this].concat(_.functions(this)));
}; };
// Static setter for class level options // Static setter for class level options
@ -85,7 +85,7 @@
this._options['modelSetOptions'].changeSource = 'ModelBinder'; this._options['modelSetOptions'].changeSource = 'ModelBinder';
if(!this._options['changeTriggers']){ if(!this._options['changeTriggers']){
this._options['changeTriggers'] = {'*': 'change', '[contenteditable]': 'blur'}; this._options['changeTriggers'] = {'': 'change', '[contenteditable]': 'blur'};
} }
if(!this._options['initialCopyDirection']){ if(!this._options['initialCopyDirection']){

View File

@ -1,5 +1,5 @@
/*! /*!
* jQuery JavaScript Library v1.10.0 * jQuery JavaScript Library v1.10.1
* http://jquery.com/ * http://jquery.com/
* *
* Includes Sizzle.js * Includes Sizzle.js
@ -9,7 +9,7 @@
* Released under the MIT license * Released under the MIT license
* http://jquery.org/license * http://jquery.org/license
* *
* Date: 2013-05-24T18:39Z * Date: 2013-05-30T21:49Z
*/ */
(function( window, undefined ) { (function( window, undefined ) {
@ -46,7 +46,7 @@ var
// List of deleted data cache ids, so we can reuse them // List of deleted data cache ids, so we can reuse them
core_deletedIds = [], core_deletedIds = [],
core_version = "1.10.0", core_version = "1.10.1",
// Save a reference to some core methods // Save a reference to some core methods
core_concat = core_deletedIds.concat, core_concat = core_deletedIds.concat,
@ -1007,7 +1007,7 @@ rootjQuery = jQuery(document);
* Released under the MIT license * Released under the MIT license
* http://jquery.org/license * http://jquery.org/license
* *
* Date: 2013-05-15 * Date: 2013-05-27
*/ */
(function( window, undefined ) { (function( window, undefined ) {
@ -1492,7 +1492,8 @@ support = Sizzle.support = {};
* @returns {Object} Returns the current document * @returns {Object} Returns the current document
*/ */
setDocument = Sizzle.setDocument = function( node ) { setDocument = Sizzle.setDocument = function( node ) {
var doc = node ? node.ownerDocument || node : preferredDoc; var doc = node ? node.ownerDocument || node : preferredDoc,
parent = doc.parentWindow;
// If no document and documentElement is available, return // If no document and documentElement is available, return
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
@ -1506,6 +1507,15 @@ setDocument = Sizzle.setDocument = function( node ) {
// Support tests // Support tests
documentIsHTML = !isXML( doc ); documentIsHTML = !isXML( doc );
// Support: IE>8
// If iframe document is assigned to "document" variable and if iframe has been reloaded,
// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
if ( parent && parent.frameElement ) {
parent.attachEvent( "onbeforeunload", function() {
setDocument();
});
}
/* Attributes /* Attributes
---------------------------------------------------------------------- */ ---------------------------------------------------------------------- */
@ -3951,7 +3961,6 @@ jQuery.extend({
startLength--; startLength--;
} }
hooks.cur = fn;
if ( fn ) { if ( fn ) {
// Add a progress sentinel to prevent the fx queue from being // Add a progress sentinel to prevent the fx queue from being
@ -8864,8 +8873,8 @@ var fxNow, timerId,
// Update tween properties // Update tween properties
if ( parts ) { if ( parts ) {
start = tween.start = +start || +target || 0;
tween.unit = unit; tween.unit = unit;
tween.start = +start || +target || 0;
// If a +=/-= token was provided, we're doing a relative animation // If a +=/-= token was provided, we're doing a relative animation
tween.end = parts[ 1 ] ? tween.end = parts[ 1 ] ?
start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
@ -9312,9 +9321,7 @@ jQuery.fn.extend({
doAnimation = function() { doAnimation = function() {
// Operate on a copy of prop so per-property easing won't be lost // Operate on a copy of prop so per-property easing won't be lost
var anim = Animation( this, jQuery.extend( {}, prop ), optall ); var anim = Animation( this, jQuery.extend( {}, prop ), optall );
doAnimation.finish = function() {
anim.stop( true );
};
// Empty animations, or finishing resolves immediately // Empty animations, or finishing resolves immediately
if ( empty || jQuery._data( this, "finish" ) ) { if ( empty || jQuery._data( this, "finish" ) ) {
anim.stop( true ); anim.stop( true );
@ -9394,8 +9401,8 @@ jQuery.fn.extend({
// empty the queue first // empty the queue first
jQuery.queue( this, type, [] ); jQuery.queue( this, type, [] );
if ( hooks && hooks.cur && hooks.cur.finish ) { if ( hooks && hooks.stop ) {
hooks.cur.finish.call( this ); hooks.stop.call( this, true );
} }
// look for any active animations, and finish them // look for any active animations, and finish them
@ -9775,7 +9782,7 @@ jQuery.fn.size = function() {
jQuery.fn.andSelf = jQuery.fn.addBack; jQuery.fn.andSelf = jQuery.fn.addBack;
// })(); // })();
if ( typeof module === "object" && typeof module.exports === "object" ) { if ( typeof module === "object" && module && typeof module.exports === "object" ) {
// Expose jQuery as module.exports in loaders that implement the Node // Expose jQuery as module.exports in loaders that implement the Node
// module pattern (including browserify). Do not create the global, since // module pattern (including browserify). Do not create the global, since
// the user will be storing it themselves locally, and globals are frowned // the user will be storing it themselves locally, and globals are frowned

View File

@ -1,5 +1,5 @@
/** /**
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.3.2 * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.3.3
* Copyright (C) 2013 Oliver Nightingale * Copyright (C) 2013 Oliver Nightingale
* MIT Licensed * MIT Licensed
* @license * @license
@ -50,11 +50,34 @@ var lunr = function (config) {
return idx return idx
} }
lunr.version = "0.3.2" lunr.version = "0.3.3"
if (typeof module !== 'undefined') { if (typeof module !== 'undefined') {
module.exports = lunr module.exports = lunr
} }
/*!
* lunr.utils
* Copyright (C) 2013 Oliver Nightingale
*/
/**
* A namespace containing utils for the rest of the lunr library
*/
lunr.utils = {}
/**
* Print a warning message to the console.
*
* @param {String} message The message to be printed.
* @memberOf Utils
*/
lunr.utils.warn = (function (global) {
return function (message) {
if (global.console && console.warn) {
console.warn(message)
}
}
})(this)
/*! /*!
* lunr.tokenizer * lunr.tokenizer
* Copyright (C) 2013 Oliver Nightingale * Copyright (C) 2013 Oliver Nightingale
@ -141,8 +164,8 @@ lunr.Pipeline.registeredFunctions = {}
* @memberOf Pipeline * @memberOf Pipeline
*/ */
lunr.Pipeline.registerFunction = function (fn, label) { lunr.Pipeline.registerFunction = function (fn, label) {
if (console && console.warn && (label in this.registeredFunctions)) { if (label in this.registeredFunctions) {
console.warn('Overwriting existing registered function: ' + label) lunr.utils.warn('Overwriting existing registered function: ' + label)
} }
fn.label = label fn.label = label
@ -159,8 +182,8 @@ lunr.Pipeline.registerFunction = function (fn, label) {
lunr.Pipeline.warnIfFunctionNotRegistered = function (fn) { lunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {
var isRegistered = fn.label && (fn.label in this.registeredFunctions) var isRegistered = fn.label && (fn.label in this.registeredFunctions)
if (!isRegistered && console && console.warn) { if (!isRegistered) {
console.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\n', fn) lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\n', fn)
} }
} }
@ -650,8 +673,8 @@ lunr.Index = function () {
* @memberOf Index * @memberOf Index
*/ */
lunr.Index.load = function (serialisedData) { lunr.Index.load = function (serialisedData) {
if (serialisedData.version !== lunr.version && console && console.warn) { if (serialisedData.version !== lunr.version) {
console.warn('version mismatch: current ' + lunr.version + ' importing ' + serialisedData.version) lunr.utils.warn('version mismatch: current ' + lunr.version + ' importing ' + serialisedData.version)
} }
var idx = new this var idx = new this