From 44086f9659c74ee369dd790df5ff6c0c25e55d08 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 8 Mar 2013 14:25:07 +0100 Subject: [PATCH] Upgraded to latest JQuery. Removed obsolete JQuery migrate. --- src/html/third-party/jquery/jquery-migrate.js | 498 ------------------ .../third-party/jquery/jquery-migrate.min.js | 3 - src/html/third-party/jquery/jquery.js | 424 ++++++++------- src/html/third-party/jquery/jquery.min.js | 9 +- 4 files changed, 238 insertions(+), 696 deletions(-) delete mode 100644 src/html/third-party/jquery/jquery-migrate.js delete mode 100644 src/html/third-party/jquery/jquery-migrate.min.js diff --git a/src/html/third-party/jquery/jquery-migrate.js b/src/html/third-party/jquery/jquery-migrate.js deleted file mode 100644 index 27111d8..0000000 --- a/src/html/third-party/jquery/jquery-migrate.js +++ /dev/null @@ -1,498 +0,0 @@ -/*! - * jQuery Migrate - v1.0.0 - 2013-01-14 - * https://github.com/jquery/jquery-migrate - * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT - */ -(function( jQuery, window, undefined ) { -"use strict"; - - -var warnedAbout = {}; - -// List of warnings already given; public read only -jQuery.migrateWarnings = []; - -// Set to true to prevent console output; migrateWarnings still maintained -// jQuery.migrateMute = false; - -// Forget any warnings we've already given; public -jQuery.migrateReset = function() { - warnedAbout = {}; - jQuery.migrateWarnings.length = 0; -}; - -function migrateWarn( msg) { - if ( !warnedAbout[ msg ] ) { - warnedAbout[ msg ] = true; - jQuery.migrateWarnings.push( msg ); - if ( window.console && console.warn && !jQuery.migrateMute ) { - console.warn( "JQMIGRATE: " + msg ); - } - } -} - -function migrateWarnProp( obj, prop, value, msg ) { - if ( Object.defineProperty ) { - // On ES5 browsers (non-oldIE), warn if the code tries to get prop; - // allow property to be overwritten in case some other plugin wants it - try { - Object.defineProperty( obj, prop, { - configurable: true, - enumerable: true, - get: function() { - migrateWarn( msg ); - return value; - }, - set: function( newValue ) { - migrateWarn( msg ); - value = newValue; - } - }); - return; - } catch( err ) { - // IE8 is a dope about Object.defineProperty, can't warn there - } - } - - // Non-ES5 (or broken) browser; just set the property - jQuery._definePropertyBroken = true; - obj[ prop ] = value; -} - -if ( document.compatMode === "BackCompat" ) { - // jQuery has never supported or tested Quirks Mode - migrateWarn( "jQuery is not compatible with Quirks Mode" ); -} - - -var attrFn = {}, - attr = jQuery.attr, - valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get || - function() { return null; }, - valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set || - function() { return undefined; }, - rnoType = /^(?:input|button)$/i, - rnoAttrNodeType = /^[238]$/, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - ruseDefault = /^(?:checked|selected)$/i; - -// jQuery.attrFn -migrateWarnProp( jQuery, "attrFn", attrFn, "jQuery.attrFn is deprecated" ); - -jQuery.attr = function( elem, name, value, pass ) { - var lowerName = name.toLowerCase(), - nType = elem && elem.nodeType; - - if ( pass ) { - migrateWarn("jQuery.fn.attr( props, pass ) is deprecated"); - if ( elem && !rnoAttrNodeType.test( nType ) && jQuery.isFunction( jQuery.fn[ name ] ) ) { - return jQuery( elem )[ name ]( value ); - } - } - - // Warn if user tries to set `type` since it breaks on IE 6/7/8 - if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) ) { - migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8"); - } - - // Restore boolHook for boolean property/attribute synchronization - if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) { - jQuery.attrHooks[ lowerName ] = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && - ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } - }; - - // Warn only for attributes that can remain distinct from their properties post-1.9 - if ( ruseDefault.test( lowerName ) ) { - migrateWarn( "jQuery.fn.attr(" + lowerName + ") may use property instead of attribute" ); - } - } - - return attr.call( jQuery, elem, name, value ); -}; - -// attrHooks: value -jQuery.attrHooks.value = { - get: function( elem, name ) { - var nodeName = ( elem.nodeName || "" ).toLowerCase(); - if ( nodeName === "button" ) { - return valueAttrGet.apply( this, arguments ); - } - if ( nodeName !== "input" && nodeName !== "option" ) { - migrateWarn("property-based jQuery.fn.attr('value') is deprecated"); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value ) { - var nodeName = ( elem.nodeName || "" ).toLowerCase(); - if ( nodeName === "button" ) { - return valueAttrSet.apply( this, arguments ); - } - if ( nodeName !== "input" && nodeName !== "option" ) { - migrateWarn("property-based jQuery.fn.attr('value', val) is deprecated"); - } - // Does not return so that setAttribute is also used - elem.value = value; - } -}; - - -var matched, browser, - oldInit = jQuery.fn.init, - // Note this does NOT include the # XSS fix from 1.7! - rquickExpr = /^(?:.*(<[\w\W]+>)[^>]*|#([\w\-]*))$/; - -// $(html) "looks like html" rule change -jQuery.fn.init = function( selector, context, rootjQuery ) { - var match; - - if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) && - (match = rquickExpr.exec( selector )) && match[1] ) { - // This is an HTML string according to the "old" rules; is it still? - if ( selector.charAt( 0 ) !== "<" ) { - migrateWarn("$(html) HTML strings must start with '<' character"); - } - // Now process using loose rules; let pre-1.8 play too - if ( context && context.context ) { - // jQuery object as context; parseHTML expects a DOM object - context = context.context; - } - if ( jQuery.parseHTML ) { - return oldInit.call( this, jQuery.parseHTML( jQuery.trim(selector), context, true ), - context, rootjQuery ); - } - } - return oldInit.apply( this, arguments ); -}; -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.uaMatch = function( ua ) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; -}; - -matched = jQuery.uaMatch( navigator.userAgent ); -browser = {}; - -if ( matched.browser ) { - browser[ matched.browser ] = true; - browser.version = matched.version; -} - -// Chrome is Webkit, but Webkit is also Safari. -if ( browser.chrome ) { - browser.webkit = true; -} else if ( browser.webkit ) { - browser.safari = true; -} - -jQuery.browser = browser; - -// Warn if the code tries to get jQuery.browser -migrateWarnProp( jQuery, "browser", browser, "jQuery.browser is deprecated" ); - -jQuery.sub = function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - migrateWarn( "jQuery.sub() is deprecated" ); - return jQuerySub; -}; - - -var oldFnData = jQuery.fn.data; - -jQuery.fn.data = function( name ) { - var ret, evt, - elem = this[0]; - - // Handles 1.7 which has this behavior and 1.8 which doesn't - if ( elem && name === "events" && arguments.length === 1 ) { - ret = jQuery.data( elem, name ); - evt = jQuery._data( elem, name ); - if ( ( ret === undefined || ret === evt ) && evt !== undefined ) { - migrateWarn("Use of jQuery.fn.data('events') is deprecated"); - return evt; - } - } - return oldFnData.apply( this, arguments ); -}; - - -var rscriptType = /\/(java|ecma)script/i, - oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack, - oldFragment = jQuery.buildFragment; - -jQuery.fn.andSelf = function() { - migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"); - return oldSelf.apply( this, arguments ); -}; - -// Since jQuery.clean is used internally on older versions, we only shim if it's missing -if ( !jQuery.clean ) { - jQuery.clean = function( elems, context, fragment, scripts ) { - // Set context per 1.8 logic - context = context || document; - context = !context.nodeType && context[0] || context; - context = context.ownerDocument || context; - - migrateWarn("jQuery.clean() is deprecated"); - - var i, elem, handleScript, jsTags, - ret = []; - - jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes ); - - // Complex logic lifted directly from jQuery 1.8 - if ( fragment ) { - // Special handling of each script element - handleScript = function( elem ) { - // Check if we consider it executable - if ( !elem.type || rscriptType.test( elem.type ) ) { - // Detach the script and store it in the scripts array (if provided) or the fragment - // Return truthy to indicate that it has been handled - return scripts ? - scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : - fragment.appendChild( elem ); - } - }; - - for ( i = 0; (elem = ret[i]) != null; i++ ) { - // Check if we're done after handling an executable script - if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { - // Append to fragment and handle embedded scripts - fragment.appendChild( elem ); - if ( typeof elem.getElementsByTagName !== "undefined" ) { - // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration - jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); - - // Splice the scripts into ret after their former ancestor and advance our index beyond them - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - i += jsTags.length; - } - } - } - } - - return ret; - }; -} - -jQuery.buildFragment = function( elems, context, scripts, selection ) { - var ret, - warning = "jQuery.buildFragment() is deprecated"; - - // Set context per 1.8 logic - context = context || document; - context = !context.nodeType && context[0] || context; - context = context.ownerDocument || context; - - try { - ret = oldFragment.call( jQuery, elems, context, scripts, selection ); - - // jQuery < 1.8 required arrayish context; jQuery 1.9 fails on it - } catch( x ) { - ret = oldFragment.call( jQuery, elems, context.nodeType ? [ context ] : context[ 0 ], scripts, selection ); - - // Success from tweaking context means buildFragment was called by the user - migrateWarn( warning ); - } - - // jQuery < 1.9 returned an object instead of the fragment itself - if ( !ret.fragment ) { - migrateWarnProp( ret, "fragment", ret, warning ); - migrateWarnProp( ret, "cacheable", false, warning ); - } - - return ret; -}; - -var eventAdd = jQuery.event.add, - eventRemove = jQuery.event.remove, - eventTrigger = jQuery.event.trigger, - oldToggle = jQuery.fn.toggle, - oldLive = jQuery.fn.live, - oldDie = jQuery.fn.die, - ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess", - rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ), - rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, - hoverHack = function( events ) { - if ( typeof( events ) != "string" || jQuery.event.special.hover ) { - return events; - } - if ( rhoverHack.test( events ) ) { - migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"); - } - return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -// Event props removed in 1.9, put them back if needed; no practical way to warn them -if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) { - jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" ); -} - -// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7 -migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" ); - -// Support for 'hover' pseudo-event and ajax event warnings -jQuery.event.add = function( elem, types, handler, data, selector ){ - if ( elem !== document && rajaxEvent.test( types ) ) { - migrateWarn( "AJAX events should be attached to document: " + types ); - } - eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector ); -}; -jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){ - eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes ); -}; - -jQuery.fn.error = function() { - var args = Array.prototype.slice.call( arguments, 0); - migrateWarn("jQuery.fn.error() is deprecated"); - args.splice( 0, 0, "error" ); - if ( arguments.length ) { - return this.bind.apply( this, args ); - } - // error event should not bubble to window, although it does pre-1.7 - this.triggerHandler.apply( this, args ); - return this; -}; - -jQuery.fn.toggle = function( fn, fn2 ) { - - // Don't mess with animation or css toggles - if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) { - return oldToggle.apply( this, arguments ); - } - migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated"); - - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); -}; - -jQuery.fn.live = function( types, data, fn ) { - migrateWarn("jQuery.fn.live() is deprecated"); - if ( oldLive ) { - return oldLive.apply( this, arguments ); - } - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; -}; - -jQuery.fn.die = function( types, fn ) { - migrateWarn("jQuery.fn.die() is deprecated"); - if ( oldDie ) { - return oldDie.apply( this, arguments ); - } - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; -}; - -// Turn global events into document-triggered events -jQuery.event.trigger = function( event, data, elem, onlyHandlers ){ - if ( !elem & !rajaxEvent.test( event ) ) { - migrateWarn( "Global events are undocumented and deprecated" ); - } - return eventTrigger.call( this, event, data, elem || document, onlyHandlers ); -}; -jQuery.each( ajaxEvents.split("|"), - function( _, name ) { - jQuery.event.special[ name ] = { - setup: function() { - var elem = this; - - // The document needs no shimming; must be !== for oldIE - if ( elem !== document ) { - jQuery.event.add( document, name + "." + jQuery.guid, function() { - jQuery.event.trigger( name, null, elem, true ); - }); - jQuery._data( this, name, jQuery.guid++ ); - } - return false; - }, - teardown: function() { - if ( this !== document ) { - jQuery.event.remove( document, name + "." + jQuery._data( this, name ) ); - } - return false; - } - }; - } -); - - -})( jQuery, window ); diff --git a/src/html/third-party/jquery/jquery-migrate.min.js b/src/html/third-party/jquery/jquery-migrate.min.js deleted file mode 100644 index e6782b6..0000000 --- a/src/html/third-party/jquery/jquery-migrate.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! jQuery Migrate v1.0.0 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */ -jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){"use strict";function r(n){o[n]||(o[n]=!0,e.migrateWarnings.push(n),t.console&&console.warn&&!e.migrateMute&&console.warn("JQMIGRATE: "+n))}function a(t,a,o,i){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(i),o},set:function(e){r(i),o=e}}),n}catch(u){}e._definePropertyBroken=!0,t[a]=o}var o={};e.migrateWarnings=[],e.migrateReset=function(){o={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var i={},u=e.attr,s=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},d=/^(?:input|button)$/i,l=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",i,"jQuery.attrFn is deprecated"),e.attr=function(t,a,o,i){var s=a.toLowerCase(),c=t&&t.nodeType;return i&&(r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!l.test(c)&&e.isFunction(e.fn[a]))?e(t)[a](o):("type"===a&&o!==n&&d.test(t.nodeName)&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[s]&&p.test(s)&&(e.attrHooks[s]={get:function(t,r){var a,o=e.prop(t,r);return o===!0||"boolean"!=typeof o&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(s)&&r("jQuery.fn.attr("+s+") may use property instead of attribute")),u.call(e,t,a,o))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?s.apply(this,arguments):("input"!==n&&"option"!==n&&r("property-based jQuery.fn.attr('value') is deprecated"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("property-based jQuery.fn.attr('value', val) is deprecated"),e.value=t,n)}};var g,h,m=e.fn.init,v=/^(?:.*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;e.fn.init=function(t,n,a){var o;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(o=v.exec(t))&&o[1]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),n&&n.context&&(n=n.context),e.parseHTML)?m.call(this,e.parseHTML(e.trim(t),n,!0),n,a):m.apply(this,arguments)},e.fn.init.prototype=e.fn,e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h,a(e,"browser",h,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t};var y=e.fn.data;e.fn.data=function(t){var a,o,i=this[0];return!i||"events"!==t||1!==arguments.length||(a=e.data(i,t),o=e._data(i,t),a!==n&&a!==o||o===n)?y.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),o)};var b=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack,j=e.buildFragment;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,o,i){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var u,s,c,d,l=[];if(e.merge(l,e.buildFragment(t,a).childNodes),o)for(c=function(e){return!e.type||b.test(e.type)?i?i.push(e.parentNode?e.parentNode.removeChild(e):e):o.appendChild(e):n},u=0;null!=(s=l[u]);u++)e.nodeName(s,"script")&&c(s)||(o.appendChild(s),s.getElementsByTagName!==n&&(d=e.grep(e.merge([],s.getElementsByTagName("script")),c),l.splice.apply(l,[u+1,0].concat(d)),u+=d.length));return l}),e.buildFragment=function(t,n,o,i){var u,s="jQuery.buildFragment() is deprecated";n=n||document,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n;try{u=j.call(e,t,n,o,i)}catch(c){u=j.call(e,t,n.nodeType?[n]:n[0],o,i),r(s)}return u.fragment||(a(u,"fragment",u,s),a(u,"cacheable",!1,s)),u};var Q=e.event.add,x=e.event.remove,k=e.event.trigger,C=e.fn.toggle,N=e.fn.live,T=e.fn.die,H="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",M=RegExp("\\b(?:"+H+")\\b"),F=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(F.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(F,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,o){e!==document&&M.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,o)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return C.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,o=t.guid||e.guid++,i=0,u=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%i;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(u.guid=o;a.length>i;)a[i++].guid=o;return this.click(u)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),N?N.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),T?T.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return!n&!M.test(e)&&r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(H.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window); -//@ sourceMappingURL=dist/jquery-migrate.min.map \ No newline at end of file diff --git a/src/html/third-party/jquery/jquery.js b/src/html/third-party/jquery/jquery.js index 67e3160..e2c203f 100644 --- a/src/html/third-party/jquery/jquery.js +++ b/src/html/third-party/jquery/jquery.js @@ -1,5 +1,5 @@ /*! - * jQuery JavaScript Library v1.9.0 + * jQuery JavaScript Library v1.9.1 * http://jquery.com/ * * Includes Sizzle.js @@ -9,16 +9,25 @@ * Released under the MIT license * http://jquery.org/license * - * Date: 2013-1-14 + * Date: 2013-2-4 */ (function( window, undefined ) { -"use strict"; + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; var + // The deferred used on DOM ready + readyList, + // A central reference to the root jQuery(document) rootjQuery, - // The deferred used on DOM ready - readyList, + // Support: IE<9 + // For `typeof node.method` instead of `node.method !== undefined` + core_strundefined = typeof undefined, // Use the correct document accordingly with window argument (sandbox) document = window.document, @@ -36,7 +45,7 @@ var // List of deleted data cache ids, so we can reuse them core_deletedIds = [], - core_version = "1.9.0", + core_version = "1.9.1", // Save a reference to some core methods core_concat = core_deletedIds.concat, @@ -85,16 +94,24 @@ var return letter.toUpperCase(); }, - // The ready event handler and self cleanup method - DOMContentLoaded = function() { + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); } }; @@ -299,7 +316,7 @@ jQuery.fn = jQuery.prototype = { jQuery.fn.init.prototype = jQuery.fn; jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, + var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {}, i = 1, length = arguments.length, @@ -781,7 +798,7 @@ jQuery.extend({ // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { - var tmp, args, proxy; + var args, proxy, tmp; if ( typeof context === "string" ) { tmp = fn[ context ]; @@ -880,18 +897,18 @@ jQuery.ready.promise = function( obj ) { // Standards-based browsers support DOMContentLoaded } else if ( document.addEventListener ) { // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + document.addEventListener( "DOMContentLoaded", completed, false ); // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); + window.addEventListener( "load", completed, false ); // If IE event model is used } else { // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); + document.attachEvent( "onreadystatechange", completed ); // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); + window.attachEvent( "onload", completed ); // If IE and not a frame // continually check to see if the document is ready @@ -913,6 +930,9 @@ jQuery.ready.promise = function( obj ) { return setTimeout( doScrollCheck, 50 ); } + // detach all dom ready events + detach(); + // and execute any waiting functions jQuery.ready(); } @@ -989,18 +1009,18 @@ jQuery.Callbacks = function( options ) { ( optionsCache[ options ] || createOptions( options ) ) : jQuery.extend( {}, options ); - var // Last fire value (for non-forgettable lists) + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, // Actual callback list list = [], // Stack of fire calls for repeatable lists @@ -1086,9 +1106,10 @@ jQuery.Callbacks = function( options ) { } return this; }, - // Control if a given callback is in the list + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); }, // Remove all callbacks from the list empty: function() { @@ -1285,7 +1306,9 @@ jQuery.extend({ }); jQuery.support = (function() { - var support, all, a, select, opt, input, fragment, eventName, isSupported, i, + var support, all, a, + input, select, fragment, + opt, eventName, isSupported, i, div = document.createElement("div"); // Setup @@ -1486,7 +1509,7 @@ jQuery.support = (function() { !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); } - if ( typeof div.style.zoom !== "undefined" ) { + if ( typeof div.style.zoom !== core_strundefined ) { // Support: IE<8 // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving @@ -1502,9 +1525,12 @@ jQuery.support = (function() { div.firstChild.style.width = "5px"; support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - body.style.zoom = 1; + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } } body.removeChild( container ); @@ -1521,7 +1547,7 @@ jQuery.support = (function() { var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, rmultiDash = /([A-Z])/g; - + function internalData( elem, name, data, pvt /* Internal Use Only */ ){ if ( !jQuery.acceptData( elem ) ) { return; @@ -1616,13 +1642,12 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){ return ret; } -function internalRemoveData( elem, name, pvt /* For internal use only */ ){ +function internalRemoveData( elem, name, pvt ) { if ( !jQuery.acceptData( elem ) ) { return; } - var thisCache, i, l, - + var i, l, thisCache, isNode = elem.nodeType, // See jQuery.data for more information @@ -1726,24 +1751,29 @@ jQuery.extend({ }, data: function( elem, name, data ) { - return internalData( elem, name, data, false ); + return internalData( elem, name, data ); }, removeData: function( elem, name ) { - return internalRemoveData( elem, name, false ); + return internalRemoveData( elem, name ); }, // For internal use only. _data: function( elem, name, data ) { return internalData( elem, name, data, true ); }, - + _removeData: function( elem, name ) { return internalRemoveData( elem, name, true ); }, // A method for determining if a DOM node can handle the data expando acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; // nodes accept data unless otherwise specified; rejection can be conditional @@ -1769,7 +1799,7 @@ jQuery.fn.extend({ name = attrs[i].name; if ( !name.indexOf( "data-" ) ) { - name = jQuery.camelCase( name.substring(5) ); + name = jQuery.camelCase( name.slice(5) ); dataAttr( elem, name, data[ name ] ); } @@ -1820,12 +1850,12 @@ function dataAttr( elem, key, data ) { if ( typeof data === "string" ) { try { data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; } catch( e ) {} // Make sure we set the data so it isn't changed later @@ -2141,7 +2171,7 @@ jQuery.fn.extend({ } // Toggle whole class name - } else if ( type === "undefined" || type === "boolean" ) { + } else if ( type === core_strundefined || type === "boolean" ) { if ( this.className ) { // store className if set jQuery._data( this, "__className__", this.className ); @@ -2170,7 +2200,7 @@ jQuery.fn.extend({ }, val: function( value ) { - var hooks, ret, isFunction, + var ret, hooks, isFunction, elem = this[0]; if ( !arguments.length ) { @@ -2294,7 +2324,7 @@ jQuery.extend({ }, attr: function( elem, name, value ) { - var ret, hooks, notxml, + var hooks, notxml, ret, nType = elem.nodeType; // don't get/set attributes on text, comment and attribute nodes @@ -2303,7 +2333,7 @@ jQuery.extend({ } // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { + if ( typeof elem.getAttribute === core_strundefined ) { return jQuery.prop( elem, name, value ); } @@ -2336,7 +2366,7 @@ jQuery.extend({ // In IE9+, Flash objects don't have .getAttribute (#12945) // Support: IE9+ - if ( typeof elem.getAttribute !== "undefined" ) { + if ( typeof elem.getAttribute !== core_strundefined ) { ret = elem.getAttribute( name ); } @@ -2686,13 +2716,12 @@ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - // Don't attach events to noData or text/comment nodes (but allow plain objects) - elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem ); - + // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } @@ -2717,7 +2746,7 @@ jQuery.event = { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : undefined; }; @@ -2797,10 +2826,10 @@ jQuery.event = { // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, elemData = jQuery.hasData( elem ) && jQuery._data( elem ); if ( !elemData || !(events = elemData.events) ) { @@ -2870,11 +2899,11 @@ jQuery.event = { }, trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, + var handle, ontype, cur, + bubbleType, special, tmp, i, eventPath = [ elem || document ], - type = event.type || event, - namespaces = event.namespace ? event.namespace.split(".") : []; + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; cur = tmp = elem = elem || document; @@ -3008,7 +3037,7 @@ jQuery.event = { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event ); - var i, j, ret, matched, handleObj, + var i, ret, handleObj, matched, j, handlerQueue = [], args = core_slice.call( arguments ), handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], @@ -3063,7 +3092,7 @@ jQuery.event = { }, handlers: function( event, handlers ) { - var i, matches, sel, handleObj, + var sel, handleObj, matches, i, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; @@ -3075,8 +3104,9 @@ jQuery.event = { for ( ; cur != this; cur = cur.parentNode || this ) { + // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { matches = []; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; @@ -3114,10 +3144,18 @@ jQuery.event = { } // Create a writable copy of the event object and normalize some properties - var i, prop, + var i, prop, copy, + type = event.type, originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; event = new jQuery.Event( originalEvent ); @@ -3167,7 +3205,7 @@ jQuery.event = { mouseHooks: { props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { - var eventDoc, doc, body, + var body, eventDoc, doc, button = original.button, fromElement = original.fromElement; @@ -3283,7 +3321,7 @@ jQuery.removeEvent = document.removeEventListener ? // #8545, #7054, preventing memory leaks for custom events in IE6-8 // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { + if ( typeof elem[ name ] === core_strundefined ) { elem[ name ] = null; } @@ -3532,7 +3570,7 @@ if ( !jQuery.support.focusinBubbles ) { jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; + var type, origFn; // Types can be a map of types/handlers if ( typeof types === "object" ) { @@ -3644,30 +3682,6 @@ jQuery.fn.extend({ if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; } }); /*! @@ -3781,7 +3795,7 @@ var i, rsibling = /[\x20\t\r\n\f]*[+~]/, - rnative = /\{\s*\[native code\]\s*\}/, + rnative = /^[^{]+\{\s*\[native code/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, @@ -3808,12 +3822,12 @@ var i, // Use a stripped-down slice if we can't use a native one try { - slice.call( docElem.childNodes, 0 )[0].nodeType; + slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType; } catch ( e ) { slice = function( i ) { var elem, results = []; - for ( ; (elem = this[i]); i++ ) { + while ( (elem = this[i++]) ) { results.push( elem ); } return results; @@ -4132,7 +4146,7 @@ setDocument = Sizzle.setDocument = function( node ) { // Filter out possible comments if ( tag === "*" ) { - for ( ; (elem = results[i]); i++ ) { + while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } @@ -4290,15 +4304,11 @@ setDocument = Sizzle.setDocument = function( node ) { ap = [ a ], bp = [ b ]; - // The nodes are identical, we can exit early + // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return ( ~b.sourceIndex || MAX_NEGATIVE ) - ( contains( preferredDoc, a ) && ~a.sourceIndex || MAX_NEGATIVE ); - // Parentless nodes are either documents or disconnected } else if ( !aup || !bup ) { return a === doc ? -1 : @@ -4437,11 +4447,20 @@ Sizzle.uniqueSort = function( results ) { }; function siblingCheck( a, b ) { - var cur = a && b && a.nextSibling; + var cur = b && a, + diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); - for ( ; cur; cur = cur.nextSibling ) { - if ( cur === b ) { - return -1; + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } } } @@ -4651,9 +4670,9 @@ Expr = Sizzle.selectors = { operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.substr( result.length - check.length ) === check : + operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, @@ -5071,7 +5090,7 @@ function toSelector( tokens ) { function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, - checkNonElements = base && combinator.dir === "parentNode", + checkNonElements = base && dir === "parentNode", doneName = done++; return combinator.first ? @@ -5314,8 +5333,8 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { contextBackup = outermostContext, // We must always have either seed elements or context elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Nested matchers should use non-integer dirruns - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E); + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); if ( outermost ) { outermostContext = context !== document && context; @@ -5323,9 +5342,11 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { } // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below for ( ; (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { - for ( j = 0; (matcher = elementMatchers[j]); j++ ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context, xml ) ) { results.push( elem ); break; @@ -5352,10 +5373,10 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { } // Apply set filters to unmatched elements - // `i` starts as a string, so matchedCount would equal "00" if there are no elements matchedCount += i; if ( bySet && i !== matchedCount ) { - for ( j = 0; (matcher = setMatchers[j]); j++ ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } @@ -5457,7 +5478,8 @@ function select( selector, context, results, seed ) { } // Fetch a seed set for right-to-left matching - for ( i = matchExpr["needsContext"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) { + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator @@ -5535,12 +5557,13 @@ var runtil = /Until$/, jQuery.fn.extend({ find: function( selector ) { - var i, ret, self; + var i, ret, self, + len = this.length; if ( typeof selector !== "string" ) { self = this; return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < self.length; i++ ) { + for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } @@ -5549,12 +5572,12 @@ jQuery.fn.extend({ } ret = []; - for ( i = 0; i < this.length; i++ ) { + for ( i = 0; i < len; i++ ) { jQuery.find( selector, this[ i ], ret ); } // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( jQuery.unique( ret ) ); + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; return ret; }, @@ -6066,15 +6089,9 @@ jQuery.fn.extend({ var next = this.nextSibling, parent = this.parentNode; - if ( parent && this.nodeType === 1 || this.nodeType === 11 ) { - + if ( parent ) { jQuery( this ).remove(); - - if ( next ) { - next.parentNode.insertBefore( elem, next ); - } else { - parent.appendChild( elem ); - } + parent.insertBefore( elem, next ); } }); }, @@ -6088,7 +6105,8 @@ jQuery.fn.extend({ // Flatten any nested arrays args = core_concat.apply( [], args ); - var fragment, first, scripts, hasScripts, node, doc, + var first, node, hasScripts, + scripts, doc, fragment, i = 0, l = this.length, set = this, @@ -6239,7 +6257,7 @@ function cloneCopyEvent( src, dest ) { } function fixCloneNodeIssues( src, dest ) { - var nodeName, data, e; + var nodeName, e, data; // We do not need to do anything for non-Elements if ( dest.nodeType !== 1 ) { @@ -6334,8 +6352,8 @@ jQuery.each({ function getAll( context, tag ) { var elems, elem, i = 0, - found = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) : + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : undefined; if ( !found ) { @@ -6362,7 +6380,7 @@ function fixDefaultChecked( elem ) { jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, srcElements, node, i, clone, + var destElements, node, clone, i, srcElements, inPage = jQuery.contains( elem.ownerDocument, elem ); if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { @@ -6417,7 +6435,8 @@ jQuery.extend({ }, buildFragment: function( elems, context, scripts, selection ) { - var contains, elem, tag, tmp, wrap, tbody, j, + var j, elem, contains, + tmp, tag, tbody, wrap, l = elems.length, // Ensure a safe fragment @@ -6543,7 +6562,7 @@ jQuery.extend({ }, cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, + var elem, type, id, data, i = 0, internalKey = jQuery.expando, cache = jQuery.cache, @@ -6581,7 +6600,7 @@ jQuery.extend({ if ( deleteExpando ) { delete elem[ internalKey ]; - } else if ( typeof elem.removeAttribute !== "undefined" ) { + } else if ( typeof elem.removeAttribute !== core_strundefined ) { elem.removeAttribute( internalKey ); } else { @@ -6595,7 +6614,7 @@ jQuery.extend({ } } }); -var curCSS, getStyles, iframe, +var iframe, getStyles, curCSS, ralpha = /alpha\([^)]*\)/i, ropacity = /opacity\s*=\s*([^)]*)/, rposition = /^(top|right|bottom|left)$/, @@ -6648,7 +6667,7 @@ function isHidden( elem, el ) { } function showHide( elements, show ) { - var elem, + var display, elem, hidden, values = [], index = 0, length = elements.length; @@ -6658,11 +6677,13 @@ function showHide( elements, show ) { if ( !elem.style ) { continue; } + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; if ( show ) { // Reset the inline display of this element to learn if it is // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { + if ( !values[ index ] && display === "none" ) { elem.style.display = ""; } @@ -6672,8 +6693,15 @@ function showHide( elements, show ) { if ( elem.style.display === "" && isHidden( elem ) ) { values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); } - } else if ( !values[ index ] && !isHidden( elem ) ) { - jQuery._data( elem, "olddisplay", jQuery.css( elem, "display" ) ); + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } } } @@ -6695,7 +6723,7 @@ function showHide( elements, show ) { jQuery.fn.extend({ css: function( name, value ) { return jQuery.access( this, function( elem, name, value ) { - var styles, len, + var len, styles, map = {}, i = 0; @@ -6836,7 +6864,7 @@ jQuery.extend({ }, css: function( elem, name, extra, styles ) { - var val, num, hooks, + var num, val, hooks, origName = jQuery.camelCase( name ); // Make sure that we're working with the right name @@ -6862,7 +6890,7 @@ jQuery.extend({ } // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra ) { + if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; } @@ -7227,7 +7255,10 @@ jQuery(function() { if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); + // Support: Opera <= 12.12 + // Opera reports offsetWidths and offsetHeights less than zero on some elements + return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || + (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); }; jQuery.expr.filters.visible = function( elem ) { @@ -7265,7 +7296,7 @@ jQuery.each({ var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset)$/i, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; jQuery.fn.extend({ @@ -7361,11 +7392,25 @@ function buildParams( prefix, obj, traditional, add ) { add( prefix, obj ); } } +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +}); + +jQuery.fn.hover = function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); +}; var // Document location ajaxLocParts, ajaxLocation, - ajax_nonce = jQuery.now(), ajax_rquery = /\?/, @@ -7478,7 +7523,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { - var key, deep, + var deep, key, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { @@ -7498,7 +7543,7 @@ jQuery.fn.load = function( url, params, callback ) { return _load.apply( this, arguments ); } - var selector, type, response, + var selector, response, type, self = this, off = url.indexOf(" "); @@ -7679,20 +7724,23 @@ jQuery.extend({ // Force options to be an object options = options || {}; - var transport, - // URL without anti-cache param - cacheURL, - // Response headers - responseHeadersString, - responseHeaders, - // timeout handle - timeoutTimer, - // Cross-domain detection vars + var // Cross-domain detection vars parts, - // To know if global events are to be dispatched - fireGlobals, // Loop variable i, + // URL without anti-cache param + cacheURL, + // Response headers as string + responseHeadersString, + // timeout handle + timeoutTimer, + + // To know if global events are to be dispatched + fireGlobals, + + transport, + // Response headers + responseHeaders, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context @@ -7987,12 +8035,17 @@ jQuery.extend({ } } - // If not modified - if ( status === 304 ) { + // if no content + if ( status === 204 ) { + isSuccess = true; + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { isSuccess = true; statusText = "notmodified"; - // If we have data + // If we have data, let's convert it } else { isSuccess = ajaxConvert( s, response ); statusText = isSuccess.state; @@ -8062,8 +8115,7 @@ jQuery.extend({ * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, + var firstDataType, ct, finalDataType, type, contents = s.contents, dataTypes = s.dataTypes, responseFields = s.responseFields; @@ -8124,8 +8176,7 @@ function ajaxHandleResponses( s, jqXHR, responses ) { // Chain conversions given the request and the original response function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, + var conv2, current, conv, tmp, converters = {}, i = 0, // Work with a copy of dataTypes in case we need to modify it for conversion @@ -8476,12 +8527,7 @@ if ( xhrSupported ) { // Listener callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; + var status, responseHeaders, statusText, responses; // Firefox throws exceptions when accessing properties // of an xhr when a network error occurred @@ -8511,14 +8557,8 @@ if ( xhrSupported ) { } else { responses = {}; status = xhr.status; - xml = xhr.responseXML; responseHeaders = xhr.getAllResponseHeaders(); - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - // When requesting binary data, IE6-9 will throw an exception // on any attempt to access responseText (#11426) if ( typeof xhr.responseText === "string" ) { @@ -8768,7 +8808,7 @@ function Animation( elem, properties, options ) { } function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; + var value, name, index, easing, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { @@ -8836,7 +8876,9 @@ jQuery.Animation = jQuery.extend( Animation, { function defaultPrefilter( elem, props, opts ) { /*jshint validthis:true */ - var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, + var prop, index, length, + value, dataShow, toggle, + tween, hooks, oldfire, anim = this, style = elem.style, orig = {}, @@ -8896,7 +8938,7 @@ function defaultPrefilter( elem, props, opts ) { if ( opts.overflow ) { style.overflow = "hidden"; if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { + anim.always(function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; @@ -9020,11 +9062,11 @@ Tween.propHooks = { return tween.elem[ tween.prop ]; } - // passing a non empty string as a 3rd parameter to .css will automatically + // passing an empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails // so, simple values such as "10px" are parsed to Float. // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, "auto" ); + result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, @@ -9346,7 +9388,7 @@ jQuery.fn.offset = function( options ) { // If we don't have gBCR, just use 0,0 rather than error // BlackBerry 5, iOS 3 (original iPhone) - if ( typeof elem.getBoundingClientRect !== "undefined" ) { + if ( typeof elem.getBoundingClientRect !== core_strundefined ) { box = elem.getBoundingClientRect(); } win = getWindow( doc ); diff --git a/src/html/third-party/jquery/jquery.min.js b/src/html/third-party/jquery/jquery.min.js index 50d1b22..006e953 100644 --- a/src/html/third-party/jquery/jquery.min.js +++ b/src/html/third-party/jquery/jquery.min.js @@ -1,4 +1,5 @@ -/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("