Changeset 25383 for trunk/themes/default/js/jquery.js
- Timestamp:
- Nov 7, 2013, 10:03:43 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/js/jquery.js
r23358 r25383 1 1 /*! 2 * jQuery JavaScript Library v1.10. 12 * jQuery JavaScript Library v1.10.2 3 3 * http://jquery.com/ 4 4 * … … 10 10 * http://jquery.org/license 11 11 * 12 * Date: 2013-0 5-30T21:49Z12 * Date: 2013-07-03T13:48Z 13 13 */ 14 14 (function( window, undefined ) { … … 47 47 core_deletedIds = [], 48 48 49 core_version = "1.10. 1",49 core_version = "1.10.2", 50 50 51 51 // Save a reference to some core methods … … 1001 1001 rootjQuery = jQuery(document); 1002 1002 /*! 1003 * Sizzle CSS Selector Engine v1. 9.4-pre1003 * Sizzle CSS Selector Engine v1.10.2 1004 1004 * http://sizzlejs.com/ 1005 1005 * … … 1008 1008 * http://jquery.org/license 1009 1009 * 1010 * Date: 2013-0 5-271010 * Date: 2013-07-03 1011 1011 */ 1012 1012 (function( window, undefined ) { … … 1041 1041 compilerCache = createCache(), 1042 1042 hasDuplicate = false, 1043 sortOrder = function() { return 0; }, 1043 sortOrder = function( a, b ) { 1044 if ( a === b ) { 1045 hasDuplicate = true; 1046 return 0; 1047 } 1048 return 0; 1049 }, 1044 1050 1045 1051 // General-purpose constants … … 1285 1291 1286 1292 /** 1287 * For feature detection1288 * @param {Function} fn The function to test for native support1289 */1290 function isNative( fn ) {1291 return rnative.test( fn + "" );1292 }1293 1294 /**1295 1293 * Create key-value caches of limited size 1296 1294 * @returns {Function(string, Object)} Returns the Object data after storing it on itself with … … 1345 1343 * Adds the same handler for all of the specified attrs 1346 1344 * @param {String} attrs Pipe-separated list of attributes 1347 * @param {Function} handler The method that will be applied if the test fails 1348 * @param {Boolean} test The result of a test. If true, null will be set as the handler in leiu of the specified handler 1345 * @param {Function} handler The method that will be applied 1349 1346 */ 1350 function addHandle( attrs, handler, test ) { 1351 attrs = attrs.split("|"); 1352 var current, 1353 i = attrs.length, 1354 setHandle = test ? null : handler; 1347 function addHandle( attrs, handler ) { 1348 var arr = attrs.split("|"), 1349 i = attrs.length; 1355 1350 1356 1351 while ( i-- ) { 1357 // Don't override a user's handler 1358 if ( !(current = Expr.attrHandle[ attrs[i] ]) || current === handler ) { 1359 Expr.attrHandle[ attrs[i] ] = setHandle; 1360 } 1361 } 1362 } 1363 1364 /** 1365 * Fetches boolean attributes by node 1366 * @param {Element} elem 1367 * @param {String} name 1368 */ 1369 function boolHandler( elem, name ) { 1370 // XML does not need to be checked as this will not be assigned for XML documents 1371 var val = elem.getAttributeNode( name ); 1372 return val && val.specified ? 1373 val.value : 1374 elem[ name ] === true ? name.toLowerCase() : null; 1375 } 1376 1377 /** 1378 * Fetches attributes without interpolation 1379 * http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 1380 * @param {Element} elem 1381 * @param {String} name 1382 */ 1383 function interpolationHandler( elem, name ) { 1384 // XML does not need to be checked as this will not be assigned for XML documents 1385 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); 1386 } 1387 1388 /** 1389 * Uses defaultValue to retrieve value in IE6/7 1390 * @param {Element} elem 1391 * @param {String} name 1392 */ 1393 function valueHandler( elem ) { 1394 // Ignore the value *property* on inputs by using defaultValue 1395 // Fallback to Sizzle.attr by returning undefined where appropriate 1396 // XML does not need to be checked as this will not be assigned for XML documents 1397 if ( elem.nodeName.toLowerCase() === "input" ) { 1398 return elem.defaultValue; 1352 Expr.attrHandle[ arr[i] ] = handler; 1399 1353 } 1400 1354 } … … 1404 1358 * @param {Element} a 1405 1359 * @param {Element} b 1406 * @returns Returns -1 if a precedes b, 1if a follows b1360 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 1407 1361 */ 1408 1362 function siblingCheck( a, b ) { … … 1494 1448 setDocument = Sizzle.setDocument = function( node ) { 1495 1449 var doc = node ? node.ownerDocument || node : preferredDoc, 1496 parent = doc. parentWindow;1450 parent = doc.defaultView; 1497 1451 1498 1452 // If no document and documentElement is available, return … … 1511 1465 // If iframe document is assigned to "document" variable and if iframe has been reloaded, 1512 1466 // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 1513 if ( parent && parent.frameElement ) { 1467 // IE6-8 do not support the defaultView property so parent will be undefined 1468 if ( parent && parent.attachEvent && parent !== parent.top ) { 1514 1469 parent.attachEvent( "onbeforeunload", function() { 1515 1470 setDocument(); … … 1523 1478 // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) 1524 1479 support.attributes = assert(function( div ) { 1525 1526 // Support: IE<81527 // Prevent attribute/property "interpolation"1528 div.innerHTML = "<a href='#'></a>";1529 addHandle( "type|href|height|width", interpolationHandler, div.firstChild.getAttribute("href") === "#" );1530 1531 // Support: IE<91532 // Use getAttributeNode to fetch booleans when getAttribute lies1533 addHandle( booleans, boolHandler, div.getAttribute("disabled") == null );1534 1535 1480 div.className = "i"; 1536 1481 return !div.getAttribute("className"); 1537 1482 }); 1538 1539 // Support: IE<91540 // Retrieving value should defer to defaultValue1541 support.input = assert(function( div ) {1542 div.innerHTML = "<input>";1543 div.firstChild.setAttribute( "value", "" );1544 return div.firstChild.getAttribute( "value" ) === "";1545 });1546 1547 // IE6/7 still return empty string for value,1548 // but are actually retrieving the property1549 addHandle( "value", valueHandler, support.attributes && support.input );1550 1483 1551 1484 /* getElement(s)By* … … 1657 1590 rbuggyQSA = []; 1658 1591 1659 if ( (support.qsa = isNative(doc.querySelectorAll)) ) {1592 if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { 1660 1593 // Build QSA regex 1661 1594 // Regex strategy adopted from Diego Perini … … 1709 1642 } 1710 1643 1711 if ( (support.matchesSelector = isNative( (matches = docElem.webkitMatchesSelector ||1644 if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || 1712 1645 docElem.mozMatchesSelector || 1713 1646 docElem.oMatchesSelector || … … 1735 1668 // Purposefully does not implement inclusive descendent 1736 1669 // As in, an element does not contain itself 1737 contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?1670 contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? 1738 1671 function( a, b ) { 1739 1672 var adown = a.nodeType === 9 ? a.documentElement : a, … … 1759 1692 ---------------------------------------------------------------------- */ 1760 1693 1761 // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)1762 // Detached nodes confoundingly follow *each other*1763 support.sortDetached = assert(function( div1 ) {1764 // Should return 1, but returns 4 (following)1765 return div1.compareDocumentPosition( doc.createElement("div") ) & 1;1766 });1767 1768 1694 // Document order sorting 1769 1695 sortOrder = docElem.compareDocumentPosition ? … … 1908 1834 var fn = Expr.attrHandle[ name.toLowerCase() ], 1909 1835 // Don't get fooled by Object.prototype properties (jQuery #13807) 1910 val = (fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?1836 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? 1911 1837 fn( elem, name, !documentIsHTML ) : 1912 undefined );1838 undefined; 1913 1839 1914 1840 return val === undefined ? … … 2455 2381 }; 2456 2382 2383 Expr.pseudos["nth"] = Expr.pseudos["eq"]; 2384 2457 2385 // Add button/input type pseudos 2458 2386 for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { … … 2462 2390 Expr.pseudos[ i ] = createButtonPseudo( i ); 2463 2391 } 2392 2393 // Easy API for creating new setFilters 2394 function setFilters() {} 2395 setFilters.prototype = Expr.filters = Expr.pseudos; 2396 Expr.setFilters = new setFilters(); 2464 2397 2465 2398 function tokenize( selector, parseOnly ) { … … 2974 2907 } 2975 2908 2976 // Deprecated2977 Expr.pseudos["nth"] = Expr.pseudos["eq"];2978 2979 // Easy API for creating new setFilters2980 function setFilters() {}2981 setFilters.prototype = Expr.filters = Expr.pseudos;2982 Expr.setFilters = new setFilters();2983 2984 2909 // One-time assignments 2985 2910 … … 2987 2912 support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; 2988 2913 2914 // Support: Chrome<14 2915 // Always assume duplicates if they aren't passed to the comparison function 2916 support.detectDuplicates = hasDuplicate; 2917 2989 2918 // Initialize against the default document 2990 2919 setDocument(); 2991 2920 2992 // Support: Chrome<<14 2993 // Always assume duplicates if they aren't passed to the comparison function 2994 [0, 0].sort( sortOrder ); 2995 support.detectDuplicates = hasDuplicate; 2921 // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 2922 // Detached nodes confoundingly follow *each other* 2923 support.sortDetached = assert(function( div1 ) { 2924 // Should return 1, but returns 4 (following) 2925 return div1.compareDocumentPosition( document.createElement("div") ) & 1; 2926 }); 2927 2928 // Support: IE<8 2929 // Prevent attribute/property "interpolation" 2930 // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 2931 if ( !assert(function( div ) { 2932 div.innerHTML = "<a href='#'></a>"; 2933 return div.firstChild.getAttribute("href") === "#" ; 2934 }) ) { 2935 addHandle( "type|href|height|width", function( elem, name, isXML ) { 2936 if ( !isXML ) { 2937 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); 2938 } 2939 }); 2940 } 2941 2942 // Support: IE<9 2943 // Use defaultValue in place of getAttribute("value") 2944 if ( !support.attributes || !assert(function( div ) { 2945 div.innerHTML = "<input/>"; 2946 div.firstChild.setAttribute( "value", "" ); 2947 return div.firstChild.getAttribute( "value" ) === ""; 2948 }) ) { 2949 addHandle( "value", function( elem, name, isXML ) { 2950 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { 2951 return elem.defaultValue; 2952 } 2953 }); 2954 } 2955 2956 // Support: IE<9 2957 // Use getAttributeNode to fetch booleans when getAttribute lies 2958 if ( !assert(function( div ) { 2959 return div.getAttribute("disabled") == null; 2960 }) ) { 2961 addHandle( booleans, function( elem, name, isXML ) { 2962 var val; 2963 if ( !isXML ) { 2964 return (val = elem.getAttributeNode( name )) && val.specified ? 2965 val.value : 2966 elem[ name ] === true ? name.toLowerCase() : null; 2967 } 2968 }); 2969 } 2996 2970 2997 2971 jQuery.find = Sizzle; … … 3178 3152 // Call all callbacks with the given context and arguments 3179 3153 fireWith: function( context, args ) { 3180 args = args || [];3181 args = [ context, args.slice ? args.slice() : args ];3182 3154 if ( list && ( !fired || stack ) ) { 3155 args = args || []; 3156 args = [ context, args.slice ? args.slice() : args ]; 3183 3157 if ( firing ) { 3184 3158 stack.push( args ); … … 4184 4158 4185 4159 toggleClass: function( value, stateVal ) { 4186 var type = typeof value, 4187 isBool = typeof stateVal === "boolean"; 4160 var type = typeof value; 4161 4162 if ( typeof stateVal === "boolean" && type === "string" ) { 4163 return stateVal ? this.addClass( value ) : this.removeClass( value ); 4164 } 4188 4165 4189 4166 if ( jQuery.isFunction( value ) ) { … … 4199 4176 i = 0, 4200 4177 self = jQuery( this ), 4201 state = stateVal,4202 4178 classNames = value.match( core_rnotwhite ) || []; 4203 4179 4204 4180 while ( (className = classNames[ i++ ]) ) { 4205 4181 // check each className given, space separated list 4206 state = isBool ? state : !self.hasClass( className ); 4207 self[ state ? "addClass" : "removeClass" ]( className ); 4182 if ( self.hasClass( className ) ) { 4183 self.removeClass( className ); 4184 } else { 4185 self.addClass( className ); 4186 } 4208 4187 } 4209 4188 … … 6949 6928 }, 6950 6929 toggle: function( state ) { 6951 var bool = typeof state === "boolean"; 6930 if ( typeof state === "boolean" ) { 6931 return state ? this.show() : this.hide(); 6932 } 6952 6933 6953 6934 return this.each(function() { 6954 if ( bool ? state :isHidden( this ) ) {6935 if ( isHidden( this ) ) { 6955 6936 jQuery( this ).show(); 6956 6937 } else { … … 6983 6964 "lineHeight": true, 6984 6965 "opacity": true, 6966 "order": true, 6985 6967 "orphans": true, 6986 6968 "widows": true,
Note: See TracChangeset
for help on using the changeset viewer.