appetizer-ui 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/appetizer-ui.gemspec +1 -1
- data/lib/appetizer/ui/vendor/js/jquery.js +289 -323
- data/lib/appetizer/ui/vendor/js/underscore.js +30 -21
- metadata +26 -26
data/appetizer-ui.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery JavaScript Library v1.7
|
2
|
+
* jQuery JavaScript Library v1.7.1
|
3
3
|
* http://jquery.com/
|
4
4
|
*
|
5
5
|
* Copyright 2011, John Resig
|
@@ -11,7 +11,7 @@
|
|
11
11
|
* Copyright 2011, The Dojo Foundation
|
12
12
|
* Released under the MIT, BSD, and GPL Licenses.
|
13
13
|
*
|
14
|
-
* Date:
|
14
|
+
* Date: Mon Nov 21 21:11:03 2011 -0500
|
15
15
|
*/
|
16
16
|
(function( window, undefined ) {
|
17
17
|
|
@@ -47,9 +47,6 @@ var jQuery = function( selector, context ) {
|
|
47
47
|
trimLeft = /^\s+/,
|
48
48
|
trimRight = /\s+$/,
|
49
49
|
|
50
|
-
// Check for digits
|
51
|
-
rdigit = /\d/,
|
52
|
-
|
53
50
|
// Match a standalone tag
|
54
51
|
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
|
55
52
|
|
@@ -213,7 +210,7 @@ jQuery.fn = jQuery.prototype = {
|
|
213
210
|
selector: "",
|
214
211
|
|
215
212
|
// The current version of jQuery being used
|
216
|
-
jquery: "1.7",
|
213
|
+
jquery: "1.7.1",
|
217
214
|
|
218
215
|
// The default length of a jQuery object is 0
|
219
216
|
length: 0,
|
@@ -285,9 +282,10 @@ jQuery.fn = jQuery.prototype = {
|
|
285
282
|
},
|
286
283
|
|
287
284
|
eq: function( i ) {
|
285
|
+
i = +i;
|
288
286
|
return i === -1 ?
|
289
287
|
this.slice( i ) :
|
290
|
-
this.slice( i,
|
288
|
+
this.slice( i, i + 1 );
|
291
289
|
},
|
292
290
|
|
293
291
|
first: function() {
|
@@ -438,7 +436,7 @@ jQuery.extend({
|
|
438
436
|
|
439
437
|
// Trigger any bound ready events
|
440
438
|
if ( jQuery.fn.trigger ) {
|
441
|
-
jQuery( document ).trigger( "ready" ).
|
439
|
+
jQuery( document ).trigger( "ready" ).off( "ready" );
|
442
440
|
}
|
443
441
|
}
|
444
442
|
},
|
@@ -505,7 +503,7 @@ jQuery.extend({
|
|
505
503
|
},
|
506
504
|
|
507
505
|
isNumeric: function( obj ) {
|
508
|
-
return
|
506
|
+
return !isNaN( parseFloat(obj) ) && isFinite( obj );
|
509
507
|
},
|
510
508
|
|
511
509
|
type: function( obj ) {
|
@@ -551,7 +549,7 @@ jQuery.extend({
|
|
551
549
|
},
|
552
550
|
|
553
551
|
error: function( msg ) {
|
554
|
-
throw msg;
|
552
|
+
throw new Error( msg );
|
555
553
|
},
|
556
554
|
|
557
555
|
parseJSON: function( data ) {
|
@@ -688,8 +686,6 @@ jQuery.extend({
|
|
688
686
|
|
689
687
|
if ( array != null ) {
|
690
688
|
// The window, strings (and functions) also have 'length'
|
691
|
-
// The extra typeof function check is to prevent crashes
|
692
|
-
// in Safari 2 (See: #3039)
|
693
689
|
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
|
694
690
|
var type = jQuery.type( array );
|
695
691
|
|
@@ -956,20 +952,6 @@ function doScrollCheck() {
|
|
956
952
|
jQuery.ready();
|
957
953
|
}
|
958
954
|
|
959
|
-
// Expose jQuery as an AMD module, but only for AMD loaders that
|
960
|
-
// understand the issues with loading multiple versions of jQuery
|
961
|
-
// in a page that all might call define(). The loader will indicate
|
962
|
-
// they have special allowances for multiple jQuery versions by
|
963
|
-
// specifying define.amd.jQuery = true. Register as a named module,
|
964
|
-
// since jQuery can be concatenated with other files that may use define,
|
965
|
-
// but not use a proper concatenation script that understands anonymous
|
966
|
-
// AMD modules. A named AMD is safest and most robust way to register.
|
967
|
-
// Lowercase jquery is used because AMD module names are derived from
|
968
|
-
// file names, and jQuery is normally delivered in a lowercase file name.
|
969
|
-
if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
970
|
-
define( "jquery", [], function () { return jQuery; } );
|
971
|
-
}
|
972
|
-
|
973
955
|
return jQuery;
|
974
956
|
|
975
957
|
})();
|
@@ -1234,7 +1216,8 @@ jQuery.extend({
|
|
1234
1216
|
return this;
|
1235
1217
|
},
|
1236
1218
|
always: function() {
|
1237
|
-
|
1219
|
+
deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
|
1220
|
+
return this;
|
1238
1221
|
},
|
1239
1222
|
pipe: function( fnDone, fnFail, fnProgress ) {
|
1240
1223
|
return jQuery.Deferred(function( newDefer ) {
|
@@ -1347,30 +1330,25 @@ jQuery.extend({
|
|
1347
1330
|
|
1348
1331
|
jQuery.support = (function() {
|
1349
1332
|
|
1350
|
-
var
|
1351
|
-
documentElement = document.documentElement,
|
1333
|
+
var support,
|
1352
1334
|
all,
|
1353
1335
|
a,
|
1354
1336
|
select,
|
1355
1337
|
opt,
|
1356
1338
|
input,
|
1357
1339
|
marginDiv,
|
1358
|
-
support,
|
1359
1340
|
fragment,
|
1360
|
-
body,
|
1361
|
-
testElementParent,
|
1362
|
-
testElement,
|
1363
|
-
testElementStyle,
|
1364
1341
|
tds,
|
1365
1342
|
events,
|
1366
1343
|
eventName,
|
1367
1344
|
i,
|
1368
|
-
isSupported
|
1345
|
+
isSupported,
|
1346
|
+
div = document.createElement( "div" ),
|
1347
|
+
documentElement = document.documentElement;
|
1369
1348
|
|
1370
1349
|
// Preliminary tests
|
1371
1350
|
div.setAttribute("className", "t");
|
1372
|
-
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'
|
1373
|
-
|
1351
|
+
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
|
1374
1352
|
|
1375
1353
|
all = div.getElementsByTagName( "*" );
|
1376
1354
|
a = div.getElementsByTagName( "a" )[ 0 ];
|
@@ -1391,11 +1369,11 @@ jQuery.support = (function() {
|
|
1391
1369
|
|
1392
1370
|
// Make sure that tbody elements aren't automatically inserted
|
1393
1371
|
// IE will insert them into empty tables
|
1394
|
-
tbody: !div.getElementsByTagName(
|
1372
|
+
tbody: !div.getElementsByTagName("tbody").length,
|
1395
1373
|
|
1396
1374
|
// Make sure that link elements get serialized correctly by innerHTML
|
1397
1375
|
// This requires a wrapper element in IE
|
1398
|
-
htmlSerialize: !!div.getElementsByTagName(
|
1376
|
+
htmlSerialize: !!div.getElementsByTagName("link").length,
|
1399
1377
|
|
1400
1378
|
// Get the style information from getAttribute
|
1401
1379
|
// (IE uses .cssText instead)
|
@@ -1403,7 +1381,7 @@ jQuery.support = (function() {
|
|
1403
1381
|
|
1404
1382
|
// Make sure that URLs aren't manipulated
|
1405
1383
|
// (IE normalizes it by default)
|
1406
|
-
hrefNormalized: ( a.getAttribute(
|
1384
|
+
hrefNormalized: ( a.getAttribute("href") === "/a" ),
|
1407
1385
|
|
1408
1386
|
// Make sure that element opacity exists
|
1409
1387
|
// (IE uses filter instead)
|
@@ -1414,9 +1392,6 @@ jQuery.support = (function() {
|
|
1414
1392
|
// (IE uses styleFloat instead of cssFloat)
|
1415
1393
|
cssFloat: !!a.style.cssFloat,
|
1416
1394
|
|
1417
|
-
// Make sure unknown elements (like HTML5 elems) are handled appropriately
|
1418
|
-
unknownElems: !!div.getElementsByTagName( "nav" ).length,
|
1419
|
-
|
1420
1395
|
// Make sure that if no value is specified for a checkbox
|
1421
1396
|
// that it defaults to "on".
|
1422
1397
|
// (WebKit defaults to "" instead)
|
@@ -1432,6 +1407,10 @@ jQuery.support = (function() {
|
|
1432
1407
|
// Tests for enctype support on a form(#6743)
|
1433
1408
|
enctype: !!document.createElement("form").enctype,
|
1434
1409
|
|
1410
|
+
// Makes sure cloning an html5 element does not cause problems
|
1411
|
+
// Where outerHTML is undefined, this still works
|
1412
|
+
html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
|
1413
|
+
|
1435
1414
|
// Will be defined later
|
1436
1415
|
submitBubbles: true,
|
1437
1416
|
changeBubbles: true,
|
@@ -1484,81 +1463,13 @@ jQuery.support = (function() {
|
|
1484
1463
|
// WebKit doesn't clone checked state correctly in fragments
|
1485
1464
|
support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
1486
1465
|
|
1487
|
-
div.innerHTML = "";
|
1488
|
-
|
1489
|
-
// Figure out if the W3C box model works as expected
|
1490
|
-
div.style.width = div.style.paddingLeft = "1px";
|
1491
|
-
|
1492
|
-
// We don't want to do body-related feature tests on frameset
|
1493
|
-
// documents, which lack a body. So we use
|
1494
|
-
// document.getElementsByTagName("body")[0], which is undefined in
|
1495
|
-
// frameset documents, while document.body isn’t. (7398)
|
1496
|
-
body = document.getElementsByTagName("body")[ 0 ];
|
1497
|
-
// We use our own, invisible, body unless the body is already present
|
1498
|
-
// in which case we use a div (#9239)
|
1499
|
-
testElement = document.createElement( body ? "div" : "body" );
|
1500
|
-
testElementStyle = {
|
1501
|
-
visibility: "hidden",
|
1502
|
-
width: 0,
|
1503
|
-
height: 0,
|
1504
|
-
border: 0,
|
1505
|
-
margin: 0,
|
1506
|
-
background: "none"
|
1507
|
-
};
|
1508
|
-
if ( body ) {
|
1509
|
-
jQuery.extend( testElementStyle, {
|
1510
|
-
position: "absolute",
|
1511
|
-
left: "-999px",
|
1512
|
-
top: "-999px"
|
1513
|
-
});
|
1514
|
-
}
|
1515
|
-
for ( i in testElementStyle ) {
|
1516
|
-
testElement.style[ i ] = testElementStyle[ i ];
|
1517
|
-
}
|
1518
|
-
testElement.appendChild( div );
|
1519
|
-
testElementParent = body || documentElement;
|
1520
|
-
testElementParent.insertBefore( testElement, testElementParent.firstChild );
|
1521
|
-
|
1522
1466
|
// Check if a disconnected checkbox will retain its checked
|
1523
1467
|
// value of true after appended to the DOM (IE6/7)
|
1524
1468
|
support.appendChecked = input.checked;
|
1525
1469
|
|
1526
|
-
|
1527
|
-
|
1528
|
-
if ( "zoom" in div.style ) {
|
1529
|
-
// Check if natively block-level elements act like inline-block
|
1530
|
-
// elements when setting their display to 'inline' and giving
|
1531
|
-
// them layout
|
1532
|
-
// (IE < 8 does this)
|
1533
|
-
div.style.display = "inline";
|
1534
|
-
div.style.zoom = 1;
|
1535
|
-
support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
|
1536
|
-
|
1537
|
-
// Check if elements with layout shrink-wrap their children
|
1538
|
-
// (IE 6 does this)
|
1539
|
-
div.style.display = "";
|
1540
|
-
div.innerHTML = "<div style='width:4px;'></div>";
|
1541
|
-
support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
|
1542
|
-
}
|
1543
|
-
|
1544
|
-
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
|
1545
|
-
tds = div.getElementsByTagName( "td" );
|
1546
|
-
|
1547
|
-
// Check if table cells still have offsetWidth/Height when they are set
|
1548
|
-
// to display:none and there are still other visible table cells in a
|
1549
|
-
// table row; if so, offsetWidth/Height are not reliable for use when
|
1550
|
-
// determining if an element has been hidden directly using
|
1551
|
-
// display:none (it is still safe to use offsets if a parent element is
|
1552
|
-
// hidden; don safety goggles and see bug #4512 for more information).
|
1553
|
-
// (only IE 8 fails this test)
|
1554
|
-
isSupported = ( tds[ 0 ].offsetHeight === 0 );
|
1555
|
-
|
1556
|
-
tds[ 0 ].style.display = "";
|
1557
|
-
tds[ 1 ].style.display = "none";
|
1470
|
+
fragment.removeChild( input );
|
1471
|
+
fragment.appendChild( div );
|
1558
1472
|
|
1559
|
-
// Check if empty table cells still have offsetWidth/Height
|
1560
|
-
// (IE < 8 fail this test)
|
1561
|
-
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
|
1562
1473
|
div.innerHTML = "";
|
1563
1474
|
|
1564
1475
|
// Check if div with explicit width and no margin-right incorrectly
|
@@ -1566,13 +1477,14 @@ jQuery.support = (function() {
|
|
1566
1477
|
// info see bug #3333
|
1567
1478
|
// Fails in WebKit before Feb 2011 nightlies
|
1568
1479
|
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
1569
|
-
if (
|
1480
|
+
if ( window.getComputedStyle ) {
|
1570
1481
|
marginDiv = document.createElement( "div" );
|
1571
1482
|
marginDiv.style.width = "0";
|
1572
1483
|
marginDiv.style.marginRight = "0";
|
1484
|
+
div.style.width = "2px";
|
1573
1485
|
div.appendChild( marginDiv );
|
1574
1486
|
support.reliableMarginRight =
|
1575
|
-
( parseInt( (
|
1487
|
+
( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
|
1576
1488
|
}
|
1577
1489
|
|
1578
1490
|
// Technique from Juriy Zaytsev
|
@@ -1586,7 +1498,7 @@ jQuery.support = (function() {
|
|
1586
1498
|
submit: 1,
|
1587
1499
|
change: 1,
|
1588
1500
|
focusin: 1
|
1589
|
-
}
|
1501
|
+
}) {
|
1590
1502
|
eventName = "on" + i;
|
1591
1503
|
isSupported = ( eventName in div );
|
1592
1504
|
if ( !isSupported ) {
|
@@ -1597,37 +1509,81 @@ jQuery.support = (function() {
|
|
1597
1509
|
}
|
1598
1510
|
}
|
1599
1511
|
|
1600
|
-
|
1601
|
-
|
1512
|
+
fragment.removeChild( div );
|
1513
|
+
|
1514
|
+
// Null elements to avoid leaks in IE
|
1515
|
+
fragment = select = opt = marginDiv = div = input = null;
|
1516
|
+
|
1517
|
+
// Run tests that need a body at doc ready
|
1602
1518
|
jQuery(function() {
|
1603
1519
|
var container, outer, inner, table, td, offsetSupport,
|
1604
|
-
conMarginTop
|
1605
|
-
|
1606
|
-
|
1607
|
-
style = "style='" + ptlm + "border:5px solid #000;padding:0;'",
|
1608
|
-
html = "<div " + style + "><div></div></div>" +
|
1609
|
-
"<table " + style + " cellpadding='0' cellspacing='0'>" +
|
1610
|
-
"<tr><td></td></tr></table>";
|
1611
|
-
|
1612
|
-
// Reconstruct a container
|
1613
|
-
body = document.getElementsByTagName("body")[0];
|
1520
|
+
conMarginTop, ptlm, vb, style, html,
|
1521
|
+
body = document.getElementsByTagName("body")[0];
|
1522
|
+
|
1614
1523
|
if ( !body ) {
|
1615
1524
|
// Return for frameset docs that don't have a body
|
1616
|
-
// These tests cannot be done
|
1617
1525
|
return;
|
1618
1526
|
}
|
1619
1527
|
|
1528
|
+
conMarginTop = 1;
|
1529
|
+
ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
|
1530
|
+
vb = "visibility:hidden;border:0;";
|
1531
|
+
style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
|
1532
|
+
html = "<div " + style + "><div></div></div>" +
|
1533
|
+
"<table " + style + " cellpadding='0' cellspacing='0'>" +
|
1534
|
+
"<tr><td></td></tr></table>";
|
1535
|
+
|
1620
1536
|
container = document.createElement("div");
|
1621
1537
|
container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
|
1622
1538
|
body.insertBefore( container, body.firstChild );
|
1623
1539
|
|
1624
|
-
// Construct
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1540
|
+
// Construct the test element
|
1541
|
+
div = document.createElement("div");
|
1542
|
+
container.appendChild( div );
|
1543
|
+
|
1544
|
+
// Check if table cells still have offsetWidth/Height when they are set
|
1545
|
+
// to display:none and there are still other visible table cells in a
|
1546
|
+
// table row; if so, offsetWidth/Height are not reliable for use when
|
1547
|
+
// determining if an element has been hidden directly using
|
1548
|
+
// display:none (it is still safe to use offsets if a parent element is
|
1549
|
+
// hidden; don safety goggles and see bug #4512 for more information).
|
1550
|
+
// (only IE 8 fails this test)
|
1551
|
+
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
|
1552
|
+
tds = div.getElementsByTagName( "td" );
|
1553
|
+
isSupported = ( tds[ 0 ].offsetHeight === 0 );
|
1554
|
+
|
1555
|
+
tds[ 0 ].style.display = "";
|
1556
|
+
tds[ 1 ].style.display = "none";
|
1557
|
+
|
1558
|
+
// Check if empty table cells still have offsetWidth/Height
|
1559
|
+
// (IE <= 8 fail this test)
|
1560
|
+
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
|
1561
|
+
|
1562
|
+
// Figure out if the W3C box model works as expected
|
1563
|
+
div.innerHTML = "";
|
1564
|
+
div.style.width = div.style.paddingLeft = "1px";
|
1565
|
+
jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
|
1566
|
+
|
1567
|
+
if ( typeof div.style.zoom !== "undefined" ) {
|
1568
|
+
// Check if natively block-level elements act like inline-block
|
1569
|
+
// elements when setting their display to 'inline' and giving
|
1570
|
+
// them layout
|
1571
|
+
// (IE < 8 does this)
|
1572
|
+
div.style.display = "inline";
|
1573
|
+
div.style.zoom = 1;
|
1574
|
+
support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
|
1575
|
+
|
1576
|
+
// Check if elements with layout shrink-wrap their children
|
1577
|
+
// (IE 6 does this)
|
1578
|
+
div.style.display = "";
|
1579
|
+
div.innerHTML = "<div style='width:4px;'></div>";
|
1580
|
+
support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
|
1581
|
+
}
|
1582
|
+
|
1583
|
+
div.style.cssText = ptlm + vb;
|
1584
|
+
div.innerHTML = html;
|
1585
|
+
|
1586
|
+
outer = div.firstChild;
|
1631
1587
|
inner = outer.firstChild;
|
1632
1588
|
td = outer.nextSibling.firstChild.firstChild;
|
1633
1589
|
|
@@ -1650,23 +1606,14 @@ jQuery.support = (function() {
|
|
1650
1606
|
offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
|
1651
1607
|
|
1652
1608
|
body.removeChild( container );
|
1653
|
-
|
1609
|
+
div = container = null;
|
1654
1610
|
|
1655
1611
|
jQuery.extend( support, offsetSupport );
|
1656
1612
|
});
|
1657
1613
|
|
1658
|
-
testElement.innerHTML = "";
|
1659
|
-
testElementParent.removeChild( testElement );
|
1660
|
-
|
1661
|
-
// Null connected elements to avoid leaks in IE
|
1662
|
-
testElement = fragment = select = opt = body = marginDiv = div = input = null;
|
1663
|
-
|
1664
1614
|
return support;
|
1665
1615
|
})();
|
1666
1616
|
|
1667
|
-
// Keep track of boxModel
|
1668
|
-
jQuery.boxModel = jQuery.support.boxModel;
|
1669
|
-
|
1670
1617
|
|
1671
1618
|
|
1672
1619
|
|
@@ -1716,7 +1663,7 @@ jQuery.extend({
|
|
1716
1663
|
|
1717
1664
|
// Only defining an ID for JS objects if its cache already exists allows
|
1718
1665
|
// the code to shortcut on the same path as a DOM node with no cache
|
1719
|
-
id = isNode ? elem[
|
1666
|
+
id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
|
1720
1667
|
isEvents = name === "events";
|
1721
1668
|
|
1722
1669
|
// Avoid doing any more work than we need to when trying to get data on an
|
@@ -1729,9 +1676,9 @@ jQuery.extend({
|
|
1729
1676
|
// Only DOM nodes need a new unique ID for each element since their data
|
1730
1677
|
// ends up in the global cache
|
1731
1678
|
if ( isNode ) {
|
1732
|
-
elem[
|
1679
|
+
elem[ internalKey ] = id = ++jQuery.uuid;
|
1733
1680
|
} else {
|
1734
|
-
id =
|
1681
|
+
id = internalKey;
|
1735
1682
|
}
|
1736
1683
|
}
|
1737
1684
|
|
@@ -1814,7 +1761,7 @@ jQuery.extend({
|
|
1814
1761
|
cache = isNode ? jQuery.cache : elem,
|
1815
1762
|
|
1816
1763
|
// See jQuery.data for more information
|
1817
|
-
id = isNode ? elem[
|
1764
|
+
id = isNode ? elem[ internalKey ] : internalKey;
|
1818
1765
|
|
1819
1766
|
// If there is already no cache entry for this object, there is no
|
1820
1767
|
// purpose in continuing
|
@@ -1828,19 +1775,21 @@ jQuery.extend({
|
|
1828
1775
|
|
1829
1776
|
if ( thisCache ) {
|
1830
1777
|
|
1831
|
-
// Support space separated names
|
1832
|
-
if ( jQuery.isArray( name ) ) {
|
1833
|
-
name = name;
|
1834
|
-
} else if ( name in thisCache ) {
|
1835
|
-
name = [ name ];
|
1836
|
-
} else {
|
1778
|
+
// Support array or space separated string names for data keys
|
1779
|
+
if ( !jQuery.isArray( name ) ) {
|
1837
1780
|
|
1838
|
-
//
|
1839
|
-
name = jQuery.camelCase( name );
|
1781
|
+
// try the string as a key before any manipulation
|
1840
1782
|
if ( name in thisCache ) {
|
1841
1783
|
name = [ name ];
|
1842
1784
|
} else {
|
1843
|
-
|
1785
|
+
|
1786
|
+
// split the camel cased version by spaces unless a key with the spaces exists
|
1787
|
+
name = jQuery.camelCase( name );
|
1788
|
+
if ( name in thisCache ) {
|
1789
|
+
name = [ name ];
|
1790
|
+
} else {
|
1791
|
+
name = name.split( " " );
|
1792
|
+
}
|
1844
1793
|
}
|
1845
1794
|
}
|
1846
1795
|
|
@@ -1884,11 +1833,11 @@ jQuery.extend({
|
|
1884
1833
|
// nor does it have a removeAttribute function on Document nodes;
|
1885
1834
|
// we must handle all of these cases
|
1886
1835
|
if ( jQuery.support.deleteExpando ) {
|
1887
|
-
delete elem[
|
1836
|
+
delete elem[ internalKey ];
|
1888
1837
|
} else if ( elem.removeAttribute ) {
|
1889
|
-
elem.removeAttribute(
|
1838
|
+
elem.removeAttribute( internalKey );
|
1890
1839
|
} else {
|
1891
|
-
elem[
|
1840
|
+
elem[ internalKey ] = null;
|
1892
1841
|
}
|
1893
1842
|
}
|
1894
1843
|
},
|
@@ -1962,12 +1911,12 @@ jQuery.fn.extend({
|
|
1962
1911
|
|
1963
1912
|
} else {
|
1964
1913
|
return this.each(function() {
|
1965
|
-
var
|
1914
|
+
var self = jQuery( this ),
|
1966
1915
|
args = [ parts[0], value ];
|
1967
1916
|
|
1968
|
-
|
1917
|
+
self.triggerHandler( "setData" + parts[1] + "!", args );
|
1969
1918
|
jQuery.data( this, key, value );
|
1970
|
-
|
1919
|
+
self.triggerHandler( "changeData" + parts[1] + "!", args );
|
1971
1920
|
});
|
1972
1921
|
}
|
1973
1922
|
},
|
@@ -2380,7 +2329,7 @@ jQuery.fn.extend({
|
|
2380
2329
|
ret == null ? "" : ret;
|
2381
2330
|
}
|
2382
2331
|
|
2383
|
-
return
|
2332
|
+
return;
|
2384
2333
|
}
|
2385
2334
|
|
2386
2335
|
isFunction = jQuery.isFunction( value );
|
@@ -2505,7 +2454,7 @@ jQuery.extend({
|
|
2505
2454
|
|
2506
2455
|
// don't get/set attributes on text, comment and attribute nodes
|
2507
2456
|
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
2508
|
-
return
|
2457
|
+
return;
|
2509
2458
|
}
|
2510
2459
|
|
2511
2460
|
if ( pass && name in jQuery.attrFn ) {
|
@@ -2513,7 +2462,7 @@ jQuery.extend({
|
|
2513
2462
|
}
|
2514
2463
|
|
2515
2464
|
// Fallback to prop when attributes are not supported
|
2516
|
-
if (
|
2465
|
+
if ( typeof elem.getAttribute === "undefined" ) {
|
2517
2466
|
return jQuery.prop( elem, name, value );
|
2518
2467
|
}
|
2519
2468
|
|
@@ -2530,7 +2479,7 @@ jQuery.extend({
|
|
2530
2479
|
|
2531
2480
|
if ( value === null ) {
|
2532
2481
|
jQuery.removeAttr( elem, name );
|
2533
|
-
return
|
2482
|
+
return;
|
2534
2483
|
|
2535
2484
|
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
2536
2485
|
return ret;
|
@@ -2558,21 +2507,24 @@ jQuery.extend({
|
|
2558
2507
|
var propName, attrNames, name, l,
|
2559
2508
|
i = 0;
|
2560
2509
|
|
2561
|
-
if ( elem.nodeType === 1 ) {
|
2562
|
-
attrNames = (
|
2510
|
+
if ( value && elem.nodeType === 1 ) {
|
2511
|
+
attrNames = value.toLowerCase().split( rspace );
|
2563
2512
|
l = attrNames.length;
|
2564
2513
|
|
2565
2514
|
for ( ; i < l; i++ ) {
|
2566
|
-
name = attrNames[ i ]
|
2567
|
-
propName = jQuery.propFix[ name ] || name;
|
2515
|
+
name = attrNames[ i ];
|
2568
2516
|
|
2569
|
-
|
2570
|
-
|
2571
|
-
elem.removeAttribute( getSetAttribute ? name : propName );
|
2517
|
+
if ( name ) {
|
2518
|
+
propName = jQuery.propFix[ name ] || name;
|
2572
2519
|
|
2573
|
-
|
2574
|
-
|
2575
|
-
elem
|
2520
|
+
// See #9699 for explanation of this approach (setting first, then removal)
|
2521
|
+
jQuery.attr( elem, name, "" );
|
2522
|
+
elem.removeAttribute( getSetAttribute ? name : propName );
|
2523
|
+
|
2524
|
+
// Set corresponding property to false for boolean attributes
|
2525
|
+
if ( rboolean.test( name ) && propName in elem ) {
|
2526
|
+
elem[ propName ] = false;
|
2527
|
+
}
|
2576
2528
|
}
|
2577
2529
|
}
|
2578
2530
|
}
|
@@ -2639,7 +2591,7 @@ jQuery.extend({
|
|
2639
2591
|
|
2640
2592
|
// don't get/set properties on text, comment and attribute nodes
|
2641
2593
|
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
2642
|
-
return
|
2594
|
+
return;
|
2643
2595
|
}
|
2644
2596
|
|
2645
2597
|
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
@@ -2852,15 +2804,12 @@ jQuery.each([ "radio", "checkbox" ], function() {
|
|
2852
2804
|
|
2853
2805
|
|
2854
2806
|
|
2855
|
-
var
|
2856
|
-
rformElems = /^(?:textarea|input|select)$/i,
|
2857
|
-
rperiod = /\./g,
|
2858
|
-
rspaces = / /g,
|
2859
|
-
rescape = /[^\w\s.|`]/g,
|
2807
|
+
var rformElems = /^(?:textarea|input|select)$/i,
|
2860
2808
|
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
|
2861
|
-
rhoverHack = /\bhover(\.\S+)
|
2809
|
+
rhoverHack = /\bhover(\.\S+)?\b/,
|
2862
2810
|
rkeyEvent = /^key/,
|
2863
2811
|
rmouseEvent = /^(?:mouse|contextmenu)|click/,
|
2812
|
+
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
2864
2813
|
rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
|
2865
2814
|
quickParse = function( selector ) {
|
2866
2815
|
var quick = rquickIs.exec( selector );
|
@@ -2873,10 +2822,11 @@ var rnamespaces = /\.(.*)$/,
|
|
2873
2822
|
return quick;
|
2874
2823
|
},
|
2875
2824
|
quickIs = function( elem, m ) {
|
2825
|
+
var attrs = elem.attributes || {};
|
2876
2826
|
return (
|
2877
2827
|
(!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
|
2878
|
-
(!m[2] ||
|
2879
|
-
(!m[3] || m[3].test(
|
2828
|
+
(!m[2] || (attrs.id || {}).value === m[2]) &&
|
2829
|
+
(!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
|
2880
2830
|
);
|
2881
2831
|
},
|
2882
2832
|
hoverHack = function( events ) {
|
@@ -2931,7 +2881,7 @@ jQuery.event = {
|
|
2931
2881
|
|
2932
2882
|
// Handle multiple events separated by a space
|
2933
2883
|
// jQuery(...).bind("mouseover mouseout", fn);
|
2934
|
-
types = hoverHack(types).split( " " );
|
2884
|
+
types = jQuery.trim( hoverHack(types) ).split( " " );
|
2935
2885
|
for ( t = 0; t < types.length; t++ ) {
|
2936
2886
|
|
2937
2887
|
tns = rtypenamespace.exec( types[t] ) || [];
|
@@ -2955,17 +2905,10 @@ jQuery.event = {
|
|
2955
2905
|
handler: handler,
|
2956
2906
|
guid: handler.guid,
|
2957
2907
|
selector: selector,
|
2908
|
+
quick: quickParse( selector ),
|
2958
2909
|
namespace: namespaces.join(".")
|
2959
2910
|
}, handleObjIn );
|
2960
2911
|
|
2961
|
-
// Delegated event; pre-analyze selector so it's processed quickly on event dispatch
|
2962
|
-
if ( selector ) {
|
2963
|
-
handleObj.quick = quickParse( selector );
|
2964
|
-
if ( !handleObj.quick && jQuery.expr.match.POS.test( selector ) ) {
|
2965
|
-
handleObj.isPositional = true;
|
2966
|
-
}
|
2967
|
-
}
|
2968
|
-
|
2969
2912
|
// Init the event handler queue if we're the first
|
2970
2913
|
handlers = events[ type ];
|
2971
2914
|
if ( !handlers ) {
|
@@ -3010,10 +2953,10 @@ jQuery.event = {
|
|
3010
2953
|
global: {},
|
3011
2954
|
|
3012
2955
|
// Detach an event or set of events from an element
|
3013
|
-
remove: function( elem, types, handler, selector ) {
|
2956
|
+
remove: function( elem, types, handler, selector, mappedTypes ) {
|
3014
2957
|
|
3015
2958
|
var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
|
3016
|
-
t, tns, type, namespaces, origCount,
|
2959
|
+
t, tns, type, origType, namespaces, origCount,
|
3017
2960
|
j, events, special, handle, eventType, handleObj;
|
3018
2961
|
|
3019
2962
|
if ( !elemData || !(events = elemData.events) ) {
|
@@ -3021,19 +2964,18 @@ jQuery.event = {
|
|
3021
2964
|
}
|
3022
2965
|
|
3023
2966
|
// Once for each type.namespace in types; type may be omitted
|
3024
|
-
types = hoverHack( types || "" ).split(" ");
|
2967
|
+
types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
|
3025
2968
|
for ( t = 0; t < types.length; t++ ) {
|
3026
2969
|
tns = rtypenamespace.exec( types[t] ) || [];
|
3027
|
-
type = tns[1];
|
2970
|
+
type = origType = tns[1];
|
3028
2971
|
namespaces = tns[2];
|
3029
2972
|
|
3030
2973
|
// Unbind all events (on this namespace, if provided) for the element
|
3031
2974
|
if ( !type ) {
|
3032
|
-
|
3033
|
-
|
3034
|
-
jQuery.event.remove( elem, j + namespaces, handler, selector );
|
2975
|
+
for ( type in events ) {
|
2976
|
+
jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
|
3035
2977
|
}
|
3036
|
-
|
2978
|
+
continue;
|
3037
2979
|
}
|
3038
2980
|
|
3039
2981
|
special = jQuery.event.special[ type ] || {};
|
@@ -3042,29 +2984,23 @@ jQuery.event = {
|
|
3042
2984
|
origCount = eventType.length;
|
3043
2985
|
namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
|
3044
2986
|
|
3045
|
-
//
|
3046
|
-
|
3047
|
-
|
3048
|
-
handleObj = eventType[ j ];
|
2987
|
+
// Remove matching events
|
2988
|
+
for ( j = 0; j < eventType.length; j++ ) {
|
2989
|
+
handleObj = eventType[ j ];
|
3049
2990
|
|
3050
|
-
|
3051
|
-
|
3052
|
-
|
3053
|
-
|
2991
|
+
if ( ( mappedTypes || origType === handleObj.origType ) &&
|
2992
|
+
( !handler || handler.guid === handleObj.guid ) &&
|
2993
|
+
( !namespaces || namespaces.test( handleObj.namespace ) ) &&
|
2994
|
+
( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
|
2995
|
+
eventType.splice( j--, 1 );
|
3054
2996
|
|
3055
|
-
|
3056
|
-
|
3057
|
-
|
3058
|
-
|
3059
|
-
|
3060
|
-
}
|
3061
|
-
}
|
3062
|
-
}
|
2997
|
+
if ( handleObj.selector ) {
|
2998
|
+
eventType.delegateCount--;
|
2999
|
+
}
|
3000
|
+
if ( special.remove ) {
|
3001
|
+
special.remove.call( elem, handleObj );
|
3063
3002
|
}
|
3064
3003
|
}
|
3065
|
-
} else {
|
3066
|
-
// Removing all events
|
3067
|
-
eventType.length = 0;
|
3068
3004
|
}
|
3069
3005
|
|
3070
3006
|
// Remove generic event handler if we removed something and no more handlers exist
|
@@ -3110,6 +3046,11 @@ jQuery.event = {
|
|
3110
3046
|
namespaces = [],
|
3111
3047
|
cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
|
3112
3048
|
|
3049
|
+
// focus/blur morphs to focusin/out; ensure we're not firing them right now
|
3050
|
+
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
|
3051
|
+
return;
|
3052
|
+
}
|
3053
|
+
|
3113
3054
|
if ( type.indexOf( "!" ) >= 0 ) {
|
3114
3055
|
// Exclusive events trigger only for the exact event (no namespaces)
|
3115
3056
|
type = type.slice(0, -1);
|
@@ -3144,11 +3085,6 @@ jQuery.event = {
|
|
3144
3085
|
event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
|
3145
3086
|
ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
|
3146
3087
|
|
3147
|
-
// triggerHandler() and global events don't bubble or run the default action
|
3148
|
-
if ( onlyHandlers || !elem ) {
|
3149
|
-
event.preventDefault();
|
3150
|
-
}
|
3151
|
-
|
3152
3088
|
// Handle a global trigger
|
3153
3089
|
if ( !elem ) {
|
3154
3090
|
|
@@ -3184,8 +3120,9 @@ jQuery.event = {
|
|
3184
3120
|
if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
|
3185
3121
|
|
3186
3122
|
bubbleType = special.delegateType || type;
|
3123
|
+
cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
|
3187
3124
|
old = null;
|
3188
|
-
for (
|
3125
|
+
for ( ; cur; cur = cur.parentNode ) {
|
3189
3126
|
eventPath.push([ cur, bubbleType ]);
|
3190
3127
|
old = cur;
|
3191
3128
|
}
|
@@ -3197,7 +3134,7 @@ jQuery.event = {
|
|
3197
3134
|
}
|
3198
3135
|
|
3199
3136
|
// Fire handlers on the event path
|
3200
|
-
for ( i = 0; i < eventPath.length; i++ ) {
|
3137
|
+
for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
|
3201
3138
|
|
3202
3139
|
cur = eventPath[i][0];
|
3203
3140
|
event.type = eventPath[i][1];
|
@@ -3206,19 +3143,16 @@ jQuery.event = {
|
|
3206
3143
|
if ( handle ) {
|
3207
3144
|
handle.apply( cur, data );
|
3208
3145
|
}
|
3146
|
+
// Note that this is a bare JS function and not a jQuery handler
|
3209
3147
|
handle = ontype && cur[ ontype ];
|
3210
|
-
if ( handle && jQuery.acceptData( cur ) ) {
|
3211
|
-
|
3212
|
-
}
|
3213
|
-
|
3214
|
-
if ( event.isPropagationStopped() ) {
|
3215
|
-
break;
|
3148
|
+
if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
|
3149
|
+
event.preventDefault();
|
3216
3150
|
}
|
3217
3151
|
}
|
3218
3152
|
event.type = type;
|
3219
3153
|
|
3220
3154
|
// If nobody prevented the default action, do it now
|
3221
|
-
if ( !event.isDefaultPrevented() ) {
|
3155
|
+
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
|
3222
3156
|
|
3223
3157
|
if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
|
3224
3158
|
!(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
|
@@ -3260,9 +3194,8 @@ jQuery.event = {
|
|
3260
3194
|
delegateCount = handlers.delegateCount,
|
3261
3195
|
args = [].slice.call( arguments, 0 ),
|
3262
3196
|
run_all = !event.exclusive && !event.namespace,
|
3263
|
-
specialHandle = ( jQuery.event.special[ event.type ] || {} ).handle,
|
3264
3197
|
handlerQueue = [],
|
3265
|
-
i, j, cur, ret, selMatch, matched, matches, handleObj, sel,
|
3198
|
+
i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
|
3266
3199
|
|
3267
3200
|
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
3268
3201
|
args[0] = event;
|
@@ -3272,21 +3205,24 @@ jQuery.event = {
|
|
3272
3205
|
// Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)
|
3273
3206
|
if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
|
3274
3207
|
|
3208
|
+
// Pregenerate a single jQuery object for reuse with .is()
|
3209
|
+
jqcur = jQuery(this);
|
3210
|
+
jqcur.context = this.ownerDocument || this;
|
3211
|
+
|
3275
3212
|
for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
|
3276
3213
|
selMatch = {};
|
3277
3214
|
matches = [];
|
3215
|
+
jqcur[0] = cur;
|
3278
3216
|
for ( i = 0; i < delegateCount; i++ ) {
|
3279
3217
|
handleObj = handlers[ i ];
|
3280
3218
|
sel = handleObj.selector;
|
3281
|
-
hit = selMatch[ sel ];
|
3282
3219
|
|
3283
|
-
if (
|
3284
|
-
|
3285
|
-
|
3286
|
-
|
3287
|
-
hit = selMatch[ sel ] = ( handleObj.quick ? quickIs( cur, handleObj.quick ) : jQuery( cur ).is( sel ) );
|
3220
|
+
if ( selMatch[ sel ] === undefined ) {
|
3221
|
+
selMatch[ sel ] = (
|
3222
|
+
handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
|
3223
|
+
);
|
3288
3224
|
}
|
3289
|
-
if (
|
3225
|
+
if ( selMatch[ sel ] ) {
|
3290
3226
|
matches.push( handleObj );
|
3291
3227
|
}
|
3292
3228
|
}
|
@@ -3316,7 +3252,8 @@ jQuery.event = {
|
|
3316
3252
|
event.data = handleObj.data;
|
3317
3253
|
event.handleObj = handleObj;
|
3318
3254
|
|
3319
|
-
ret = (
|
3255
|
+
ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
|
3256
|
+
.apply( matched.elem, args );
|
3320
3257
|
|
3321
3258
|
if ( ret !== undefined ) {
|
3322
3259
|
event.result = ret;
|
@@ -3352,7 +3289,7 @@ jQuery.event = {
|
|
3352
3289
|
},
|
3353
3290
|
|
3354
3291
|
mouseHooks: {
|
3355
|
-
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement
|
3292
|
+
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
|
3356
3293
|
filter: function( event, original ) {
|
3357
3294
|
var eventDoc, doc, body,
|
3358
3295
|
button = original.button,
|
@@ -3425,13 +3362,16 @@ jQuery.event = {
|
|
3425
3362
|
setup: jQuery.bindReady
|
3426
3363
|
},
|
3427
3364
|
|
3428
|
-
|
3429
|
-
|
3365
|
+
load: {
|
3366
|
+
// Prevent triggered image.load events from bubbling to window.load
|
3430
3367
|
noBubble: true
|
3431
3368
|
},
|
3369
|
+
|
3370
|
+
focus: {
|
3371
|
+
delegateType: "focusin"
|
3372
|
+
},
|
3432
3373
|
blur: {
|
3433
|
-
delegateType: "focusout"
|
3434
|
-
noBubble: true
|
3374
|
+
delegateType: "focusout"
|
3435
3375
|
},
|
3436
3376
|
|
3437
3377
|
beforeunload: {
|
@@ -3577,7 +3517,7 @@ jQuery.each({
|
|
3577
3517
|
mouseenter: "mouseover",
|
3578
3518
|
mouseleave: "mouseout"
|
3579
3519
|
}, function( orig, fix ) {
|
3580
|
-
jQuery.event.special[ orig ] =
|
3520
|
+
jQuery.event.special[ orig ] = {
|
3581
3521
|
delegateType: fix,
|
3582
3522
|
bindType: fix,
|
3583
3523
|
|
@@ -3586,16 +3526,14 @@ jQuery.each({
|
|
3586
3526
|
related = event.relatedTarget,
|
3587
3527
|
handleObj = event.handleObj,
|
3588
3528
|
selector = handleObj.selector,
|
3589
|
-
|
3529
|
+
ret;
|
3590
3530
|
|
3591
|
-
// For
|
3592
|
-
// mousenter/leave call the handler if related is outside the target.
|
3531
|
+
// For mousenter/leave call the handler if related is outside the target.
|
3593
3532
|
// NB: No relatedTarget if the mouse left/entered the browser window
|
3594
|
-
if ( !related ||
|
3595
|
-
oldType = event.type;
|
3533
|
+
if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
|
3596
3534
|
event.type = handleObj.origType;
|
3597
3535
|
ret = handleObj.handler.apply( this, arguments );
|
3598
|
-
event.type =
|
3536
|
+
event.type = fix;
|
3599
3537
|
}
|
3600
3538
|
return ret;
|
3601
3539
|
}
|
@@ -3619,8 +3557,8 @@ if ( !jQuery.support.submitBubbles ) {
|
|
3619
3557
|
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
|
3620
3558
|
if ( form && !form._submit_attached ) {
|
3621
3559
|
jQuery.event.add( form, "submit._submit", function( event ) {
|
3622
|
-
//
|
3623
|
-
if ( this.parentNode ) {
|
3560
|
+
// If form was submitted by the user, bubble the event up the tree
|
3561
|
+
if ( this.parentNode && !event.isTrigger ) {
|
3624
3562
|
jQuery.event.simulate( "submit", this.parentNode, event, true );
|
3625
3563
|
}
|
3626
3564
|
});
|
@@ -3660,7 +3598,7 @@ if ( !jQuery.support.changeBubbles ) {
|
|
3660
3598
|
}
|
3661
3599
|
});
|
3662
3600
|
jQuery.event.add( this, "click._change", function( event ) {
|
3663
|
-
if ( this._just_changed ) {
|
3601
|
+
if ( this._just_changed && !event.isTrigger ) {
|
3664
3602
|
this._just_changed = false;
|
3665
3603
|
jQuery.event.simulate( "change", this, event, true );
|
3666
3604
|
}
|
@@ -3674,7 +3612,7 @@ if ( !jQuery.support.changeBubbles ) {
|
|
3674
3612
|
|
3675
3613
|
if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
|
3676
3614
|
jQuery.event.add( elem, "change._change", function( event ) {
|
3677
|
-
if ( this.parentNode && !event.isSimulated ) {
|
3615
|
+
if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
|
3678
3616
|
jQuery.event.simulate( "change", this.parentNode, event, true );
|
3679
3617
|
}
|
3680
3618
|
});
|
@@ -3892,7 +3830,7 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
|
|
3892
3830
|
}
|
3893
3831
|
|
3894
3832
|
return arguments.length > 0 ?
|
3895
|
-
this.
|
3833
|
+
this.on( name, null, data, fn ) :
|
3896
3834
|
this.trigger( name );
|
3897
3835
|
};
|
3898
3836
|
|
@@ -4238,7 +4176,7 @@ Sizzle.filter = function( expr, set, inplace, not ) {
|
|
4238
4176
|
};
|
4239
4177
|
|
4240
4178
|
Sizzle.error = function( msg ) {
|
4241
|
-
throw "Syntax error, unrecognized expression: " + msg;
|
4179
|
+
throw new Error( "Syntax error, unrecognized expression: " + msg );
|
4242
4180
|
};
|
4243
4181
|
|
4244
4182
|
/**
|
@@ -4251,7 +4189,7 @@ var getText = Sizzle.getText = function( elem ) {
|
|
4251
4189
|
ret = "";
|
4252
4190
|
|
4253
4191
|
if ( nodeType ) {
|
4254
|
-
if ( nodeType === 1 ) {
|
4192
|
+
if ( nodeType === 1 || nodeType === 9 ) {
|
4255
4193
|
// Use textContent || innerText for elements
|
4256
4194
|
if ( typeof elem.textContent === 'string' ) {
|
4257
4195
|
return elem.textContent;
|
@@ -5579,12 +5517,7 @@ jQuery.each({
|
|
5579
5517
|
}
|
5580
5518
|
}, function( name, fn ) {
|
5581
5519
|
jQuery.fn[ name ] = function( until, selector ) {
|
5582
|
-
var ret = jQuery.map( this, fn, until )
|
5583
|
-
// The variable 'args' was introduced in
|
5584
|
-
// https://github.com/jquery/jquery/commit/52a0238
|
5585
|
-
// to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
|
5586
|
-
// http://code.google.com/p/v8/issues/detail?id=1050
|
5587
|
-
args = slice.call(arguments);
|
5520
|
+
var ret = jQuery.map( this, fn, until );
|
5588
5521
|
|
5589
5522
|
if ( !runtil.test( name ) ) {
|
5590
5523
|
selector = until;
|
@@ -5600,7 +5533,7 @@ jQuery.each({
|
|
5600
5533
|
ret = ret.reverse();
|
5601
5534
|
}
|
5602
5535
|
|
5603
|
-
return this.pushStack( ret, name,
|
5536
|
+
return this.pushStack( ret, name, slice.call( arguments ).join(",") );
|
5604
5537
|
};
|
5605
5538
|
});
|
5606
5539
|
|
@@ -5693,7 +5626,7 @@ function winnow( elements, qualifier, keep ) {
|
|
5693
5626
|
|
5694
5627
|
|
5695
5628
|
function createSafeFragment( document ) {
|
5696
|
-
var list = nodeNames.split( "
|
5629
|
+
var list = nodeNames.split( "|" ),
|
5697
5630
|
safeFrag = document.createDocumentFragment();
|
5698
5631
|
|
5699
5632
|
if ( safeFrag.createElement ) {
|
@@ -5706,8 +5639,8 @@ function createSafeFragment( document ) {
|
|
5706
5639
|
return safeFrag;
|
5707
5640
|
}
|
5708
5641
|
|
5709
|
-
var nodeNames = "abbr
|
5710
|
-
"header
|
5642
|
+
var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" +
|
5643
|
+
"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
|
5711
5644
|
rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
|
5712
5645
|
rleadingWhitespace = /^\s+/,
|
5713
5646
|
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
|
@@ -5716,7 +5649,7 @@ var nodeNames = "abbr article aside audio canvas datalist details figcaption fig
|
|
5716
5649
|
rhtml = /<|&#?\w+;/,
|
5717
5650
|
rnoInnerhtml = /<(?:script|style)/i,
|
5718
5651
|
rnocache = /<(?:script|object|embed|option|style)/i,
|
5719
|
-
rnoshimcache = new RegExp("<(?:" + nodeNames
|
5652
|
+
rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"),
|
5720
5653
|
// checked="checked" or checked
|
5721
5654
|
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
5722
5655
|
rscriptType = /\/(java|ecma)script/i,
|
@@ -5809,8 +5742,10 @@ jQuery.fn.extend({
|
|
5809
5742
|
},
|
5810
5743
|
|
5811
5744
|
wrap: function( html ) {
|
5812
|
-
|
5813
|
-
|
5745
|
+
var isFunction = jQuery.isFunction( html );
|
5746
|
+
|
5747
|
+
return this.each(function(i) {
|
5748
|
+
jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
|
5814
5749
|
});
|
5815
5750
|
},
|
5816
5751
|
|
@@ -5844,7 +5779,7 @@ jQuery.fn.extend({
|
|
5844
5779
|
this.parentNode.insertBefore( elem, this );
|
5845
5780
|
});
|
5846
5781
|
} else if ( arguments.length ) {
|
5847
|
-
var set = jQuery(arguments
|
5782
|
+
var set = jQuery.clean( arguments );
|
5848
5783
|
set.push.apply( set, this.toArray() );
|
5849
5784
|
return this.pushStack( set, "before", arguments );
|
5850
5785
|
}
|
@@ -5857,7 +5792,7 @@ jQuery.fn.extend({
|
|
5857
5792
|
});
|
5858
5793
|
} else if ( arguments.length ) {
|
5859
5794
|
var set = this.pushStack( this, "after", arguments );
|
5860
|
-
set.push.apply( set, jQuery(arguments
|
5795
|
+
set.push.apply( set, jQuery.clean(arguments) );
|
5861
5796
|
return set;
|
5862
5797
|
}
|
5863
5798
|
},
|
@@ -6158,7 +6093,7 @@ jQuery.buildFragment = function( args, nodes, scripts ) {
|
|
6158
6093
|
doc = nodes[0].ownerDocument || nodes[0];
|
6159
6094
|
}
|
6160
6095
|
|
6161
|
-
|
6096
|
+
// Ensure that an attr object doesn't incorrectly stand in as a document object
|
6162
6097
|
// Chrome and Firefox seem to allow this to occur and will throw exception
|
6163
6098
|
// Fixes #8950
|
6164
6099
|
if ( !doc.createDocumentFragment ) {
|
@@ -6173,7 +6108,7 @@ jQuery.buildFragment = function( args, nodes, scripts ) {
|
|
6173
6108
|
if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
|
6174
6109
|
first.charAt(0) === "<" && !rnocache.test( first ) &&
|
6175
6110
|
(jQuery.support.checkClone || !rchecked.test( first )) &&
|
6176
|
-
(
|
6111
|
+
(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
|
6177
6112
|
|
6178
6113
|
cacheable = true;
|
6179
6114
|
|
@@ -6254,12 +6189,24 @@ function findInputs( elem ) {
|
|
6254
6189
|
}
|
6255
6190
|
}
|
6256
6191
|
|
6192
|
+
// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
|
6193
|
+
function shimCloneNode( elem ) {
|
6194
|
+
var div = document.createElement( "div" );
|
6195
|
+
safeFragment.appendChild( div );
|
6196
|
+
|
6197
|
+
div.innerHTML = elem.outerHTML;
|
6198
|
+
return div.firstChild;
|
6199
|
+
}
|
6200
|
+
|
6257
6201
|
jQuery.extend({
|
6258
6202
|
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
6259
|
-
var
|
6260
|
-
|
6261
|
-
|
6262
|
-
|
6203
|
+
var srcElements,
|
6204
|
+
destElements,
|
6205
|
+
i,
|
6206
|
+
// IE<=8 does not properly clone detached, unknown element nodes
|
6207
|
+
clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ?
|
6208
|
+
elem.cloneNode( true ) :
|
6209
|
+
shimCloneNode( elem );
|
6263
6210
|
|
6264
6211
|
if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
|
6265
6212
|
(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
|
@@ -6271,8 +6218,7 @@ jQuery.extend({
|
|
6271
6218
|
|
6272
6219
|
cloneFixAttributes( elem, clone );
|
6273
6220
|
|
6274
|
-
// Using Sizzle here is crazy slow, so we use getElementsByTagName
|
6275
|
-
// instead
|
6221
|
+
// Using Sizzle here is crazy slow, so we use getElementsByTagName instead
|
6276
6222
|
srcElements = getAll( elem );
|
6277
6223
|
destElements = getAll( clone );
|
6278
6224
|
|
@@ -6763,11 +6709,8 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
|
6763
6709
|
|
6764
6710
|
name = name.replace( rupper, "-$1" ).toLowerCase();
|
6765
6711
|
|
6766
|
-
if (
|
6767
|
-
|
6768
|
-
}
|
6769
|
-
|
6770
|
-
if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
|
6712
|
+
if ( (defaultView = elem.ownerDocument.defaultView) &&
|
6713
|
+
(computedStyle = defaultView.getComputedStyle( elem, null )) ) {
|
6771
6714
|
ret = computedStyle.getPropertyValue( name );
|
6772
6715
|
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
|
6773
6716
|
ret = jQuery.style( elem, name );
|
@@ -6825,20 +6768,22 @@ function getWH( elem, name, extra ) {
|
|
6825
6768
|
|
6826
6769
|
// Start with offset property
|
6827
6770
|
var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
|
6828
|
-
which = name === "width" ? cssWidth : cssHeight
|
6771
|
+
which = name === "width" ? cssWidth : cssHeight,
|
6772
|
+
i = 0,
|
6773
|
+
len = which.length;
|
6829
6774
|
|
6830
6775
|
if ( val > 0 ) {
|
6831
6776
|
if ( extra !== "border" ) {
|
6832
|
-
|
6777
|
+
for ( ; i < len; i++ ) {
|
6833
6778
|
if ( !extra ) {
|
6834
|
-
val -= parseFloat( jQuery.css( elem, "padding" +
|
6779
|
+
val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
|
6835
6780
|
}
|
6836
6781
|
if ( extra === "margin" ) {
|
6837
|
-
val += parseFloat( jQuery.css( elem, extra +
|
6782
|
+
val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
|
6838
6783
|
} else {
|
6839
|
-
val -= parseFloat( jQuery.css( elem, "border" +
|
6784
|
+
val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
|
6840
6785
|
}
|
6841
|
-
}
|
6786
|
+
}
|
6842
6787
|
}
|
6843
6788
|
|
6844
6789
|
return val + "px";
|
@@ -6854,15 +6799,15 @@ function getWH( elem, name, extra ) {
|
|
6854
6799
|
|
6855
6800
|
// Add padding, border, margin
|
6856
6801
|
if ( extra ) {
|
6857
|
-
|
6858
|
-
val += parseFloat( jQuery.css( elem, "padding" +
|
6802
|
+
for ( ; i < len; i++ ) {
|
6803
|
+
val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
|
6859
6804
|
if ( extra !== "padding" ) {
|
6860
|
-
val += parseFloat( jQuery.css( elem, "border" +
|
6805
|
+
val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
|
6861
6806
|
}
|
6862
6807
|
if ( extra === "margin" ) {
|
6863
|
-
val += parseFloat( jQuery.css( elem, extra +
|
6808
|
+
val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
|
6864
6809
|
}
|
6865
|
-
}
|
6810
|
+
}
|
6866
6811
|
}
|
6867
6812
|
|
6868
6813
|
return val + "px";
|
@@ -7145,7 +7090,7 @@ jQuery.fn.extend({
|
|
7145
7090
|
// Attach a bunch of functions for handling common AJAX events
|
7146
7091
|
jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
|
7147
7092
|
jQuery.fn[ o ] = function( f ){
|
7148
|
-
return this.
|
7093
|
+
return this.on( o, f );
|
7149
7094
|
};
|
7150
7095
|
});
|
7151
7096
|
|
@@ -7639,7 +7584,7 @@ jQuery.extend({
|
|
7639
7584
|
done( -1, e );
|
7640
7585
|
// Simply rethrow otherwise
|
7641
7586
|
} else {
|
7642
|
-
|
7587
|
+
throw e;
|
7643
7588
|
}
|
7644
7589
|
}
|
7645
7590
|
}
|
@@ -8534,7 +8479,7 @@ jQuery.fn.extend({
|
|
8534
8479
|
}
|
8535
8480
|
|
8536
8481
|
return this.each(function() {
|
8537
|
-
var
|
8482
|
+
var index,
|
8538
8483
|
hadTimers = false,
|
8539
8484
|
timers = jQuery.timers,
|
8540
8485
|
data = jQuery._data( this );
|
@@ -8544,33 +8489,33 @@ jQuery.fn.extend({
|
|
8544
8489
|
jQuery._unmark( true, this );
|
8545
8490
|
}
|
8546
8491
|
|
8547
|
-
function stopQueue( elem, data,
|
8548
|
-
var hooks = data[
|
8549
|
-
jQuery.removeData( elem,
|
8492
|
+
function stopQueue( elem, data, index ) {
|
8493
|
+
var hooks = data[ index ];
|
8494
|
+
jQuery.removeData( elem, index, true );
|
8550
8495
|
hooks.stop( gotoEnd );
|
8551
8496
|
}
|
8552
8497
|
|
8553
8498
|
if ( type == null ) {
|
8554
|
-
for (
|
8555
|
-
if ( data[
|
8556
|
-
stopQueue( this, data,
|
8499
|
+
for ( index in data ) {
|
8500
|
+
if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
|
8501
|
+
stopQueue( this, data, index );
|
8557
8502
|
}
|
8558
8503
|
}
|
8559
|
-
} else if ( data[
|
8560
|
-
stopQueue( this, data,
|
8504
|
+
} else if ( data[ index = type + ".run" ] && data[ index ].stop ){
|
8505
|
+
stopQueue( this, data, index );
|
8561
8506
|
}
|
8562
8507
|
|
8563
|
-
for (
|
8564
|
-
if ( timers[
|
8508
|
+
for ( index = timers.length; index--; ) {
|
8509
|
+
if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
|
8565
8510
|
if ( gotoEnd ) {
|
8566
8511
|
|
8567
8512
|
// force the next step to be the last
|
8568
|
-
timers[
|
8513
|
+
timers[ index ]( true );
|
8569
8514
|
} else {
|
8570
|
-
timers[
|
8515
|
+
timers[ index ].saveState();
|
8571
8516
|
}
|
8572
8517
|
hadTimers = true;
|
8573
|
-
timers.splice(
|
8518
|
+
timers.splice( index, 1 );
|
8574
8519
|
}
|
8575
8520
|
}
|
8576
8521
|
|
@@ -8890,7 +8835,7 @@ jQuery.extend( jQuery.fx, {
|
|
8890
8835
|
// Do not set anything below 0
|
8891
8836
|
jQuery.each([ "width", "height" ], function( i, prop ) {
|
8892
8837
|
jQuery.fx.step[ prop ] = function( fx ) {
|
8893
|
-
jQuery.style( fx.elem, prop, Math.max(0, fx.now) );
|
8838
|
+
jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
|
8894
8839
|
};
|
8895
8840
|
});
|
8896
8841
|
|
@@ -9295,6 +9240,27 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
|
|
9295
9240
|
});
|
9296
9241
|
|
9297
9242
|
|
9243
|
+
|
9244
|
+
|
9298
9245
|
// Expose jQuery to the global object
|
9299
9246
|
window.jQuery = window.$ = jQuery;
|
9247
|
+
|
9248
|
+
// Expose jQuery as an AMD module, but only for AMD loaders that
|
9249
|
+
// understand the issues with loading multiple versions of jQuery
|
9250
|
+
// in a page that all might call define(). The loader will indicate
|
9251
|
+
// they have special allowances for multiple jQuery versions by
|
9252
|
+
// specifying define.amd.jQuery = true. Register as a named module,
|
9253
|
+
// since jQuery can be concatenated with other files that may use define,
|
9254
|
+
// but not use a proper concatenation script that understands anonymous
|
9255
|
+
// AMD modules. A named AMD is safest and most robust way to register.
|
9256
|
+
// Lowercase jquery is used because AMD module names are derived from
|
9257
|
+
// file names, and jQuery is normally delivered in a lowercase file name.
|
9258
|
+
// Do this after creating the global so that if an AMD module wants to call
|
9259
|
+
// noConflict to hide this version of jQuery, it will work.
|
9260
|
+
if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
9261
|
+
define( "jquery", [], function () { return jQuery; } );
|
9262
|
+
}
|
9263
|
+
|
9264
|
+
|
9265
|
+
|
9300
9266
|
})( window );
|