Version Description
- FEATURE: Online documentation added
- FEATURE: Use AND-operator for the selected categories (default is OR)
- FIX: Backwards compatibility with WooCommerce 2.3.7 (WC_Cart::is_empty)
- FIX: Backwards compatibility with WooCommerce < 2.3.0 (WC_Coupon::is_type, Chosen in stead of Select2)
Download this release
Release Info
Developer | josk79 |
Plugin | ![]() |
Version | 2.2.4 |
Comparing to | |
See all releases |
Code changes from version 2.2.3 to 2.2.4
- docs/assets/css/documenter_style.css +418 -0
- docs/assets/css/img/info.png +0 -0
- docs/assets/css/img/warning.png +0 -0
- docs/assets/images/image_1.png +0 -0
- docs/assets/images/image_2.png +0 -0
- docs/assets/images/image_3.png +0 -0
- docs/assets/images/image_4.png +0 -0
- docs/assets/images/image_5.png +0 -0
- docs/assets/images/image_6.png +0 -0
- docs/assets/js/google-code-prettify/prettify.css +30 -0
- docs/assets/js/google-code-prettify/prettify.js +28 -0
- docs/assets/js/jquery.easing.js +205 -0
- docs/assets/js/jquery.js +9252 -0
- docs/assets/js/jquery.scrollTo.js +11 -0
- docs/assets/js/script.js +159 -0
- docs/index.html +240 -0
- documentation.html +8 -0
- includes/wjecf-coupon-extensions.php +95 -6
- languages/woocommerce-jos-autocoupon-es_ES.mo +0 -0
- languages/woocommerce-jos-autocoupon-es_ES.po +119 -52
- languages/woocommerce-jos-autocoupon-nl_NL.mo +0 -0
- languages/woocommerce-jos-autocoupon-nl_NL.po +63 -43
- languages/woocommerce-jos-autocoupon.pot +58 -47
- readme.txt +11 -3
- woocommerce-jos-autocoupon.php +1 -1
docs/assets/css/documenter_style.css
ADDED
@@ -0,0 +1,418 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Documenter 2.0
|
3 |
+
* http://rxa.li/documenter
|
4 |
+
*
|
5 |
+
* Copyright 2011, Xaver Birsak
|
6 |
+
* http://revaxarts.com
|
7 |
+
*
|
8 |
+
*/
|
9 |
+
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{
|
10 |
+
margin:0;
|
11 |
+
padding:0;
|
12 |
+
border:0;
|
13 |
+
outline:0;
|
14 |
+
font-weight:inherit;
|
15 |
+
font-style:inherit;
|
16 |
+
font-size:100%;
|
17 |
+
font-family:inherit;
|
18 |
+
vertical-align:baseline;
|
19 |
+
}
|
20 |
+
html {
|
21 |
+
font-size:101%;
|
22 |
+
font-family:Arial,verdana,arial,sans-serif;
|
23 |
+
font-size:12px;
|
24 |
+
-webkit-text-size-adjust:none;
|
25 |
+
color:#6F6F6F;
|
26 |
+
background-color:#efefef;
|
27 |
+
}
|
28 |
+
body{
|
29 |
+
min-height:100%;
|
30 |
+
height:auto;
|
31 |
+
width:100%;
|
32 |
+
}
|
33 |
+
footer, header, section {
|
34 |
+
display:block;
|
35 |
+
}
|
36 |
+
a{ color:#6F6F6F; text-decoration:none; cursor:pointer; }
|
37 |
+
a:hover { text-decoration:underline }
|
38 |
+
p, ul, ol{
|
39 |
+
margin:18px 0;
|
40 |
+
line-height:1.5em;
|
41 |
+
}
|
42 |
+
li{
|
43 |
+
list-style:none;
|
44 |
+
}
|
45 |
+
li.placeholder{
|
46 |
+
height:70px;
|
47 |
+
width:100%;
|
48 |
+
font-size:16px;
|
49 |
+
}
|
50 |
+
hr {
|
51 |
+
display:block;
|
52 |
+
height:0px;
|
53 |
+
line-height:0px;
|
54 |
+
border:0;
|
55 |
+
border-top:1px solid #ddd;
|
56 |
+
border-bottom:1px solid #aaa;
|
57 |
+
margin:16px 0;
|
58 |
+
padding:0;
|
59 |
+
clear:both;
|
60 |
+
float:none;
|
61 |
+
}
|
62 |
+
hr.notop{
|
63 |
+
margin-top:0;
|
64 |
+
}
|
65 |
+
strong{
|
66 |
+
font-weight:700;
|
67 |
+
}
|
68 |
+
#documenter_buttons{
|
69 |
+
position:absolute;
|
70 |
+
right:10px;
|
71 |
+
margin-top:-30px;
|
72 |
+
}
|
73 |
+
.btn{
|
74 |
+
cursor:pointer;
|
75 |
+
width:auto;
|
76 |
+
padding:7px 7px 8px;
|
77 |
+
border-radius:3px;
|
78 |
+
border:1px solid #ccc;
|
79 |
+
}
|
80 |
+
.btn:hover{
|
81 |
+
border:1px solid #B1B4B0;
|
82 |
+
box-shadow:0px 2px 2px rgba(0,0,0,0.1);
|
83 |
+
-moz-box-shadow:0px 2px 2px rgba(0,0,0,0.1);
|
84 |
+
-webkit-box-shadow:0px 2px 2px rgba(0,0,0,0.1);
|
85 |
+
text-decoration:none;
|
86 |
+
}
|
87 |
+
.btn:active{
|
88 |
+
border:1px solid #B1B4B0;
|
89 |
+
box-shadow:inset 0px 2px 2px rgba(0,0,0,0.1);
|
90 |
+
-moz-box-shadow:inset 0px 2px 2px rgba(0,0,0,0.1);
|
91 |
+
-webkit-box-shadow:inset 0px 2px 2px rgba(0,0,0,0.1);
|
92 |
+
background-color:#eee;
|
93 |
+
}
|
94 |
+
|
95 |
+
#documenter_content{
|
96 |
+
position:absolute;
|
97 |
+
right:18px;
|
98 |
+
left:218px;
|
99 |
+
padding-left:10px;
|
100 |
+
padding-bottom:800px;
|
101 |
+
min-height:100%;
|
102 |
+
height:auto;
|
103 |
+
z-index:1;
|
104 |
+
}
|
105 |
+
#documenter_sidebar{
|
106 |
+
-moz-box-shadow:0 0 6px rgba(3,3,3,0.6);
|
107 |
+
-webkit-box-shadow:0 0 6px rgba(3,3,3,0.6);
|
108 |
+
box-shadow:0 0 6px rgba(3,3,3,0.6);
|
109 |
+
position:fixed;
|
110 |
+
left:0;
|
111 |
+
width:200px;
|
112 |
+
height:100%;
|
113 |
+
min-height:100%;
|
114 |
+
z-index:100;
|
115 |
+
}
|
116 |
+
#documenter_sidebar a{
|
117 |
+
position:relative;
|
118 |
+
z-index:100;
|
119 |
+
}
|
120 |
+
img{
|
121 |
+
border:0;
|
122 |
+
}
|
123 |
+
#documenter_copyright{
|
124 |
+
position:absolute;
|
125 |
+
bottom:10px;
|
126 |
+
font-size:10px;
|
127 |
+
right:15px;
|
128 |
+
width:200px;
|
129 |
+
text-align:right;
|
130 |
+
z-index:1
|
131 |
+
}
|
132 |
+
noscript{
|
133 |
+
display:block;
|
134 |
+
position:absolute;
|
135 |
+
top:238px;
|
136 |
+
margin:0 auto;
|
137 |
+
width:800px;
|
138 |
+
bottom:0;
|
139 |
+
z-index:20;
|
140 |
+
}
|
141 |
+
noscript p{
|
142 |
+
width:800px;
|
143 |
+
font-size:20px;
|
144 |
+
padding-top:20px;
|
145 |
+
margin:0 auto;
|
146 |
+
color:#4D4D4D;
|
147 |
+
}
|
148 |
+
.small{
|
149 |
+
font-size:10px;
|
150 |
+
letter-spacing:0;
|
151 |
+
}
|
152 |
+
|
153 |
+
/*----------------------------------------------------------------------*/
|
154 |
+
/* Sidebar
|
155 |
+
/*----------------------------------------------------------------------*/
|
156 |
+
|
157 |
+
#documenter_sidebar #documenter_logo{
|
158 |
+
display:block;
|
159 |
+
height:20%;
|
160 |
+
max-height:200px;
|
161 |
+
min-height:70px;
|
162 |
+
width:200px;
|
163 |
+
background-position:center center;
|
164 |
+
background-repeat:no-repeat;
|
165 |
+
}
|
166 |
+
#documenter_sidebar ul{
|
167 |
+
font-size:12px;
|
168 |
+
font-weight:700;
|
169 |
+
min-height:150px;
|
170 |
+
height:75%;
|
171 |
+
overflow:auto;
|
172 |
+
}
|
173 |
+
|
174 |
+
#documenter_sidebar ul li{
|
175 |
+
text-align:right;
|
176 |
+
padding:0;
|
177 |
+
}
|
178 |
+
#documenter_sidebar ul a{
|
179 |
+
display:block;
|
180 |
+
border-top:1px solid #ddd;
|
181 |
+
border-bottom:1px solid #aaa;
|
182 |
+
padding:6px 15px 7px 0;
|
183 |
+
text-align:right;
|
184 |
+
}
|
185 |
+
#documenter_sidebar ul a:hover,#documenter_sidebar ul a.current{
|
186 |
+
-webkit-text-shadow:none;
|
187 |
+
-moz-text-shadow:none;
|
188 |
+
text-shadow:none;
|
189 |
+
text-decoration:none;
|
190 |
+
}
|
191 |
+
#documenter_sidebar ul li ul{
|
192 |
+
border-top:0;
|
193 |
+
font-size:10px;
|
194 |
+
min-height:10px;
|
195 |
+
height:auto;
|
196 |
+
overflow:auto;
|
197 |
+
margin:0;
|
198 |
+
display:none;
|
199 |
+
}
|
200 |
+
#documenter_sidebar ul li ul li a{
|
201 |
+
display:block;
|
202 |
+
padding:4px 15px 5px 0;
|
203 |
+
text-align:right;
|
204 |
+
}
|
205 |
+
|
206 |
+
/*----------------------------------------------------------------------*/
|
207 |
+
/* Content
|
208 |
+
/*----------------------------------------------------------------------*/
|
209 |
+
|
210 |
+
#documenter_cover{
|
211 |
+
position:relative;
|
212 |
+
height:800px;
|
213 |
+
padding-top:200px !important;
|
214 |
+
}
|
215 |
+
#documenter_cover li{
|
216 |
+
list-style:none !important;
|
217 |
+
margin-left:0 !important;
|
218 |
+
}
|
219 |
+
#documenter_cover p{
|
220 |
+
width:500px;
|
221 |
+
}
|
222 |
+
#documenter_content section{
|
223 |
+
padding-top:70px;
|
224 |
+
}
|
225 |
+
#documenter_content h1{
|
226 |
+
font-size:30px;
|
227 |
+
font-weight:700;
|
228 |
+
}
|
229 |
+
#documenter_content h2{
|
230 |
+
font-size:20px;
|
231 |
+
margin-bottom:18px;
|
232 |
+
font-weight:100;
|
233 |
+
}
|
234 |
+
#documenter_content h3{
|
235 |
+
font-size:26px;
|
236 |
+
margin:18px 0 0;
|
237 |
+
font-weight:100;
|
238 |
+
}
|
239 |
+
#documenter_content h4{
|
240 |
+
font-size:20px;
|
241 |
+
margin:18px 0;
|
242 |
+
font-weight:100;
|
243 |
+
}
|
244 |
+
#documenter_content h5{
|
245 |
+
font-size:16px;
|
246 |
+
margin:18px 0;
|
247 |
+
font-weight:100;
|
248 |
+
}
|
249 |
+
#documenter_content h6{
|
250 |
+
font-size:14px;
|
251 |
+
margin:18px 0;
|
252 |
+
font-weight:100;
|
253 |
+
}
|
254 |
+
#documenter_content p{
|
255 |
+
margin:18px 0;
|
256 |
+
}
|
257 |
+
#documenter_content ol li{
|
258 |
+
list-style:decimal;
|
259 |
+
margin-left:36px;
|
260 |
+
}
|
261 |
+
#documenter_content ul li{
|
262 |
+
list-style:square;
|
263 |
+
margin-left:36px;
|
264 |
+
}
|
265 |
+
#documenter_content dl{
|
266 |
+
}
|
267 |
+
#documenter_content dl dt{
|
268 |
+
padding-top:12px;
|
269 |
+
font-weight:700;
|
270 |
+
font-size:14px;
|
271 |
+
}
|
272 |
+
#documenter_content dl dd{
|
273 |
+
padding-top:3px;
|
274 |
+
margin-left:18px;
|
275 |
+
}
|
276 |
+
#documenter_content table{
|
277 |
+
border-collapse:collapse;
|
278 |
+
}
|
279 |
+
#documenter_content table th{
|
280 |
+
font-weight:700;
|
281 |
+
}
|
282 |
+
#documenter_content table th, #documenter_content table td{
|
283 |
+
padding:3px;
|
284 |
+
text-align:left;
|
285 |
+
}
|
286 |
+
#documenter_content code{
|
287 |
+
font-family:"Courier New", Courier, monospace;
|
288 |
+
font-size:12px;
|
289 |
+
}
|
290 |
+
#documenter_content .warning{
|
291 |
+
padding:10px 10px 10px 30px;
|
292 |
+
border:1px solid #D5D458;
|
293 |
+
background-color:#F0FEB1;
|
294 |
+
background-image:url(img/warning.png);
|
295 |
+
background-repeat:no-repeat;
|
296 |
+
background-position: 8px 11px;
|
297 |
+
}
|
298 |
+
#documenter_content .info{
|
299 |
+
padding:10px 10px 10px 30px;
|
300 |
+
border:1px solid #6AB3FF;
|
301 |
+
background-color:#A3D0FF;
|
302 |
+
background-image:url(img/info.png);
|
303 |
+
background-repeat:no-repeat;
|
304 |
+
background-position: 8px 11px;
|
305 |
+
}
|
306 |
+
#documenter_content div.alert {
|
307 |
+
padding: 8px 35px 8px 14px;
|
308 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
309 |
+
background-color: #fcf8e3;
|
310 |
+
border: 1px solid #fbeed5;
|
311 |
+
-webkit-border-radius: 4px;
|
312 |
+
-moz-border-radius: 4px;
|
313 |
+
border-radius: 4px;
|
314 |
+
}
|
315 |
+
#documenter_content div.alert-success,#documenter_content div.alert-success div.alert-heading {
|
316 |
+
color: #468847;
|
317 |
+
}
|
318 |
+
#documenter_content div.alert-danger,#documenter_content div.alert-error {
|
319 |
+
background-color: #f2dede;
|
320 |
+
border-color: #eed3d7;
|
321 |
+
}
|
322 |
+
#documenter_content div.alert-danger,
|
323 |
+
#documenter_content div.alert-error,
|
324 |
+
#documenter_content div.alert-danger div.alert-heading,
|
325 |
+
#documenter_content div.alert-error div.alert-heading {
|
326 |
+
color: #b94a48;
|
327 |
+
}
|
328 |
+
#documenter_content div.alert-info {
|
329 |
+
background-color: #d9edf7;
|
330 |
+
border-color: #bce8f1;
|
331 |
+
}
|
332 |
+
#documenter_content div.alert-info,#documenter_content div.alert-info div.alert-heading {
|
333 |
+
color: #3a87ad;
|
334 |
+
}
|
335 |
+
#documenter_content div.alert-block {
|
336 |
+
padding-top: 14px;
|
337 |
+
padding-bottom: 14px;
|
338 |
+
}
|
339 |
+
#documenter_content div.alert-block > p,#documenter_content div.alert-block > ul {
|
340 |
+
margin-bottom: 0;
|
341 |
+
}
|
342 |
+
#documenter_content div.alert-block p + p {
|
343 |
+
margin-top: 5px;
|
344 |
+
}
|
345 |
+
|
346 |
+
|
347 |
+
|
348 |
+
|
349 |
+
|
350 |
+
/*----------------------------------------------------------------------*/
|
351 |
+
/* Print Styles
|
352 |
+
/*----------------------------------------------------------------------*/
|
353 |
+
|
354 |
+
@media print {
|
355 |
+
* { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
|
356 |
+
-ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */
|
357 |
+
a, a:visited { color: #444 !important; text-decoration: underline; }
|
358 |
+
a[href]:after { content: " (" attr(href) ")"; }
|
359 |
+
abbr[title]:after { content: " (" attr(title) ")"; }
|
360 |
+
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
|
361 |
+
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
|
362 |
+
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
|
363 |
+
tr, img { page-break-inside: avoid; }
|
364 |
+
@page { margin: 0.5cm; }
|
365 |
+
p, h2, h3 { orphans: 3; widows: 3; }
|
366 |
+
h2, h3{ page-break-after: avoid; }
|
367 |
+
hr { border-top:1px solid #000 !important;border-bottom:0 !important; }
|
368 |
+
|
369 |
+
#documenter_sidebar{
|
370 |
+
-moz-box-shadow:none;
|
371 |
+
-webkit-box-shadow:none;
|
372 |
+
box-shadow:none;
|
373 |
+
position:absolute;
|
374 |
+
left:10px;
|
375 |
+
top:0;
|
376 |
+
width:100%;
|
377 |
+
margin-top:500px;
|
378 |
+
}
|
379 |
+
#documenter_sidebar ul:before { content: "Table of Contents"; }
|
380 |
+
|
381 |
+
#documenter_sidebar ul{
|
382 |
+
border:0 !important;
|
383 |
+
}
|
384 |
+
#documenter_sidebar ul li{
|
385 |
+
border:0 !important;
|
386 |
+
text-align:left;
|
387 |
+
}
|
388 |
+
#documenter_sidebar ul li a{
|
389 |
+
border:0 !important;
|
390 |
+
text-align:left;
|
391 |
+
padding:4px;
|
392 |
+
}
|
393 |
+
#documenter_sidebar ul li a:hover{
|
394 |
+
border:0 !important;
|
395 |
+
}
|
396 |
+
#documenter_sidebar #documenter_logo{
|
397 |
+
display:none;
|
398 |
+
}
|
399 |
+
#documenter_sidebar #documenter_copyright{
|
400 |
+
display:none;
|
401 |
+
}
|
402 |
+
#documenter_content{
|
403 |
+
left:10px;
|
404 |
+
}
|
405 |
+
#documenter_cover{
|
406 |
+
margin-bottom:300px;
|
407 |
+
}
|
408 |
+
#documenter_content .warning{
|
409 |
+
background-image:url(img/warning.png) !important;
|
410 |
+
background-repeat:no-repeat !important;
|
411 |
+
background-position: 8px 11px !important;
|
412 |
+
}
|
413 |
+
#documenter_content .info{
|
414 |
+
background-image:url(img/info.png) !important;
|
415 |
+
background-repeat:no-repeat !important;
|
416 |
+
background-position: 8px 11px !important;
|
417 |
+
}
|
418 |
+
}
|
docs/assets/css/img/info.png
ADDED
Binary file
|
docs/assets/css/img/warning.png
ADDED
Binary file
|
docs/assets/images/image_1.png
ADDED
Binary file
|
docs/assets/images/image_2.png
ADDED
Binary file
|
docs/assets/images/image_3.png
ADDED
Binary file
|
docs/assets/images/image_4.png
ADDED
Binary file
|
docs/assets/images/image_5.png
ADDED
Binary file
|
docs/assets/images/image_6.png
ADDED
Binary file
|
docs/assets/js/google-code-prettify/prettify.css
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.com { color: #93a1a1; }
|
2 |
+
.lit { color: #195f91; }
|
3 |
+
.pun, .opn, .clo { color: #93a1a1; }
|
4 |
+
.fun { color: #dc322f; }
|
5 |
+
.str, .atv { color: #D14; }
|
6 |
+
.kwd, .linenums .tag { color: #1e347b; }
|
7 |
+
.typ, .atn, .dec, .var { color: teal; }
|
8 |
+
.pln { color: #48484c; }
|
9 |
+
|
10 |
+
.prettyprint {
|
11 |
+
padding: 8px;
|
12 |
+
background-color: #f7f7f9;
|
13 |
+
border: 1px solid #e1e1e8;
|
14 |
+
}
|
15 |
+
.prettyprint.linenums {
|
16 |
+
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
17 |
+
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
18 |
+
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
19 |
+
}
|
20 |
+
|
21 |
+
/* Specify class=linenums on a pre to get line numbering */
|
22 |
+
ol.linenums {
|
23 |
+
margin: 0 0 0 33px; /* IE indents via margin-left */
|
24 |
+
}
|
25 |
+
ol.linenums li {
|
26 |
+
padding-left: 12px;
|
27 |
+
color: #bebec5;
|
28 |
+
line-height: 18px;
|
29 |
+
text-shadow: 0 1px 0 #fff;
|
30 |
+
}
|
docs/assets/js/google-code-prettify/prettify.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
2 |
+
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
|
3 |
+
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
|
4 |
+
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
|
5 |
+
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
|
6 |
+
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
|
7 |
+
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
|
8 |
+
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
|
9 |
+
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
10 |
+
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
|
11 |
+
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
|
12 |
+
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
|
13 |
+
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
|
14 |
+
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
|
15 |
+
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
|
16 |
+
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
|
17 |
+
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
18 |
+
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
|
19 |
+
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
20 |
+
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
|
21 |
+
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
|
22 |
+
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
|
23 |
+
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
|
24 |
+
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
|
25 |
+
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
|
26 |
+
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
|
27 |
+
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
|
28 |
+
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
docs/assets/js/jquery.easing.js
ADDED
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
3 |
+
*
|
4 |
+
* Uses the built in easing capabilities added In jQuery 1.1
|
5 |
+
* to offer multiple easing options
|
6 |
+
*
|
7 |
+
* TERMS OF USE - jQuery Easing
|
8 |
+
*
|
9 |
+
* Open source under the BSD License.
|
10 |
+
*
|
11 |
+
* Copyright © 2008 George McGinley Smith
|
12 |
+
* All rights reserved.
|
13 |
+
*
|
14 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
15 |
+
* are permitted provided that the following conditions are met:
|
16 |
+
*
|
17 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
18 |
+
* conditions and the following disclaimer.
|
19 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
20 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
21 |
+
* provided with the distribution.
|
22 |
+
*
|
23 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
24 |
+
* or promote products derived from this software without specific prior written permission.
|
25 |
+
*
|
26 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
27 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
28 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
29 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
30 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
31 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
32 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
33 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
34 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
35 |
+
*
|
36 |
+
*/
|
37 |
+
|
38 |
+
// t: current time, b: begInnIng value, c: change In value, d: duration
|
39 |
+
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
40 |
+
|
41 |
+
jQuery.extend( jQuery.easing,
|
42 |
+
{
|
43 |
+
def: 'easeOutQuad',
|
44 |
+
swing: function (x, t, b, c, d) {
|
45 |
+
//alert(jQuery.easing.default);
|
46 |
+
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
47 |
+
},
|
48 |
+
easeInQuad: function (x, t, b, c, d) {
|
49 |
+
return c*(t/=d)*t + b;
|
50 |
+
},
|
51 |
+
easeOutQuad: function (x, t, b, c, d) {
|
52 |
+
return -c *(t/=d)*(t-2) + b;
|
53 |
+
},
|
54 |
+
easeInOutQuad: function (x, t, b, c, d) {
|
55 |
+
if ((t/=d/2) < 1) return c/2*t*t + b;
|
56 |
+
return -c/2 * ((--t)*(t-2) - 1) + b;
|
57 |
+
},
|
58 |
+
easeInCubic: function (x, t, b, c, d) {
|
59 |
+
return c*(t/=d)*t*t + b;
|
60 |
+
},
|
61 |
+
easeOutCubic: function (x, t, b, c, d) {
|
62 |
+
return c*((t=t/d-1)*t*t + 1) + b;
|
63 |
+
},
|
64 |
+
easeInOutCubic: function (x, t, b, c, d) {
|
65 |
+
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
66 |
+
return c/2*((t-=2)*t*t + 2) + b;
|
67 |
+
},
|
68 |
+
easeInQuart: function (x, t, b, c, d) {
|
69 |
+
return c*(t/=d)*t*t*t + b;
|
70 |
+
},
|
71 |
+
easeOutQuart: function (x, t, b, c, d) {
|
72 |
+
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
73 |
+
},
|
74 |
+
easeInOutQuart: function (x, t, b, c, d) {
|
75 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
76 |
+
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
77 |
+
},
|
78 |
+
easeInQuint: function (x, t, b, c, d) {
|
79 |
+
return c*(t/=d)*t*t*t*t + b;
|
80 |
+
},
|
81 |
+
easeOutQuint: function (x, t, b, c, d) {
|
82 |
+
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
83 |
+
},
|
84 |
+
easeInOutQuint: function (x, t, b, c, d) {
|
85 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
86 |
+
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
87 |
+
},
|
88 |
+
easeInSine: function (x, t, b, c, d) {
|
89 |
+
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
90 |
+
},
|
91 |
+
easeOutSine: function (x, t, b, c, d) {
|
92 |
+
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
93 |
+
},
|
94 |
+
easeInOutSine: function (x, t, b, c, d) {
|
95 |
+
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
96 |
+
},
|
97 |
+
easeInExpo: function (x, t, b, c, d) {
|
98 |
+
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
99 |
+
},
|
100 |
+
easeOutExpo: function (x, t, b, c, d) {
|
101 |
+
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
102 |
+
},
|
103 |
+
easeInOutExpo: function (x, t, b, c, d) {
|
104 |
+
if (t==0) return b;
|
105 |
+
if (t==d) return b+c;
|
106 |
+
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
107 |
+
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
108 |
+
},
|
109 |
+
easeInCirc: function (x, t, b, c, d) {
|
110 |
+
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
111 |
+
},
|
112 |
+
easeOutCirc: function (x, t, b, c, d) {
|
113 |
+
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
114 |
+
},
|
115 |
+
easeInOutCirc: function (x, t, b, c, d) {
|
116 |
+
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
117 |
+
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
118 |
+
},
|
119 |
+
easeInElastic: function (x, t, b, c, d) {
|
120 |
+
var s=1.70158;var p=0;var a=c;
|
121 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
122 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
123 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
124 |
+
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
125 |
+
},
|
126 |
+
easeOutElastic: function (x, t, b, c, d) {
|
127 |
+
var s=1.70158;var p=0;var a=c;
|
128 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
129 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
130 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
131 |
+
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
132 |
+
},
|
133 |
+
easeInOutElastic: function (x, t, b, c, d) {
|
134 |
+
var s=1.70158;var p=0;var a=c;
|
135 |
+
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
136 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
137 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
138 |
+
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
139 |
+
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
140 |
+
},
|
141 |
+
easeInBack: function (x, t, b, c, d, s) {
|
142 |
+
if (s == undefined) s = 1.70158;
|
143 |
+
return c*(t/=d)*t*((s+1)*t - s) + b;
|
144 |
+
},
|
145 |
+
easeOutBack: function (x, t, b, c, d, s) {
|
146 |
+
if (s == undefined) s = 1.70158;
|
147 |
+
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
148 |
+
},
|
149 |
+
easeInOutBack: function (x, t, b, c, d, s) {
|
150 |
+
if (s == undefined) s = 1.70158;
|
151 |
+
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
152 |
+
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
153 |
+
},
|
154 |
+
easeInBounce: function (x, t, b, c, d) {
|
155 |
+
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
156 |
+
},
|
157 |
+
easeOutBounce: function (x, t, b, c, d) {
|
158 |
+
if ((t/=d) < (1/2.75)) {
|
159 |
+
return c*(7.5625*t*t) + b;
|
160 |
+
} else if (t < (2/2.75)) {
|
161 |
+
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
162 |
+
} else if (t < (2.5/2.75)) {
|
163 |
+
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
164 |
+
} else {
|
165 |
+
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
166 |
+
}
|
167 |
+
},
|
168 |
+
easeInOutBounce: function (x, t, b, c, d) {
|
169 |
+
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
170 |
+
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
171 |
+
}
|
172 |
+
});
|
173 |
+
|
174 |
+
/*
|
175 |
+
*
|
176 |
+
* TERMS OF USE - EASING EQUATIONS
|
177 |
+
*
|
178 |
+
* Open source under the BSD License.
|
179 |
+
*
|
180 |
+
* Copyright © 2001 Robert Penner
|
181 |
+
* All rights reserved.
|
182 |
+
*
|
183 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
184 |
+
* are permitted provided that the following conditions are met:
|
185 |
+
*
|
186 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
187 |
+
* conditions and the following disclaimer.
|
188 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
189 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
190 |
+
* provided with the distribution.
|
191 |
+
*
|
192 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
193 |
+
* or promote products derived from this software without specific prior written permission.
|
194 |
+
*
|
195 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
196 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
197 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
198 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
199 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
200 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
201 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
202 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
203 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
204 |
+
*
|
205 |
+
*/
|
docs/assets/js/jquery.js
ADDED
@@ -0,0 +1,9252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.7.1 jquery.com | jquery.org/license */
|
2 |
+
(function( window, undefined ) {
|
3 |
+
|
4 |
+
// Use the correct document accordingly with window argument (sandbox)
|
5 |
+
var document = window.document,
|
6 |
+
navigator = window.navigator,
|
7 |
+
location = window.location;
|
8 |
+
var jQuery = (function() {
|
9 |
+
|
10 |
+
// Define a local copy of jQuery
|
11 |
+
var jQuery = function( selector, context ) {
|
12 |
+
// The jQuery object is actually just the init constructor 'enhanced'
|
13 |
+
return new jQuery.fn.init( selector, context, rootjQuery );
|
14 |
+
},
|
15 |
+
|
16 |
+
// Map over jQuery in case of overwrite
|
17 |
+
_jQuery = window.jQuery,
|
18 |
+
|
19 |
+
// Map over the $ in case of overwrite
|
20 |
+
_$ = window.$,
|
21 |
+
|
22 |
+
// A central reference to the root jQuery(document)
|
23 |
+
rootjQuery,
|
24 |
+
|
25 |
+
// A simple way to check for HTML strings or ID strings
|
26 |
+
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
27 |
+
quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
|
28 |
+
|
29 |
+
// Check if a string has a non-whitespace character in it
|
30 |
+
rnotwhite = /\S/,
|
31 |
+
|
32 |
+
// Used for trimming whitespace
|
33 |
+
trimLeft = /^\s+/,
|
34 |
+
trimRight = /\s+$/,
|
35 |
+
|
36 |
+
// Match a standalone tag
|
37 |
+
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
|
38 |
+
|
39 |
+
// JSON RegExp
|
40 |
+
rvalidchars = /^[\],:{}\s]*$/,
|
41 |
+
rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
|
42 |
+
rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
43 |
+
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
|
44 |
+
|
45 |
+
// Useragent RegExp
|
46 |
+
rwebkit = /(webkit)[ \/]([\w.]+)/,
|
47 |
+
ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
|
48 |
+
rmsie = /(msie) ([\w.]+)/,
|
49 |
+
rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
|
50 |
+
|
51 |
+
// Matches dashed string for camelizing
|
52 |
+
rdashAlpha = /-([a-z]|[0-9])/ig,
|
53 |
+
rmsPrefix = /^-ms-/,
|
54 |
+
|
55 |
+
// Used by jQuery.camelCase as callback to replace()
|
56 |
+
fcamelCase = function( all, letter ) {
|
57 |
+
return ( letter + "" ).toUpperCase();
|
58 |
+
},
|
59 |
+
|
60 |
+
// Keep a UserAgent string for use with jQuery.browser
|
61 |
+
userAgent = navigator.userAgent,
|
62 |
+
|
63 |
+
// For matching the engine and version of the browser
|
64 |
+
browserMatch,
|
65 |
+
|
66 |
+
// The deferred used on DOM ready
|
67 |
+
readyList,
|
68 |
+
|
69 |
+
// The ready event handler
|
70 |
+
DOMContentLoaded,
|
71 |
+
|
72 |
+
// Save a reference to some core methods
|
73 |
+
toString = Object.prototype.toString,
|
74 |
+
hasOwn = Object.prototype.hasOwnProperty,
|
75 |
+
push = Array.prototype.push,
|
76 |
+
slice = Array.prototype.slice,
|
77 |
+
trim = String.prototype.trim,
|
78 |
+
indexOf = Array.prototype.indexOf,
|
79 |
+
|
80 |
+
// [[Class]] -> type pairs
|
81 |
+
class2type = {};
|
82 |
+
|
83 |
+
jQuery.fn = jQuery.prototype = {
|
84 |
+
constructor: jQuery,
|
85 |
+
init: function( selector, context, rootjQuery ) {
|
86 |
+
var match, elem, ret, doc;
|
87 |
+
|
88 |
+
// Handle $(""), $(null), or $(undefined)
|
89 |
+
if ( !selector ) {
|
90 |
+
return this;
|
91 |
+
}
|
92 |
+
|
93 |
+
// Handle $(DOMElement)
|
94 |
+
if ( selector.nodeType ) {
|
95 |
+
this.context = this[0] = selector;
|
96 |
+
this.length = 1;
|
97 |
+
return this;
|
98 |
+
}
|
99 |
+
|
100 |
+
// The body element only exists once, optimize finding it
|
101 |
+
if ( selector === "body" && !context && document.body ) {
|
102 |
+
this.context = document;
|
103 |
+
this[0] = document.body;
|
104 |
+
this.selector = selector;
|
105 |
+
this.length = 1;
|
106 |
+
return this;
|
107 |
+
}
|
108 |
+
|
109 |
+
// Handle HTML strings
|
110 |
+
if ( typeof selector === "string" ) {
|
111 |
+
// Are we dealing with HTML string or an ID?
|
112 |
+
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
|
113 |
+
// Assume that strings that start and end with <> are HTML and skip the regex check
|
114 |
+
match = [ null, selector, null ];
|
115 |
+
|
116 |
+
} else {
|
117 |
+
match = quickExpr.exec( selector );
|
118 |
+
}
|
119 |
+
|
120 |
+
// Verify a match, and that no context was specified for #id
|
121 |
+
if ( match && (match[1] || !context) ) {
|
122 |
+
|
123 |
+
// HANDLE: $(html) -> $(array)
|
124 |
+
if ( match[1] ) {
|
125 |
+
context = context instanceof jQuery ? context[0] : context;
|
126 |
+
doc = ( context ? context.ownerDocument || context : document );
|
127 |
+
|
128 |
+
// If a single string is passed in and it's a single tag
|
129 |
+
// just do a createElement and skip the rest
|
130 |
+
ret = rsingleTag.exec( selector );
|
131 |
+
|
132 |
+
if ( ret ) {
|
133 |
+
if ( jQuery.isPlainObject( context ) ) {
|
134 |
+
selector = [ document.createElement( ret[1] ) ];
|
135 |
+
jQuery.fn.attr.call( selector, context, true );
|
136 |
+
|
137 |
+
} else {
|
138 |
+
selector = [ doc.createElement( ret[1] ) ];
|
139 |
+
}
|
140 |
+
|
141 |
+
} else {
|
142 |
+
ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
|
143 |
+
selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
|
144 |
+
}
|
145 |
+
|
146 |
+
return jQuery.merge( this, selector );
|
147 |
+
|
148 |
+
// HANDLE: $("#id")
|
149 |
+
} else {
|
150 |
+
elem = document.getElementById( match[2] );
|
151 |
+
|
152 |
+
// Check parentNode to catch when Blackberry 4.6 returns
|
153 |
+
// nodes that are no longer in the document #6963
|
154 |
+
if ( elem && elem.parentNode ) {
|
155 |
+
// Handle the case where IE and Opera return items
|
156 |
+
// by name instead of ID
|
157 |
+
if ( elem.id !== match[2] ) {
|
158 |
+
return rootjQuery.find( selector );
|
159 |
+
}
|
160 |
+
|
161 |
+
// Otherwise, we inject the element directly into the jQuery object
|
162 |
+
this.length = 1;
|
163 |
+
this[0] = elem;
|
164 |
+
}
|
165 |
+
|
166 |
+
this.context = document;
|
167 |
+
this.selector = selector;
|
168 |
+
return this;
|
169 |
+
}
|
170 |
+
|
171 |
+
// HANDLE: $(expr, $(...))
|
172 |
+
} else if ( !context || context.jquery ) {
|
173 |
+
return ( context || rootjQuery ).find( selector );
|
174 |
+
|
175 |
+
// HANDLE: $(expr, context)
|
176 |
+
// (which is just equivalent to: $(context).find(expr)
|
177 |
+
} else {
|
178 |
+
return this.constructor( context ).find( selector );
|
179 |
+
}
|
180 |
+
|
181 |
+
// HANDLE: $(function)
|
182 |
+
// Shortcut for document ready
|
183 |
+
} else if ( jQuery.isFunction( selector ) ) {
|
184 |
+
return rootjQuery.ready( selector );
|
185 |
+
}
|
186 |
+
|
187 |
+
if ( selector.selector !== undefined ) {
|
188 |
+
this.selector = selector.selector;
|
189 |
+
this.context = selector.context;
|
190 |
+
}
|
191 |
+
|
192 |
+
return jQuery.makeArray( selector, this );
|
193 |
+
},
|
194 |
+
|
195 |
+
// Start with an empty selector
|
196 |
+
selector: "",
|
197 |
+
|
198 |
+
// The current version of jQuery being used
|
199 |
+
jquery: "1.7.1",
|
200 |
+
|
201 |
+
// The default length of a jQuery object is 0
|
202 |
+
length: 0,
|
203 |
+
|
204 |
+
// The number of elements contained in the matched element set
|
205 |
+
size: function() {
|
206 |
+
return this.length;
|
207 |
+
},
|
208 |
+
|
209 |
+
toArray: function() {
|
210 |
+
return slice.call( this, 0 );
|
211 |
+
},
|
212 |
+
|
213 |
+
// Get the Nth element in the matched element set OR
|
214 |
+
// Get the whole matched element set as a clean array
|
215 |
+
get: function( num ) {
|
216 |
+
return num == null ?
|
217 |
+
|
218 |
+
// Return a 'clean' array
|
219 |
+
this.toArray() :
|
220 |
+
|
221 |
+
// Return just the object
|
222 |
+
( num < 0 ? this[ this.length + num ] : this[ num ] );
|
223 |
+
},
|
224 |
+
|
225 |
+
// Take an array of elements and push it onto the stack
|
226 |
+
// (returning the new matched element set)
|
227 |
+
pushStack: function( elems, name, selector ) {
|
228 |
+
// Build a new jQuery matched element set
|
229 |
+
var ret = this.constructor();
|
230 |
+
|
231 |
+
if ( jQuery.isArray( elems ) ) {
|
232 |
+
push.apply( ret, elems );
|
233 |
+
|
234 |
+
} else {
|
235 |
+
jQuery.merge( ret, elems );
|
236 |
+
}
|
237 |
+
|
238 |
+
// Add the old object onto the stack (as a reference)
|
239 |
+
ret.prevObject = this;
|
240 |
+
|
241 |
+
ret.context = this.context;
|
242 |
+
|
243 |
+
if ( name === "find" ) {
|
244 |
+
ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
|
245 |
+
} else if ( name ) {
|
246 |
+
ret.selector = this.selector + "." + name + "(" + selector + ")";
|
247 |
+
}
|
248 |
+
|
249 |
+
// Return the newly-formed element set
|
250 |
+
return ret;
|
251 |
+
},
|
252 |
+
|
253 |
+
// Execute a callback for every element in the matched set.
|
254 |
+
// (You can seed the arguments with an array of args, but this is
|
255 |
+
// only used internally.)
|
256 |
+
each: function( callback, args ) {
|
257 |
+
return jQuery.each( this, callback, args );
|
258 |
+
},
|
259 |
+
|
260 |
+
ready: function( fn ) {
|
261 |
+
// Attach the listeners
|
262 |
+
jQuery.bindReady();
|
263 |
+
|
264 |
+
// Add the callback
|
265 |
+
readyList.add( fn );
|
266 |
+
|
267 |
+
return this;
|
268 |
+
},
|
269 |
+
|
270 |
+
eq: function( i ) {
|
271 |
+
i = +i;
|
272 |
+
return i === -1 ?
|
273 |
+
this.slice( i ) :
|
274 |
+
this.slice( i, i + 1 );
|
275 |
+
},
|
276 |
+
|
277 |
+
first: function() {
|
278 |
+
return this.eq( 0 );
|
279 |
+
},
|
280 |
+
|
281 |
+
last: function() {
|
282 |
+
return this.eq( -1 );
|
283 |
+
},
|
284 |
+
|
285 |
+
slice: function() {
|
286 |
+
return this.pushStack( slice.apply( this, arguments ),
|
287 |
+
"slice", slice.call(arguments).join(",") );
|
288 |
+
},
|
289 |
+
|
290 |
+
map: function( callback ) {
|
291 |
+
return this.pushStack( jQuery.map(this, function( elem, i ) {
|
292 |
+
return callback.call( elem, i, elem );
|
293 |
+
}));
|
294 |
+
},
|
295 |
+
|
296 |
+
end: function() {
|
297 |
+
return this.prevObject || this.constructor(null);
|
298 |
+
},
|
299 |
+
|
300 |
+
// For internal use only.
|
301 |
+
// Behaves like an Array's method, not like a jQuery method.
|
302 |
+
push: push,
|
303 |
+
sort: [].sort,
|
304 |
+
splice: [].splice
|
305 |
+
};
|
306 |
+
|
307 |
+
// Give the init function the jQuery prototype for later instantiation
|
308 |
+
jQuery.fn.init.prototype = jQuery.fn;
|
309 |
+
|
310 |
+
jQuery.extend = jQuery.fn.extend = function() {
|
311 |
+
var options, name, src, copy, copyIsArray, clone,
|
312 |
+
target = arguments[0] || {},
|
313 |
+
i = 1,
|
314 |
+
length = arguments.length,
|
315 |
+
deep = false;
|
316 |
+
|
317 |
+
// Handle a deep copy situation
|
318 |
+
if ( typeof target === "boolean" ) {
|
319 |
+
deep = target;
|
320 |
+
target = arguments[1] || {};
|
321 |
+
// skip the boolean and the target
|
322 |
+
i = 2;
|
323 |
+
}
|
324 |
+
|
325 |
+
// Handle case when target is a string or something (possible in deep copy)
|
326 |
+
if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
|
327 |
+
target = {};
|
328 |
+
}
|
329 |
+
|
330 |
+
// extend jQuery itself if only one argument is passed
|
331 |
+
if ( length === i ) {
|
332 |
+
target = this;
|
333 |
+
--i;
|
334 |
+
}
|
335 |
+
|
336 |
+
for ( ; i < length; i++ ) {
|
337 |
+
// Only deal with non-null/undefined values
|
338 |
+
if ( (options = arguments[ i ]) != null ) {
|
339 |
+
// Extend the base object
|
340 |
+
for ( name in options ) {
|
341 |
+
src = target[ name ];
|
342 |
+
copy = options[ name ];
|
343 |
+
|
344 |
+
// Prevent never-ending loop
|
345 |
+
if ( target === copy ) {
|
346 |
+
continue;
|
347 |
+
}
|
348 |
+
|
349 |
+
// Recurse if we're merging plain objects or arrays
|
350 |
+
if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
|
351 |
+
if ( copyIsArray ) {
|
352 |
+
copyIsArray = false;
|
353 |
+
clone = src && jQuery.isArray(src) ? src : [];
|
354 |
+
|
355 |
+
} else {
|
356 |
+
clone = src && jQuery.isPlainObject(src) ? src : {};
|
357 |
+
}
|
358 |
+
|
359 |
+
// Never move original objects, clone them
|
360 |
+
target[ name ] = jQuery.extend( deep, clone, copy );
|
361 |
+
|
362 |
+
// Don't bring in undefined values
|
363 |
+
} else if ( copy !== undefined ) {
|
364 |
+
target[ name ] = copy;
|
365 |
+
}
|
366 |
+
}
|
367 |
+
}
|
368 |
+
}
|
369 |
+
|
370 |
+
// Return the modified object
|
371 |
+
return target;
|
372 |
+
};
|
373 |
+
|
374 |
+
jQuery.extend({
|
375 |
+
noConflict: function( deep ) {
|
376 |
+
if ( window.$ === jQuery ) {
|
377 |
+
window.$ = _$;
|
378 |
+
}
|
379 |
+
|
380 |
+
if ( deep && window.jQuery === jQuery ) {
|
381 |
+
window.jQuery = _jQuery;
|
382 |
+
}
|
383 |
+
|
384 |
+
return jQuery;
|
385 |
+
},
|
386 |
+
|
387 |
+
// Is the DOM ready to be used? Set to true once it occurs.
|
388 |
+
isReady: false,
|
389 |
+
|
390 |
+
// A counter to track how many items to wait for before
|
391 |
+
// the ready event fires. See #6781
|
392 |
+
readyWait: 1,
|
393 |
+
|
394 |
+
// Hold (or release) the ready event
|
395 |
+
holdReady: function( hold ) {
|
396 |
+
if ( hold ) {
|
397 |
+
jQuery.readyWait++;
|
398 |
+
} else {
|
399 |
+
jQuery.ready( true );
|
400 |
+
}
|
401 |
+
},
|
402 |
+
|
403 |
+
// Handle when the DOM is ready
|
404 |
+
ready: function( wait ) {
|
405 |
+
// Either a released hold or an DOMready/load event and not yet ready
|
406 |
+
if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
|
407 |
+
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
|
408 |
+
if ( !document.body ) {
|
409 |
+
return setTimeout( jQuery.ready, 1 );
|
410 |
+
}
|
411 |
+
|
412 |
+
// Remember that the DOM is ready
|
413 |
+
jQuery.isReady = true;
|
414 |
+
|
415 |
+
// If a normal DOM Ready event fired, decrement, and wait if need be
|
416 |
+
if ( wait !== true && --jQuery.readyWait > 0 ) {
|
417 |
+
return;
|
418 |
+
}
|
419 |
+
|
420 |
+
// If there are functions bound, to execute
|
421 |
+
readyList.fireWith( document, [ jQuery ] );
|
422 |
+
|
423 |
+
// Trigger any bound ready events
|
424 |
+
if ( jQuery.fn.trigger ) {
|
425 |
+
jQuery( document ).trigger( "ready" ).off( "ready" );
|
426 |
+
}
|
427 |
+
}
|
428 |
+
},
|
429 |
+
|
430 |
+
bindReady: function() {
|
431 |
+
if ( readyList ) {
|
432 |
+
return;
|
433 |
+
}
|
434 |
+
|
435 |
+
readyList = jQuery.Callbacks( "once memory" );
|
436 |
+
|
437 |
+
// Catch cases where $(document).ready() is called after the
|
438 |
+
// browser event has already occurred.
|
439 |
+
if ( document.readyState === "complete" ) {
|
440 |
+
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
441 |
+
return setTimeout( jQuery.ready, 1 );
|
442 |
+
}
|
443 |
+
|
444 |
+
// Mozilla, Opera and webkit nightlies currently support this event
|
445 |
+
if ( document.addEventListener ) {
|
446 |
+
// Use the handy event callback
|
447 |
+
document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
|
448 |
+
|
449 |
+
// A fallback to window.onload, that will always work
|
450 |
+
window.addEventListener( "load", jQuery.ready, false );
|
451 |
+
|
452 |
+
// If IE event model is used
|
453 |
+
} else if ( document.attachEvent ) {
|
454 |
+
// ensure firing before onload,
|
455 |
+
// maybe late but safe also for iframes
|
456 |
+
document.attachEvent( "onreadystatechange", DOMContentLoaded );
|
457 |
+
|
458 |
+
// A fallback to window.onload, that will always work
|
459 |
+
window.attachEvent( "onload", jQuery.ready );
|
460 |
+
|
461 |
+
// If IE and not a frame
|
462 |
+
// continually check to see if the document is ready
|
463 |
+
var toplevel = false;
|
464 |
+
|
465 |
+
try {
|
466 |
+
toplevel = window.frameElement == null;
|
467 |
+
} catch(e) {}
|
468 |
+
|
469 |
+
if ( document.documentElement.doScroll && toplevel ) {
|
470 |
+
doScrollCheck();
|
471 |
+
}
|
472 |
+
}
|
473 |
+
},
|
474 |
+
|
475 |
+
// See test/unit/core.js for details concerning isFunction.
|
476 |
+
// Since version 1.3, DOM methods and functions like alert
|
477 |
+
// aren't supported. They return false on IE (#2968).
|
478 |
+
isFunction: function( obj ) {
|
479 |
+
return jQuery.type(obj) === "function";
|
480 |
+
},
|
481 |
+
|
482 |
+
isArray: Array.isArray || function( obj ) {
|
483 |
+
return jQuery.type(obj) === "array";
|
484 |
+
},
|
485 |
+
|
486 |
+
// A crude way of determining if an object is a window
|
487 |
+
isWindow: function( obj ) {
|
488 |
+
return obj && typeof obj === "object" && "setInterval" in obj;
|
489 |
+
},
|
490 |
+
|
491 |
+
isNumeric: function( obj ) {
|
492 |
+
return !isNaN( parseFloat(obj) ) && isFinite( obj );
|
493 |
+
},
|
494 |
+
|
495 |
+
type: function( obj ) {
|
496 |
+
return obj == null ?
|
497 |
+
String( obj ) :
|
498 |
+
class2type[ toString.call(obj) ] || "object";
|
499 |
+
},
|
500 |
+
|
501 |
+
isPlainObject: function( obj ) {
|
502 |
+
// Must be an Object.
|
503 |
+
// Because of IE, we also have to check the presence of the constructor property.
|
504 |
+
// Make sure that DOM nodes and window objects don't pass through, as well
|
505 |
+
if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
|
506 |
+
return false;
|
507 |
+
}
|
508 |
+
|
509 |
+
try {
|
510 |
+
// Not own constructor property must be Object
|
511 |
+
if ( obj.constructor &&
|
512 |
+
!hasOwn.call(obj, "constructor") &&
|
513 |
+
!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
|
514 |
+
return false;
|
515 |
+
}
|
516 |
+
} catch ( e ) {
|
517 |
+
// IE8,9 Will throw exceptions on certain host objects #9897
|
518 |
+
return false;
|
519 |
+
}
|
520 |
+
|
521 |
+
// Own properties are enumerated firstly, so to speed up,
|
522 |
+
// if last one is own, then all properties are own.
|
523 |
+
|
524 |
+
var key;
|
525 |
+
for ( key in obj ) {}
|
526 |
+
|
527 |
+
return key === undefined || hasOwn.call( obj, key );
|
528 |
+
},
|
529 |
+
|
530 |
+
isEmptyObject: function( obj ) {
|
531 |
+
for ( var name in obj ) {
|
532 |
+
return false;
|
533 |
+
}
|
534 |
+
return true;
|
535 |
+
},
|
536 |
+
|
537 |
+
error: function( msg ) {
|
538 |
+
throw new Error( msg );
|
539 |
+
},
|
540 |
+
|
541 |
+
parseJSON: function( data ) {
|
542 |
+
if ( typeof data !== "string" || !data ) {
|
543 |
+
return null;
|
544 |
+
}
|
545 |
+
|
546 |
+
// Make sure leading/trailing whitespace is removed (IE can't handle it)
|
547 |
+
data = jQuery.trim( data );
|
548 |
+
|
549 |
+
// Attempt to parse using the native JSON parser first
|
550 |
+
if ( window.JSON && window.JSON.parse ) {
|
551 |
+
return window.JSON.parse( data );
|
552 |
+
}
|
553 |
+
|
554 |
+
// Make sure the incoming data is actual JSON
|
555 |
+
// Logic borrowed from http://json.org/json2.js
|
556 |
+
if ( rvalidchars.test( data.replace( rvalidescape, "@" )
|
557 |
+
.replace( rvalidtokens, "]" )
|
558 |
+
.replace( rvalidbraces, "")) ) {
|
559 |
+
|
560 |
+
return ( new Function( "return " + data ) )();
|
561 |
+
|
562 |
+
}
|
563 |
+
jQuery.error( "Invalid JSON: " + data );
|
564 |
+
},
|
565 |
+
|
566 |
+
// Cross-browser xml parsing
|
567 |
+
parseXML: function( data ) {
|
568 |
+
var xml, tmp;
|
569 |
+
try {
|
570 |
+
if ( window.DOMParser ) { // Standard
|
571 |
+
tmp = new DOMParser();
|
572 |
+
xml = tmp.parseFromString( data , "text/xml" );
|
573 |
+
} else { // IE
|
574 |
+
xml = new ActiveXObject( "Microsoft.XMLDOM" );
|
575 |
+
xml.async = "false";
|
576 |
+
xml.loadXML( data );
|
577 |
+
}
|
578 |
+
} catch( e ) {
|
579 |
+
xml = undefined;
|
580 |
+
}
|
581 |
+
if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
|
582 |
+
jQuery.error( "Invalid XML: " + data );
|
583 |
+
}
|
584 |
+
return xml;
|
585 |
+
},
|
586 |
+
|
587 |
+
noop: function() {},
|
588 |
+
|
589 |
+
// Evaluates a script in a global context
|
590 |
+
// Workarounds based on findings by Jim Driscoll
|
591 |
+
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
|
592 |
+
globalEval: function( data ) {
|
593 |
+
if ( data && rnotwhite.test( data ) ) {
|
594 |
+
// We use execScript on Internet Explorer
|
595 |
+
// We use an anonymous function so that context is window
|
596 |
+
// rather than jQuery in Firefox
|
597 |
+
( window.execScript || function( data ) {
|
598 |
+
window[ "eval" ].call( window, data );
|
599 |
+
} )( data );
|
600 |
+
}
|
601 |
+
},
|
602 |
+
|
603 |
+
// Convert dashed to camelCase; used by the css and data modules
|
604 |
+
// Microsoft forgot to hump their vendor prefix (#9572)
|
605 |
+
camelCase: function( string ) {
|
606 |
+
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
607 |
+
},
|
608 |
+
|
609 |
+
nodeName: function( elem, name ) {
|
610 |
+
return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
|
611 |
+
},
|
612 |
+
|
613 |
+
// args is for internal usage only
|
614 |
+
each: function( object, callback, args ) {
|
615 |
+
var name, i = 0,
|
616 |
+
length = object.length,
|
617 |
+
isObj = length === undefined || jQuery.isFunction( object );
|
618 |
+
|
619 |
+
if ( args ) {
|
620 |
+
if ( isObj ) {
|
621 |
+
for ( name in object ) {
|
622 |
+
if ( callback.apply( object[ name ], args ) === false ) {
|
623 |
+
break;
|
624 |
+
}
|
625 |
+
}
|
626 |
+
} else {
|
627 |
+
for ( ; i < length; ) {
|
628 |
+
if ( callback.apply( object[ i++ ], args ) === false ) {
|
629 |
+
break;
|
630 |
+
}
|
631 |
+
}
|
632 |
+
}
|
633 |
+
|
634 |
+
// A special, fast, case for the most common use of each
|
635 |
+
} else {
|
636 |
+
if ( isObj ) {
|
637 |
+
for ( name in object ) {
|
638 |
+
if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
|
639 |
+
break;
|
640 |
+
}
|
641 |
+
}
|
642 |
+
} else {
|
643 |
+
for ( ; i < length; ) {
|
644 |
+
if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
|
645 |
+
break;
|
646 |
+
}
|
647 |
+
}
|
648 |
+
}
|
649 |
+
}
|
650 |
+
|
651 |
+
return object;
|
652 |
+
},
|
653 |
+
|
654 |
+
// Use native String.trim function wherever possible
|
655 |
+
trim: trim ?
|
656 |
+
function( text ) {
|
657 |
+
return text == null ?
|
658 |
+
"" :
|
659 |
+
trim.call( text );
|
660 |
+
} :
|
661 |
+
|
662 |
+
// Otherwise use our own trimming functionality
|
663 |
+
function( text ) {
|
664 |
+
return text == null ?
|
665 |
+
"" :
|
666 |
+
text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
|
667 |
+
},
|
668 |
+
|
669 |
+
// results is for internal usage only
|
670 |
+
makeArray: function( array, results ) {
|
671 |
+
var ret = results || [];
|
672 |
+
|
673 |
+
if ( array != null ) {
|
674 |
+
// The window, strings (and functions) also have 'length'
|
675 |
+
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
|
676 |
+
var type = jQuery.type( array );
|
677 |
+
|
678 |
+
if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
|
679 |
+
push.call( ret, array );
|
680 |
+
} else {
|
681 |
+
jQuery.merge( ret, array );
|
682 |
+
}
|
683 |
+
}
|
684 |
+
|
685 |
+
return ret;
|
686 |
+
},
|
687 |
+
|
688 |
+
inArray: function( elem, array, i ) {
|
689 |
+
var len;
|
690 |
+
|
691 |
+
if ( array ) {
|
692 |
+
if ( indexOf ) {
|
693 |
+
return indexOf.call( array, elem, i );
|
694 |
+
}
|
695 |
+
|
696 |
+
len = array.length;
|
697 |
+
i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
|
698 |
+
|
699 |
+
for ( ; i < len; i++ ) {
|
700 |
+
// Skip accessing in sparse arrays
|
701 |
+
if ( i in array && array[ i ] === elem ) {
|
702 |
+
return i;
|
703 |
+
}
|
704 |
+
}
|
705 |
+
}
|
706 |
+
|
707 |
+
return -1;
|
708 |
+
},
|
709 |
+
|
710 |
+
merge: function( first, second ) {
|
711 |
+
var i = first.length,
|
712 |
+
j = 0;
|
713 |
+
|
714 |
+
if ( typeof second.length === "number" ) {
|
715 |
+
for ( var l = second.length; j < l; j++ ) {
|
716 |
+
first[ i++ ] = second[ j ];
|
717 |
+
}
|
718 |
+
|
719 |
+
} else {
|
720 |
+
while ( second[j] !== undefined ) {
|
721 |
+
first[ i++ ] = second[ j++ ];
|
722 |
+
}
|
723 |
+
}
|
724 |
+
|
725 |
+
first.length = i;
|
726 |
+
|
727 |
+
return first;
|
728 |
+
},
|
729 |
+
|
730 |
+
grep: function( elems, callback, inv ) {
|
731 |
+
var ret = [], retVal;
|
732 |
+
inv = !!inv;
|
733 |
+
|
734 |
+
// Go through the array, only saving the items
|
735 |
+
// that pass the validator function
|
736 |
+
for ( var i = 0, length = elems.length; i < length; i++ ) {
|
737 |
+
retVal = !!callback( elems[ i ], i );
|
738 |
+
if ( inv !== retVal ) {
|
739 |
+
ret.push( elems[ i ] );
|
740 |
+
}
|
741 |
+
}
|
742 |
+
|
743 |
+
return ret;
|
744 |
+
},
|
745 |
+
|
746 |
+
// arg is for internal usage only
|
747 |
+
map: function( elems, callback, arg ) {
|
748 |
+
var value, key, ret = [],
|
749 |
+
i = 0,
|
750 |
+
length = elems.length,
|
751 |
+
// jquery objects are treated as arrays
|
752 |
+
isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
|
753 |
+
|
754 |
+
// Go through the array, translating each of the items to their
|
755 |
+
if ( isArray ) {
|
756 |
+
for ( ; i < length; i++ ) {
|
757 |
+
value = callback( elems[ i ], i, arg );
|
758 |
+
|
759 |
+
if ( value != null ) {
|
760 |
+
ret[ ret.length ] = value;
|
761 |
+
}
|
762 |
+
}
|
763 |
+
|
764 |
+
// Go through every key on the object
|
765 |
+
} else {
|
766 |
+
for ( key in elems ) {
|
767 |
+
value = callback( elems[ key ], key, arg );
|
768 |
+
|
769 |
+
if ( value != null ) {
|
770 |
+
ret[ ret.length ] = value;
|
771 |
+
}
|
772 |
+
}
|
773 |
+
}
|
774 |
+
|
775 |
+
// Flatten any nested arrays
|
776 |
+
return ret.concat.apply( [], ret );
|
777 |
+
},
|
778 |
+
|
779 |
+
// A global GUID counter for objects
|
780 |
+
guid: 1,
|
781 |
+
|
782 |
+
// Bind a function to a context, optionally partially applying any
|
783 |
+
// arguments.
|
784 |
+
proxy: function( fn, context ) {
|
785 |
+
if ( typeof context === "string" ) {
|
786 |
+
var tmp = fn[ context ];
|
787 |
+
context = fn;
|
788 |
+
fn = tmp;
|
789 |
+
}
|
790 |
+
|
791 |
+
// Quick check to determine if target is callable, in the spec
|
792 |
+
// this throws a TypeError, but we will just return undefined.
|
793 |
+
if ( !jQuery.isFunction( fn ) ) {
|
794 |
+
return undefined;
|
795 |
+
}
|
796 |
+
|
797 |
+
// Simulated bind
|
798 |
+
var args = slice.call( arguments, 2 ),
|
799 |
+
proxy = function() {
|
800 |
+
return fn.apply( context, args.concat( slice.call( arguments ) ) );
|
801 |
+
};
|
802 |
+
|
803 |
+
// Set the guid of unique handler to the same of original handler, so it can be removed
|
804 |
+
proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
|
805 |
+
|
806 |
+
return proxy;
|
807 |
+
},
|
808 |
+
|
809 |
+
// Mutifunctional method to get and set values to a collection
|
810 |
+
// The value/s can optionally be executed if it's a function
|
811 |
+
access: function( elems, key, value, exec, fn, pass ) {
|
812 |
+
var length = elems.length;
|
813 |
+
|
814 |
+
// Setting many attributes
|
815 |
+
if ( typeof key === "object" ) {
|
816 |
+
for ( var k in key ) {
|
817 |
+
jQuery.access( elems, k, key[k], exec, fn, value );
|
818 |
+
}
|
819 |
+
return elems;
|
820 |
+
}
|
821 |
+
|
822 |
+
// Setting one attribute
|
823 |
+
if ( value !== undefined ) {
|
824 |
+
// Optionally, function values get executed if exec is true
|
825 |
+
exec = !pass && exec && jQuery.isFunction(value);
|
826 |
+
|
827 |
+
for ( var i = 0; i < length; i++ ) {
|
828 |
+
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
|
829 |
+
}
|
830 |
+
|
831 |
+
return elems;
|
832 |
+
}
|
833 |
+
|
834 |
+
// Getting an attribute
|
835 |
+
return length ? fn( elems[0], key ) : undefined;
|
836 |
+
},
|
837 |
+
|
838 |
+
now: function() {
|
839 |
+
return ( new Date() ).getTime();
|
840 |
+
},
|
841 |
+
|
842 |
+
// Use of jQuery.browser is frowned upon.
|
843 |
+
// More details: http://docs.jquery.com/Utilities/jQuery.browser
|
844 |
+
uaMatch: function( ua ) {
|
845 |
+
ua = ua.toLowerCase();
|
846 |
+
|
847 |
+
var match = rwebkit.exec( ua ) ||
|
848 |
+
ropera.exec( ua ) ||
|
849 |
+
rmsie.exec( ua ) ||
|
850 |
+
ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
|
851 |
+
[];
|
852 |
+
|
853 |
+
return { browser: match[1] || "", version: match[2] || "0" };
|
854 |
+
},
|
855 |
+
|
856 |
+
sub: function() {
|
857 |
+
function jQuerySub( selector, context ) {
|
858 |
+
return new jQuerySub.fn.init( selector, context );
|
859 |
+
}
|
860 |
+
jQuery.extend( true, jQuerySub, this );
|
861 |
+
jQuerySub.superclass = this;
|
862 |
+
jQuerySub.fn = jQuerySub.prototype = this();
|
863 |
+
jQuerySub.fn.constructor = jQuerySub;
|
864 |
+
jQuerySub.sub = this.sub;
|
865 |
+
jQuerySub.fn.init = function init( selector, context ) {
|
866 |
+
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
|
867 |
+
context = jQuerySub( context );
|
868 |
+
}
|
869 |
+
|
870 |
+
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
871 |
+
};
|
872 |
+
jQuerySub.fn.init.prototype = jQuerySub.fn;
|
873 |
+
var rootjQuerySub = jQuerySub(document);
|
874 |
+
return jQuerySub;
|
875 |
+
},
|
876 |
+
|
877 |
+
browser: {}
|
878 |
+
});
|
879 |
+
|
880 |
+
// Populate the class2type map
|
881 |
+
jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
|
882 |
+
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
883 |
+
});
|
884 |
+
|
885 |
+
browserMatch = jQuery.uaMatch( userAgent );
|
886 |
+
if ( browserMatch.browser ) {
|
887 |
+
jQuery.browser[ browserMatch.browser ] = true;
|
888 |
+
jQuery.browser.version = browserMatch.version;
|
889 |
+
}
|
890 |
+
|
891 |
+
// Deprecated, use jQuery.browser.webkit instead
|
892 |
+
if ( jQuery.browser.webkit ) {
|
893 |
+
jQuery.browser.safari = true;
|
894 |
+
}
|
895 |
+
|
896 |
+
// IE doesn't match non-breaking spaces with \s
|
897 |
+
if ( rnotwhite.test( "\xA0" ) ) {
|
898 |
+
trimLeft = /^[\s\xA0]+/;
|
899 |
+
trimRight = /[\s\xA0]+$/;
|
900 |
+
}
|
901 |
+
|
902 |
+
// All jQuery objects should point back to these
|
903 |
+
rootjQuery = jQuery(document);
|
904 |
+
|
905 |
+
// Cleanup functions for the document ready method
|
906 |
+
if ( document.addEventListener ) {
|
907 |
+
DOMContentLoaded = function() {
|
908 |
+
document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
|
909 |
+
jQuery.ready();
|
910 |
+
};
|
911 |
+
|
912 |
+
} else if ( document.attachEvent ) {
|
913 |
+
DOMContentLoaded = function() {
|
914 |
+
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
|
915 |
+
if ( document.readyState === "complete" ) {
|
916 |
+
document.detachEvent( "onreadystatechange", DOMContentLoaded );
|
917 |
+
jQuery.ready();
|
918 |
+
}
|
919 |
+
};
|
920 |
+
}
|
921 |
+
|
922 |
+
// The DOM ready check for Internet Explorer
|
923 |
+
function doScrollCheck() {
|
924 |
+
if ( jQuery.isReady ) {
|
925 |
+
return;
|
926 |
+
}
|
927 |
+
|
928 |
+
try {
|
929 |
+
// If IE is used, use the trick by Diego Perini
|
930 |
+
// http://javascript.nwbox.com/IEContentLoaded/
|
931 |
+
document.documentElement.doScroll("left");
|
932 |
+
} catch(e) {
|
933 |
+
setTimeout( doScrollCheck, 1 );
|
934 |
+
return;
|
935 |
+
}
|
936 |
+
|
937 |
+
// and execute any waiting functions
|
938 |
+
jQuery.ready();
|
939 |
+
}
|
940 |
+
|
941 |
+
return jQuery;
|
942 |
+
|
943 |
+
})();
|
944 |
+
|
945 |
+
|
946 |
+
// String to Object flags format cache
|
947 |
+
var flagsCache = {};
|
948 |
+
|
949 |
+
// Convert String-formatted flags into Object-formatted ones and store in cache
|
950 |
+
function createFlags( flags ) {
|
951 |
+
var object = flagsCache[ flags ] = {},
|
952 |
+
i, length;
|
953 |
+
flags = flags.split( /\s+/ );
|
954 |
+
for ( i = 0, length = flags.length; i < length; i++ ) {
|
955 |
+
object[ flags[i] ] = true;
|
956 |
+
}
|
957 |
+
return object;
|
958 |
+
}
|
959 |
+
|
960 |
+
/*
|
961 |
+
* Create a callback list using the following parameters:
|
962 |
+
*
|
963 |
+
* flags: an optional list of space-separated flags that will change how
|
964 |
+
* the callback list behaves
|
965 |
+
*
|
966 |
+
* By default a callback list will act like an event callback list and can be
|
967 |
+
* "fired" multiple times.
|
968 |
+
*
|
969 |
+
* Possible flags:
|
970 |
+
*
|
971 |
+
* once: will ensure the callback list can only be fired once (like a Deferred)
|
972 |
+
*
|
973 |
+
* memory: will keep track of previous values and will call any callback added
|
974 |
+
* after the list has been fired right away with the latest "memorized"
|
975 |
+
* values (like a Deferred)
|
976 |
+
*
|
977 |
+
* unique: will ensure a callback can only be added once (no duplicate in the list)
|
978 |
+
*
|
979 |
+
* stopOnFalse: interrupt callings when a callback returns false
|
980 |
+
*
|
981 |
+
*/
|
982 |
+
jQuery.Callbacks = function( flags ) {
|
983 |
+
|
984 |
+
// Convert flags from String-formatted to Object-formatted
|
985 |
+
// (we check in cache first)
|
986 |
+
flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
|
987 |
+
|
988 |
+
var // Actual callback list
|
989 |
+
list = [],
|
990 |
+
// Stack of fire calls for repeatable lists
|
991 |
+
stack = [],
|
992 |
+
// Last fire value (for non-forgettable lists)
|
993 |
+
memory,
|
994 |
+
// Flag to know if list is currently firing
|
995 |
+
firing,
|
996 |
+
// First callback to fire (used internally by add and fireWith)
|
997 |
+
firingStart,
|
998 |
+
// End of the loop when firing
|
999 |
+
firingLength,
|
1000 |
+
// Index of currently firing callback (modified by remove if needed)
|
1001 |
+
firingIndex,
|
1002 |
+
// Add one or several callbacks to the list
|
1003 |
+
add = function( args ) {
|
1004 |
+
var i,
|
1005 |
+
length,
|
1006 |
+
elem,
|
1007 |
+
type,
|
1008 |
+
actual;
|
1009 |
+
for ( i = 0, length = args.length; i < length; i++ ) {
|
1010 |
+
elem = args[ i ];
|
1011 |
+
type = jQuery.type( elem );
|
1012 |
+
if ( type === "array" ) {
|
1013 |
+
// Inspect recursively
|
1014 |
+
add( elem );
|
1015 |
+
} else if ( type === "function" ) {
|
1016 |
+
// Add if not in unique mode and callback is not in
|
1017 |
+
if ( !flags.unique || !self.has( elem ) ) {
|
1018 |
+
list.push( elem );
|
1019 |
+
}
|
1020 |
+
}
|
1021 |
+
}
|
1022 |
+
},
|
1023 |
+
// Fire callbacks
|
1024 |
+
fire = function( context, args ) {
|
1025 |
+
args = args || [];
|
1026 |
+
memory = !flags.memory || [ context, args ];
|
1027 |
+
firing = true;
|
1028 |
+
firingIndex = firingStart || 0;
|
1029 |
+
firingStart = 0;
|
1030 |
+
firingLength = list.length;
|
1031 |
+
for ( ; list && firingIndex < firingLength; firingIndex++ ) {
|
1032 |
+
if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
|
1033 |
+
memory = true; // Mark as halted
|
1034 |
+
break;
|
1035 |
+
}
|
1036 |
+
}
|
1037 |
+
firing = false;
|
1038 |
+
if ( list ) {
|
1039 |
+
if ( !flags.once ) {
|
1040 |
+
if ( stack && stack.length ) {
|
1041 |
+
memory = stack.shift();
|
1042 |
+
self.fireWith( memory[ 0 ], memory[ 1 ] );
|
1043 |
+
}
|
1044 |
+
} else if ( memory === true ) {
|
1045 |
+
self.disable();
|
1046 |
+
} else {
|
1047 |
+
list = [];
|
1048 |
+
}
|
1049 |
+
}
|
1050 |
+
},
|
1051 |
+
// Actual Callbacks object
|
1052 |
+
self = {
|
1053 |
+
// Add a callback or a collection of callbacks to the list
|
1054 |
+
add: function() {
|
1055 |
+
if ( list ) {
|
1056 |
+
var length = list.length;
|
1057 |
+
add( arguments );
|
1058 |
+
// Do we need to add the callbacks to the
|
1059 |
+
// current firing batch?
|
1060 |
+
if ( firing ) {
|
1061 |
+
firingLength = list.length;
|
1062 |
+
// With memory, if we're not firing then
|
1063 |
+
// we should call right away, unless previous
|
1064 |
+
// firing was halted (stopOnFalse)
|
1065 |
+
} else if ( memory && memory !== true ) {
|
1066 |
+
firingStart = length;
|
1067 |
+
fire( memory[ 0 ], memory[ 1 ] );
|
1068 |
+
}
|
1069 |
+
}
|
1070 |
+
return this;
|
1071 |
+
},
|
1072 |
+
// Remove a callback from the list
|
1073 |
+
remove: function() {
|
1074 |
+
if ( list ) {
|
1075 |
+
var args = arguments,
|
1076 |
+
argIndex = 0,
|
1077 |
+
argLength = args.length;
|
1078 |
+
for ( ; argIndex < argLength ; argIndex++ ) {
|
1079 |
+
for ( var i = 0; i < list.length; i++ ) {
|
1080 |
+
if ( args[ argIndex ] === list[ i ] ) {
|
1081 |
+
// Handle firingIndex and firingLength
|
1082 |
+
if ( firing ) {
|
1083 |
+
if ( i <= firingLength ) {
|
1084 |
+
firingLength--;
|
1085 |
+
if ( i <= firingIndex ) {
|
1086 |
+
firingIndex--;
|
1087 |
+
}
|
1088 |
+
}
|
1089 |
+
}
|
1090 |
+
// Remove the element
|
1091 |
+
list.splice( i--, 1 );
|
1092 |
+
// If we have some unicity property then
|
1093 |
+
// we only need to do this once
|
1094 |
+
if ( flags.unique ) {
|
1095 |
+
break;
|
1096 |
+
}
|
1097 |
+
}
|
1098 |
+
}
|
1099 |
+
}
|
1100 |
+
}
|
1101 |
+
return this;
|
1102 |
+
},
|
1103 |
+
// Control if a given callback is in the list
|
1104 |
+
has: function( fn ) {
|
1105 |
+
if ( list ) {
|
1106 |
+
var i = 0,
|
1107 |
+
length = list.length;
|
1108 |
+
for ( ; i < length; i++ ) {
|
1109 |
+
if ( fn === list[ i ] ) {
|
1110 |
+
return true;
|
1111 |
+
}
|
1112 |
+
}
|
1113 |
+
}
|
1114 |
+
return false;
|
1115 |
+
},
|
1116 |
+
// Remove all callbacks from the list
|
1117 |
+
empty: function() {
|
1118 |
+
list = [];
|
1119 |
+
return this;
|
1120 |
+
},
|
1121 |
+
// Have the list do nothing anymore
|
1122 |
+
disable: function() {
|
1123 |
+
list = stack = memory = undefined;
|
1124 |
+
return this;
|
1125 |
+
},
|
1126 |
+
// Is it disabled?
|
1127 |
+
disabled: function() {
|
1128 |
+
return !list;
|
1129 |
+
},
|
1130 |
+
// Lock the list in its current state
|
1131 |
+
lock: function() {
|
1132 |
+
stack = undefined;
|
1133 |
+
if ( !memory || memory === true ) {
|
1134 |
+
self.disable();
|
1135 |
+
}
|
1136 |
+
return this;
|
1137 |
+
},
|
1138 |
+
// Is it locked?
|
1139 |
+
locked: function() {
|
1140 |
+
return !stack;
|
1141 |
+
},
|
1142 |
+
// Call all callbacks with the given context and arguments
|
1143 |
+
fireWith: function( context, args ) {
|
1144 |
+
if ( stack ) {
|
1145 |
+
if ( firing ) {
|
1146 |
+
if ( !flags.once ) {
|
1147 |
+
stack.push( [ context, args ] );
|
1148 |
+
}
|
1149 |
+
} else if ( !( flags.once && memory ) ) {
|
1150 |
+
fire( context, args );
|
1151 |
+
}
|
1152 |
+
}
|
1153 |
+
return this;
|
1154 |
+
},
|
1155 |
+
// Call all the callbacks with the given arguments
|
1156 |
+
fire: function() {
|
1157 |
+
self.fireWith( this, arguments );
|
1158 |
+
return this;
|
1159 |
+
},
|
1160 |
+
// To know if the callbacks have already been called at least once
|
1161 |
+
fired: function() {
|
1162 |
+
return !!memory;
|
1163 |
+
}
|
1164 |
+
};
|
1165 |
+
|
1166 |
+
return self;
|
1167 |
+
};
|
1168 |
+
|
1169 |
+
|
1170 |
+
|
1171 |
+
|
1172 |
+
var // Static reference to slice
|
1173 |
+
sliceDeferred = [].slice;
|
1174 |
+
|
1175 |
+
jQuery.extend({
|
1176 |
+
|
1177 |
+
Deferred: function( func ) {
|
1178 |
+
var doneList = jQuery.Callbacks( "once memory" ),
|
1179 |
+
failList = jQuery.Callbacks( "once memory" ),
|
1180 |
+
progressList = jQuery.Callbacks( "memory" ),
|
1181 |
+
state = "pending",
|
1182 |
+
lists = {
|
1183 |
+
resolve: doneList,
|
1184 |
+
reject: failList,
|
1185 |
+
notify: progressList
|
1186 |
+
},
|
1187 |
+
promise = {
|
1188 |
+
done: doneList.add,
|
1189 |
+
fail: failList.add,
|
1190 |
+
progress: progressList.add,
|
1191 |
+
|
1192 |
+
state: function() {
|
1193 |
+
return state;
|
1194 |
+
},
|
1195 |
+
|
1196 |
+
// Deprecated
|
1197 |
+
isResolved: doneList.fired,
|
1198 |
+
isRejected: failList.fired,
|
1199 |
+
|
1200 |
+
then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
|
1201 |
+
deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
|
1202 |
+
return this;
|
1203 |
+
},
|
1204 |
+
always: function() {
|
1205 |
+
deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
|
1206 |
+
return this;
|
1207 |
+
},
|
1208 |
+
pipe: function( fnDone, fnFail, fnProgress ) {
|
1209 |
+
return jQuery.Deferred(function( newDefer ) {
|
1210 |
+
jQuery.each( {
|
1211 |
+
done: [ fnDone, "resolve" ],
|
1212 |
+
fail: [ fnFail, "reject" ],
|
1213 |
+
progress: [ fnProgress, "notify" ]
|
1214 |
+
}, function( handler, data ) {
|
1215 |
+
var fn = data[ 0 ],
|
1216 |
+
action = data[ 1 ],
|
1217 |
+
returned;
|
1218 |
+
if ( jQuery.isFunction( fn ) ) {
|
1219 |
+
deferred[ handler ](function() {
|
1220 |
+
returned = fn.apply( this, arguments );
|
1221 |
+
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
1222 |
+
returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
|
1223 |
+
} else {
|
1224 |
+
newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
|
1225 |
+
}
|
1226 |
+
});
|
1227 |
+
} else {
|
1228 |
+
deferred[ handler ]( newDefer[ action ] );
|
1229 |
+
}
|
1230 |
+
});
|
1231 |
+
}).promise();
|
1232 |
+
},
|
1233 |
+
// Get a promise for this deferred
|
1234 |
+
// If obj is provided, the promise aspect is added to the object
|
1235 |
+
promise: function( obj ) {
|
1236 |
+
if ( obj == null ) {
|
1237 |
+
obj = promise;
|
1238 |
+
} else {
|
1239 |
+
for ( var key in promise ) {
|
1240 |
+
obj[ key ] = promise[ key ];
|
1241 |
+
}
|
1242 |
+
}
|
1243 |
+
return obj;
|
1244 |
+
}
|
1245 |
+
},
|
1246 |
+
deferred = promise.promise({}),
|
1247 |
+
key;
|
1248 |
+
|
1249 |
+
for ( key in lists ) {
|
1250 |
+
deferred[ key ] = lists[ key ].fire;
|
1251 |
+
deferred[ key + "With" ] = lists[ key ].fireWith;
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
// Handle state
|
1255 |
+
deferred.done( function() {
|
1256 |
+
state = "resolved";
|
1257 |
+
}, failList.disable, progressList.lock ).fail( function() {
|
1258 |
+
state = "rejected";
|
1259 |
+
}, doneList.disable, progressList.lock );
|
1260 |
+
|
1261 |
+
// Call given func if any
|
1262 |
+
if ( func ) {
|
1263 |
+
func.call( deferred, deferred );
|
1264 |
+
}
|
1265 |
+
|
1266 |
+
// All done!
|
1267 |
+
return deferred;
|
1268 |
+
},
|
1269 |
+
|
1270 |
+
// Deferred helper
|
1271 |
+
when: function( firstParam ) {
|
1272 |
+
var args = sliceDeferred.call( arguments, 0 ),
|
1273 |
+
i = 0,
|
1274 |
+
length = args.length,
|
1275 |
+
pValues = new Array( length ),
|
1276 |
+
count = length,
|
1277 |
+
pCount = length,
|
1278 |
+
deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
|
1279 |
+
firstParam :
|
1280 |
+
jQuery.Deferred(),
|
1281 |
+
promise = deferred.promise();
|
1282 |
+
function resolveFunc( i ) {
|
1283 |
+
return function( value ) {
|
1284 |
+
args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
|
1285 |
+
if ( !( --count ) ) {
|
1286 |
+
deferred.resolveWith( deferred, args );
|
1287 |
+
}
|
1288 |
+
};
|
1289 |
+
}
|
1290 |
+
function progressFunc( i ) {
|
1291 |
+
return function( value ) {
|
1292 |
+
pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
|
1293 |
+
deferred.notifyWith( promise, pValues );
|
1294 |
+
};
|
1295 |
+
}
|
1296 |
+
if ( length > 1 ) {
|
1297 |
+
for ( ; i < length; i++ ) {
|
1298 |
+
if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
|
1299 |
+
args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
|
1300 |
+
} else {
|
1301 |
+
--count;
|
1302 |
+
}
|
1303 |
+
}
|
1304 |
+
if ( !count ) {
|
1305 |
+
deferred.resolveWith( deferred, args );
|
1306 |
+
}
|
1307 |
+
} else if ( deferred !== firstParam ) {
|
1308 |
+
deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
|
1309 |
+
}
|
1310 |
+
return promise;
|
1311 |
+
}
|
1312 |
+
});
|
1313 |
+
|
1314 |
+
|
1315 |
+
|
1316 |
+
|
1317 |
+
jQuery.support = (function() {
|
1318 |
+
|
1319 |
+
var support,
|
1320 |
+
all,
|
1321 |
+
a,
|
1322 |
+
select,
|
1323 |
+
opt,
|
1324 |
+
input,
|
1325 |
+
marginDiv,
|
1326 |
+
fragment,
|
1327 |
+
tds,
|
1328 |
+
events,
|
1329 |
+
eventName,
|
1330 |
+
i,
|
1331 |
+
isSupported,
|
1332 |
+
div = document.createElement( "div" ),
|
1333 |
+
documentElement = document.documentElement;
|
1334 |
+
|
1335 |
+
// Preliminary tests
|
1336 |
+
div.setAttribute("className", "t");
|
1337 |
+
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
|
1338 |
+
|
1339 |
+
all = div.getElementsByTagName( "*" );
|
1340 |
+
a = div.getElementsByTagName( "a" )[ 0 ];
|
1341 |
+
|
1342 |
+
// Can't get basic test support
|
1343 |
+
if ( !all || !all.length || !a ) {
|
1344 |
+
return {};
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
// First batch of supports tests
|
1348 |
+
select = document.createElement( "select" );
|
1349 |
+
opt = select.appendChild( document.createElement("option") );
|
1350 |
+
input = div.getElementsByTagName( "input" )[ 0 ];
|
1351 |
+
|
1352 |
+
support = {
|
1353 |
+
// IE strips leading whitespace when .innerHTML is used
|
1354 |
+
leadingWhitespace: ( div.firstChild.nodeType === 3 ),
|
1355 |
+
|
1356 |
+
// Make sure that tbody elements aren't automatically inserted
|
1357 |
+
// IE will insert them into empty tables
|
1358 |
+
tbody: !div.getElementsByTagName("tbody").length,
|
1359 |
+
|
1360 |
+
// Make sure that link elements get serialized correctly by innerHTML
|
1361 |
+
// This requires a wrapper element in IE
|
1362 |
+
htmlSerialize: !!div.getElementsByTagName("link").length,
|
1363 |
+
|
1364 |
+
// Get the style information from getAttribute
|
1365 |
+
// (IE uses .cssText instead)
|
1366 |
+
style: /top/.test( a.getAttribute("style") ),
|
1367 |
+
|
1368 |
+
// Make sure that URLs aren't manipulated
|
1369 |
+
// (IE normalizes it by default)
|
1370 |
+
hrefNormalized: ( a.getAttribute("href") === "/a" ),
|
1371 |
+
|
1372 |
+
// Make sure that element opacity exists
|
1373 |
+
// (IE uses filter instead)
|
1374 |
+
// Use a regex to work around a WebKit issue. See #5145
|
1375 |
+
opacity: /^0.55/.test( a.style.opacity ),
|
1376 |
+
|
1377 |
+
// Verify style float existence
|
1378 |
+
// (IE uses styleFloat instead of cssFloat)
|
1379 |
+
cssFloat: !!a.style.cssFloat,
|
1380 |
+
|
1381 |
+
// Make sure that if no value is specified for a checkbox
|
1382 |
+
// that it defaults to "on".
|
1383 |
+
// (WebKit defaults to "" instead)
|
1384 |
+
checkOn: ( input.value === "on" ),
|
1385 |
+
|
1386 |
+
// Make sure that a selected-by-default option has a working selected property.
|
1387 |
+
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
|
1388 |
+
optSelected: opt.selected,
|
1389 |
+
|
1390 |
+
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
|
1391 |
+
getSetAttribute: div.className !== "t",
|
1392 |
+
|
1393 |
+
// Tests for enctype support on a form(#6743)
|
1394 |
+
enctype: !!document.createElement("form").enctype,
|
1395 |
+
|
1396 |
+
// Makes sure cloning an html5 element does not cause problems
|
1397 |
+
// Where outerHTML is undefined, this still works
|
1398 |
+
html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
|
1399 |
+
|
1400 |
+
// Will be defined later
|
1401 |
+
submitBubbles: true,
|
1402 |
+
changeBubbles: true,
|
1403 |
+
focusinBubbles: false,
|
1404 |
+
deleteExpando: true,
|
1405 |
+
noCloneEvent: true,
|
1406 |
+
inlineBlockNeedsLayout: false,
|
1407 |
+
shrinkWrapBlocks: false,
|
1408 |
+
reliableMarginRight: true
|
1409 |
+
};
|
1410 |
+
|
1411 |
+
// Make sure checked status is properly cloned
|
1412 |
+
input.checked = true;
|
1413 |
+
support.noCloneChecked = input.cloneNode( true ).checked;
|
1414 |
+
|
1415 |
+
// Make sure that the options inside disabled selects aren't marked as disabled
|
1416 |
+
// (WebKit marks them as disabled)
|
1417 |
+
select.disabled = true;
|
1418 |
+
support.optDisabled = !opt.disabled;
|
1419 |
+
|
1420 |
+
// Test to see if it's possible to delete an expando from an element
|
1421 |
+
// Fails in Internet Explorer
|
1422 |
+
try {
|
1423 |
+
delete div.test;
|
1424 |
+
} catch( e ) {
|
1425 |
+
support.deleteExpando = false;
|
1426 |
+
}
|
1427 |
+
|
1428 |
+
if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
|
1429 |
+
div.attachEvent( "onclick", function() {
|
1430 |
+
// Cloning a node shouldn't copy over any
|
1431 |
+
// bound event handlers (IE does this)
|
1432 |
+
support.noCloneEvent = false;
|
1433 |
+
});
|
1434 |
+
div.cloneNode( true ).fireEvent( "onclick" );
|
1435 |
+
}
|
1436 |
+
|
1437 |
+
// Check if a radio maintains its value
|
1438 |
+
// after being appended to the DOM
|
1439 |
+
input = document.createElement("input");
|
1440 |
+
input.value = "t";
|
1441 |
+
input.setAttribute("type", "radio");
|
1442 |
+
support.radioValue = input.value === "t";
|
1443 |
+
|
1444 |
+
input.setAttribute("checked", "checked");
|
1445 |
+
div.appendChild( input );
|
1446 |
+
fragment = document.createDocumentFragment();
|
1447 |
+
fragment.appendChild( div.lastChild );
|
1448 |
+
|
1449 |
+
// WebKit doesn't clone checked state correctly in fragments
|
1450 |
+
support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
1451 |
+
|
1452 |
+
// Check if a disconnected checkbox will retain its checked
|
1453 |
+
// value of true after appended to the DOM (IE6/7)
|
1454 |
+
support.appendChecked = input.checked;
|
1455 |
+
|
1456 |
+
fragment.removeChild( input );
|
1457 |
+
fragment.appendChild( div );
|
1458 |
+
|
1459 |
+
div.innerHTML = "";
|
1460 |
+
|
1461 |
+
// Check if div with explicit width and no margin-right incorrectly
|
1462 |
+
// gets computed margin-right based on width of container. For more
|
1463 |
+
// info see bug #3333
|
1464 |
+
// Fails in WebKit before Feb 2011 nightlies
|
1465 |
+
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
1466 |
+
if ( window.getComputedStyle ) {
|
1467 |
+
marginDiv = document.createElement( "div" );
|
1468 |
+
marginDiv.style.width = "0";
|
1469 |
+
marginDiv.style.marginRight = "0";
|
1470 |
+
div.style.width = "2px";
|
1471 |
+
div.appendChild( marginDiv );
|
1472 |
+
support.reliableMarginRight =
|
1473 |
+
( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
|
1474 |
+
}
|
1475 |
+
|
1476 |
+
// Technique from Juriy Zaytsev
|
1477 |
+
// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
|
1478 |
+
// We only care about the case where non-standard event systems
|
1479 |
+
// are used, namely in IE. Short-circuiting here helps us to
|
1480 |
+
// avoid an eval call (in setAttribute) which can cause CSP
|
1481 |
+
// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
|
1482 |
+
if ( div.attachEvent ) {
|
1483 |
+
for( i in {
|
1484 |
+
submit: 1,
|
1485 |
+
change: 1,
|
1486 |
+
focusin: 1
|
1487 |
+
}) {
|
1488 |
+
eventName = "on" + i;
|
1489 |
+
isSupported = ( eventName in div );
|
1490 |
+
if ( !isSupported ) {
|
1491 |
+
div.setAttribute( eventName, "return;" );
|
1492 |
+
isSupported = ( typeof div[ eventName ] === "function" );
|
1493 |
+
}
|
1494 |
+
support[ i + "Bubbles" ] = isSupported;
|
1495 |
+
}
|
1496 |
+
}
|
1497 |
+
|
1498 |
+
fragment.removeChild( div );
|
1499 |
+
|
1500 |
+
// Null elements to avoid leaks in IE
|
1501 |
+
fragment = select = opt = marginDiv = div = input = null;
|
1502 |
+
|
1503 |
+
// Run tests that need a body at doc ready
|
1504 |
+
jQuery(function() {
|
1505 |
+
var container, outer, inner, table, td, offsetSupport,
|
1506 |
+
conMarginTop, ptlm, vb, style, html,
|
1507 |
+
body = document.getElementsByTagName("body")[0];
|
1508 |
+
|
1509 |
+
if ( !body ) {
|
1510 |
+
// Return for frameset docs that don't have a body
|
1511 |
+
return;
|
1512 |
+
}
|
1513 |
+
|
1514 |
+
conMarginTop = 1;
|
1515 |
+
ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
|
1516 |
+
vb = "visibility:hidden;border:0;";
|
1517 |
+
style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
|
1518 |
+
html = "<div " + style + "><div></div></div>" +
|
1519 |
+
"<table " + style + " cellpadding='0' cellspacing='0'>" +
|
1520 |
+
"<tr><td></td></tr></table>";
|
1521 |
+
|
1522 |
+
container = document.createElement("div");
|
1523 |
+
container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
|
1524 |
+
body.insertBefore( container, body.firstChild );
|
1525 |
+
|
1526 |
+
// Construct the test element
|
1527 |
+
div = document.createElement("div");
|
1528 |
+
container.appendChild( div );
|
1529 |
+
|
1530 |
+
// Check if table cells still have offsetWidth/Height when they are set
|
1531 |
+
// to display:none and there are still other visible table cells in a
|
1532 |
+
// table row; if so, offsetWidth/Height are not reliable for use when
|
1533 |
+
// determining if an element has been hidden directly using
|
1534 |
+
// display:none (it is still safe to use offsets if a parent element is
|
1535 |
+
// hidden; don safety goggles and see bug #4512 for more information).
|
1536 |
+
// (only IE 8 fails this test)
|
1537 |
+
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
|
1538 |
+
tds = div.getElementsByTagName( "td" );
|
1539 |
+
isSupported = ( tds[ 0 ].offsetHeight === 0 );
|
1540 |
+
|
1541 |
+
tds[ 0 ].style.display = "";
|
1542 |
+
tds[ 1 ].style.display = "none";
|
1543 |
+
|
1544 |
+
// Check if empty table cells still have offsetWidth/Height
|
1545 |
+
// (IE <= 8 fail this test)
|
1546 |
+
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
|
1547 |
+
|
1548 |
+
// Figure out if the W3C box model works as expected
|
1549 |
+
div.innerHTML = "";
|
1550 |
+
div.style.width = div.style.paddingLeft = "1px";
|
1551 |
+
jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
|
1552 |
+
|
1553 |
+
if ( typeof div.style.zoom !== "undefined" ) {
|
1554 |
+
// Check if natively block-level elements act like inline-block
|
1555 |
+
// elements when setting their display to 'inline' and giving
|
1556 |
+
// them layout
|
1557 |
+
// (IE < 8 does this)
|
1558 |
+
div.style.display = "inline";
|
1559 |
+
div.style.zoom = 1;
|
1560 |
+
support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
|
1561 |
+
|
1562 |
+
// Check if elements with layout shrink-wrap their children
|
1563 |
+
// (IE 6 does this)
|
1564 |
+
div.style.display = "";
|
1565 |
+
div.innerHTML = "<div style='width:4px;'></div>";
|
1566 |
+
support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
div.style.cssText = ptlm + vb;
|
1570 |
+
div.innerHTML = html;
|
1571 |
+
|
1572 |
+
outer = div.firstChild;
|
1573 |
+
inner = outer.firstChild;
|
1574 |
+
td = outer.nextSibling.firstChild.firstChild;
|
1575 |
+
|
1576 |
+
offsetSupport = {
|
1577 |
+
doesNotAddBorder: ( inner.offsetTop !== 5 ),
|
1578 |
+
doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
|
1579 |
+
};
|
1580 |
+
|
1581 |
+
inner.style.position = "fixed";
|
1582 |
+
inner.style.top = "20px";
|
1583 |
+
|
1584 |
+
// safari subtracts parent border width here which is 5px
|
1585 |
+
offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
|
1586 |
+
inner.style.position = inner.style.top = "";
|
1587 |
+
|
1588 |
+
outer.style.overflow = "hidden";
|
1589 |
+
outer.style.position = "relative";
|
1590 |
+
|
1591 |
+
offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
|
1592 |
+
offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
|
1593 |
+
|
1594 |
+
body.removeChild( container );
|
1595 |
+
div = container = null;
|
1596 |
+
|
1597 |
+
jQuery.extend( support, offsetSupport );
|
1598 |
+
});
|
1599 |
+
|
1600 |
+
return support;
|
1601 |
+
})();
|
1602 |
+
|
1603 |
+
|
1604 |
+
|
1605 |
+
|
1606 |
+
var rbrace = /^(?:\{.*\}|\[.*\])$/,
|
1607 |
+
rmultiDash = /([A-Z])/g;
|
1608 |
+
|
1609 |
+
jQuery.extend({
|
1610 |
+
cache: {},
|
1611 |
+
|
1612 |
+
// Please use with caution
|
1613 |
+
uuid: 0,
|
1614 |
+
|
1615 |
+
// Unique for each copy of jQuery on the page
|
1616 |
+
// Non-digits removed to match rinlinejQuery
|
1617 |
+
expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
|
1618 |
+
|
1619 |
+
// The following elements throw uncatchable exceptions if you
|
1620 |
+
// attempt to add expando properties to them.
|
1621 |
+
noData: {
|
1622 |
+
"embed": true,
|
1623 |
+
// Ban all objects except for Flash (which handle expandos)
|
1624 |
+
"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
|
1625 |
+
"applet": true
|
1626 |
+
},
|
1627 |
+
|
1628 |
+
hasData: function( elem ) {
|
1629 |
+
elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
|
1630 |
+
return !!elem && !isEmptyDataObject( elem );
|
1631 |
+
},
|
1632 |
+
|
1633 |
+
data: function( elem, name, data, pvt /* Internal Use Only */ ) {
|
1634 |
+
if ( !jQuery.acceptData( elem ) ) {
|
1635 |
+
return;
|
1636 |
+
}
|
1637 |
+
|
1638 |
+
var privateCache, thisCache, ret,
|
1639 |
+
internalKey = jQuery.expando,
|
1640 |
+
getByName = typeof name === "string",
|
1641 |
+
|
1642 |
+
// We have to handle DOM nodes and JS objects differently because IE6-7
|
1643 |
+
// can't GC object references properly across the DOM-JS boundary
|
1644 |
+
isNode = elem.nodeType,
|
1645 |
+
|
1646 |
+
// Only DOM nodes need the global jQuery cache; JS object data is
|
1647 |
+
// attached directly to the object so GC can occur automatically
|
1648 |
+
cache = isNode ? jQuery.cache : elem,
|
1649 |
+
|
1650 |
+
// Only defining an ID for JS objects if its cache already exists allows
|
1651 |
+
// the code to shortcut on the same path as a DOM node with no cache
|
1652 |
+
id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
|
1653 |
+
isEvents = name === "events";
|
1654 |
+
|
1655 |
+
// Avoid doing any more work than we need to when trying to get data on an
|
1656 |
+
// object that has no data at all
|
1657 |
+
if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
|
1658 |
+
return;
|
1659 |
+
}
|
1660 |
+
|
1661 |
+
if ( !id ) {
|
1662 |
+
// Only DOM nodes need a new unique ID for each element since their data
|
1663 |
+
// ends up in the global cache
|
1664 |
+
if ( isNode ) {
|
1665 |
+
elem[ internalKey ] = id = ++jQuery.uuid;
|
1666 |
+
} else {
|
1667 |
+
id = internalKey;
|
1668 |
+
}
|
1669 |
+
}
|
1670 |
+
|
1671 |
+
if ( !cache[ id ] ) {
|
1672 |
+
cache[ id ] = {};
|
1673 |
+
|
1674 |
+
// Avoids exposing jQuery metadata on plain JS objects when the object
|
1675 |
+
// is serialized using JSON.stringify
|
1676 |
+
if ( !isNode ) {
|
1677 |
+
cache[ id ].toJSON = jQuery.noop;
|
1678 |
+
}
|
1679 |
+
}
|
1680 |
+
|
1681 |
+
// An object can be passed to jQuery.data instead of a key/value pair; this gets
|
1682 |
+
// shallow copied over onto the existing cache
|
1683 |
+
if ( typeof name === "object" || typeof name === "function" ) {
|
1684 |
+
if ( pvt ) {
|
1685 |
+
cache[ id ] = jQuery.extend( cache[ id ], name );
|
1686 |
+
} else {
|
1687 |
+
cache[ id ].data = jQuery.extend( cache[ id ].data, name );
|
1688 |
+
}
|
1689 |
+
}
|
1690 |
+
|
1691 |
+
privateCache = thisCache = cache[ id ];
|
1692 |
+
|
1693 |
+
// jQuery data() is stored in a separate object inside the object's internal data
|
1694 |
+
// cache in order to avoid key collisions between internal data and user-defined
|
1695 |
+
// data.
|
1696 |
+
if ( !pvt ) {
|
1697 |
+
if ( !thisCache.data ) {
|
1698 |
+
thisCache.data = {};
|
1699 |
+
}
|
1700 |
+
|
1701 |
+
thisCache = thisCache.data;
|
1702 |
+
}
|
1703 |
+
|
1704 |
+
if ( data !== undefined ) {
|
1705 |
+
thisCache[ jQuery.camelCase( name ) ] = data;
|
1706 |
+
}
|
1707 |
+
|
1708 |
+
// Users should not attempt to inspect the internal events object using jQuery.data,
|
1709 |
+
// it is undocumented and subject to change. But does anyone listen? No.
|
1710 |
+
if ( isEvents && !thisCache[ name ] ) {
|
1711 |
+
return privateCache.events;
|
1712 |
+
}
|
1713 |
+
|
1714 |
+
// Check for both converted-to-camel and non-converted data property names
|
1715 |
+
// If a data property was specified
|
1716 |
+
if ( getByName ) {
|
1717 |
+
|
1718 |
+
// First Try to find as-is property data
|
1719 |
+
ret = thisCache[ name ];
|
1720 |
+
|
1721 |
+
// Test for null|undefined property data
|
1722 |
+
if ( ret == null ) {
|
1723 |
+
|
1724 |
+
// Try to find the camelCased property
|
1725 |
+
ret = thisCache[ jQuery.camelCase( name ) ];
|
1726 |
+
}
|
1727 |
+
} else {
|
1728 |
+
ret = thisCache;
|
1729 |
+
}
|
1730 |
+
|
1731 |
+
return ret;
|
1732 |
+
},
|
1733 |
+
|
1734 |
+
removeData: function( elem, name, pvt /* Internal Use Only */ ) {
|
1735 |
+
if ( !jQuery.acceptData( elem ) ) {
|
1736 |
+
return;
|
1737 |
+
}
|
1738 |
+
|
1739 |
+
var thisCache, i, l,
|
1740 |
+
|
1741 |
+
// Reference to internal data cache key
|
1742 |
+
internalKey = jQuery.expando,
|
1743 |
+
|
1744 |
+
isNode = elem.nodeType,
|
1745 |
+
|
1746 |
+
// See jQuery.data for more information
|
1747 |
+
cache = isNode ? jQuery.cache : elem,
|
1748 |
+
|
1749 |
+
// See jQuery.data for more information
|
1750 |
+
id = isNode ? elem[ internalKey ] : internalKey;
|
1751 |
+
|
1752 |
+
// If there is already no cache entry for this object, there is no
|
1753 |
+
// purpose in continuing
|
1754 |
+
if ( !cache[ id ] ) {
|
1755 |
+
return;
|
1756 |
+
}
|
1757 |
+
|
1758 |
+
if ( name ) {
|
1759 |
+
|
1760 |
+
thisCache = pvt ? cache[ id ] : cache[ id ].data;
|
1761 |
+
|
1762 |
+
if ( thisCache ) {
|
1763 |
+
|
1764 |
+
// Support array or space separated string names for data keys
|
1765 |
+
if ( !jQuery.isArray( name ) ) {
|
1766 |
+
|
1767 |
+
// try the string as a key before any manipulation
|
1768 |
+
if ( name in thisCache ) {
|
1769 |
+
name = [ name ];
|
1770 |
+
} else {
|
1771 |
+
|
1772 |
+
// split the camel cased version by spaces unless a key with the spaces exists
|
1773 |
+
name = jQuery.camelCase( name );
|
1774 |
+
if ( name in thisCache ) {
|
1775 |
+
name = [ name ];
|
1776 |
+
} else {
|
1777 |
+
name = name.split( " " );
|
1778 |
+
}
|
1779 |
+
}
|
1780 |
+
}
|
1781 |
+
|
1782 |
+
for ( i = 0, l = name.length; i < l; i++ ) {
|
1783 |
+
delete thisCache[ name[i] ];
|
1784 |
+
}
|
1785 |
+
|
1786 |
+
// If there is no data left in the cache, we want to continue
|
1787 |
+
// and let the cache object itself get destroyed
|
1788 |
+
if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
|
1789 |
+
return;
|
1790 |
+
}
|
1791 |
+
}
|
1792 |
+
}
|
1793 |
+
|
1794 |
+
// See jQuery.data for more information
|
1795 |
+
if ( !pvt ) {
|
1796 |
+
delete cache[ id ].data;
|
1797 |
+
|
1798 |
+
// Don't destroy the parent cache unless the internal data object
|
1799 |
+
// had been the only thing left in it
|
1800 |
+
if ( !isEmptyDataObject(cache[ id ]) ) {
|
1801 |
+
return;
|
1802 |
+
}
|
1803 |
+
}
|
1804 |
+
|
1805 |
+
// Browsers that fail expando deletion also refuse to delete expandos on
|
1806 |
+
// the window, but it will allow it on all other JS objects; other browsers
|
1807 |
+
// don't care
|
1808 |
+
// Ensure that `cache` is not a window object #10080
|
1809 |
+
if ( jQuery.support.deleteExpando || !cache.setInterval ) {
|
1810 |
+
delete cache[ id ];
|
1811 |
+
} else {
|
1812 |
+
cache[ id ] = null;
|
1813 |
+
}
|
1814 |
+
|
1815 |
+
// We destroyed the cache and need to eliminate the expando on the node to avoid
|
1816 |
+
// false lookups in the cache for entries that no longer exist
|
1817 |
+
if ( isNode ) {
|
1818 |
+
// IE does not allow us to delete expando properties from nodes,
|
1819 |
+
// nor does it have a removeAttribute function on Document nodes;
|
1820 |
+
// we must handle all of these cases
|
1821 |
+
if ( jQuery.support.deleteExpando ) {
|
1822 |
+
delete elem[ internalKey ];
|
1823 |
+
} else if ( elem.removeAttribute ) {
|
1824 |
+
elem.removeAttribute( internalKey );
|
1825 |
+
} else {
|
1826 |
+
elem[ internalKey ] = null;
|
1827 |
+
}
|
1828 |
+
}
|
1829 |
+
},
|
1830 |
+
|
1831 |
+
// For internal use only.
|
1832 |
+
_data: function( elem, name, data ) {
|
1833 |
+
return jQuery.data( elem, name, data, true );
|
1834 |
+
},
|
1835 |
+
|
1836 |
+
// A method for determining if a DOM node can handle the data expando
|
1837 |
+
acceptData: function( elem ) {
|
1838 |
+
if ( elem.nodeName ) {
|
1839 |
+
var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
|
1840 |
+
|
1841 |
+
if ( match ) {
|
1842 |
+
return !(match === true || elem.getAttribute("classid") !== match);
|
1843 |
+
}
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
return true;
|
1847 |
+
}
|
1848 |
+
});
|
1849 |
+
|
1850 |
+
jQuery.fn.extend({
|
1851 |
+
data: function( key, value ) {
|
1852 |
+
var parts, attr, name,
|
1853 |
+
data = null;
|
1854 |
+
|
1855 |
+
if ( typeof key === "undefined" ) {
|
1856 |
+
if ( this.length ) {
|
1857 |
+
data = jQuery.data( this[0] );
|
1858 |
+
|
1859 |
+
if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
|
1860 |
+
attr = this[0].attributes;
|
1861 |
+
for ( var i = 0, l = attr.length; i < l; i++ ) {
|
1862 |
+
name = attr[i].name;
|
1863 |
+
|
1864 |
+
if ( name.indexOf( "data-" ) === 0 ) {
|
1865 |
+
name = jQuery.camelCase( name.substring(5) );
|
1866 |
+
|
1867 |
+
dataAttr( this[0], name, data[ name ] );
|
1868 |
+
}
|
1869 |
+
}
|
1870 |
+
jQuery._data( this[0], "parsedAttrs", true );
|
1871 |
+
}
|
1872 |
+
}
|
1873 |
+
|
1874 |
+
return data;
|
1875 |
+
|
1876 |
+
} else if ( typeof key === "object" ) {
|
1877 |
+
return this.each(function() {
|
1878 |
+
jQuery.data( this, key );
|
1879 |
+
});
|
1880 |
+
}
|
1881 |
+
|
1882 |
+
parts = key.split(".");
|
1883 |
+
parts[1] = parts[1] ? "." + parts[1] : "";
|
1884 |
+
|
1885 |
+
if ( value === undefined ) {
|
1886 |
+
data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
|
1887 |
+
|
1888 |
+
// Try to fetch any internally stored data first
|
1889 |
+
if ( data === undefined && this.length ) {
|
1890 |
+
data = jQuery.data( this[0], key );
|
1891 |
+
data = dataAttr( this[0], key, data );
|
1892 |
+
}
|
1893 |
+
|
1894 |
+
return data === undefined && parts[1] ?
|
1895 |
+
this.data( parts[0] ) :
|
1896 |
+
data;
|
1897 |
+
|
1898 |
+
} else {
|
1899 |
+
return this.each(function() {
|
1900 |
+
var self = jQuery( this ),
|
1901 |
+
args = [ parts[0], value ];
|
1902 |
+
|
1903 |
+
self.triggerHandler( "setData" + parts[1] + "!", args );
|
1904 |
+
jQuery.data( this, key, value );
|
1905 |
+
self.triggerHandler( "changeData" + parts[1] + "!", args );
|
1906 |
+
});
|
1907 |
+
}
|
1908 |
+
},
|
1909 |
+
|
1910 |
+
removeData: function( key ) {
|
1911 |
+
return this.each(function() {
|
1912 |
+
jQuery.removeData( this, key );
|
1913 |
+
});
|
1914 |
+
}
|
1915 |
+
});
|
1916 |
+
|
1917 |
+
function dataAttr( elem, key, data ) {
|
1918 |
+
// If nothing was found internally, try to fetch any
|
1919 |
+
// data from the HTML5 data-* attribute
|
1920 |
+
if ( data === undefined && elem.nodeType === 1 ) {
|
1921 |
+
|
1922 |
+
var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
|
1923 |
+
|
1924 |
+
data = elem.getAttribute( name );
|
1925 |
+
|
1926 |
+
if ( typeof data === "string" ) {
|
1927 |
+
try {
|
1928 |
+
data = data === "true" ? true :
|
1929 |
+
data === "false" ? false :
|
1930 |
+
data === "null" ? null :
|
1931 |
+
jQuery.isNumeric( data ) ? parseFloat( data ) :
|
1932 |
+
rbrace.test( data ) ? jQuery.parseJSON( data ) :
|
1933 |
+
data;
|
1934 |
+
} catch( e ) {}
|
1935 |
+
|
1936 |
+
// Make sure we set the data so it isn't changed later
|
1937 |
+
jQuery.data( elem, key, data );
|
1938 |
+
|
1939 |
+
} else {
|
1940 |
+
data = undefined;
|
1941 |
+
}
|
1942 |
+
}
|
1943 |
+
|
1944 |
+
return data;
|
1945 |
+
}
|
1946 |
+
|
1947 |
+
// checks a cache object for emptiness
|
1948 |
+
function isEmptyDataObject( obj ) {
|
1949 |
+
for ( var name in obj ) {
|
1950 |
+
|
1951 |
+
// if the public data object is empty, the private is still empty
|
1952 |
+
if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
|
1953 |
+
continue;
|
1954 |
+
}
|
1955 |
+
if ( name !== "toJSON" ) {
|
1956 |
+
return false;
|
1957 |
+
}
|
1958 |
+
}
|
1959 |
+
|
1960 |
+
return true;
|
1961 |
+
}
|
1962 |
+
|
1963 |
+
|
1964 |
+
|
1965 |
+
|
1966 |
+
function handleQueueMarkDefer( elem, type, src ) {
|
1967 |
+
var deferDataKey = type + "defer",
|
1968 |
+
queueDataKey = type + "queue",
|
1969 |
+
markDataKey = type + "mark",
|
1970 |
+
defer = jQuery._data( elem, deferDataKey );
|
1971 |
+
if ( defer &&
|
1972 |
+
( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
|
1973 |
+
( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
|
1974 |
+
// Give room for hard-coded callbacks to fire first
|
1975 |
+
// and eventually mark/queue something else on the element
|
1976 |
+
setTimeout( function() {
|
1977 |
+
if ( !jQuery._data( elem, queueDataKey ) &&
|
1978 |
+
!jQuery._data( elem, markDataKey ) ) {
|
1979 |
+
jQuery.removeData( elem, deferDataKey, true );
|
1980 |
+
defer.fire();
|
1981 |
+
}
|
1982 |
+
}, 0 );
|
1983 |
+
}
|
1984 |
+
}
|
1985 |
+
|
1986 |
+
jQuery.extend({
|
1987 |
+
|
1988 |
+
_mark: function( elem, type ) {
|
1989 |
+
if ( elem ) {
|
1990 |
+
type = ( type || "fx" ) + "mark";
|
1991 |
+
jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
|
1992 |
+
}
|
1993 |
+
},
|
1994 |
+
|
1995 |
+
_unmark: function( force, elem, type ) {
|
1996 |
+
if ( force !== true ) {
|
1997 |
+
type = elem;
|
1998 |
+
elem = force;
|
1999 |
+
force = false;
|
2000 |
+
}
|
2001 |
+
if ( elem ) {
|
2002 |
+
type = type || "fx";
|
2003 |
+
var key = type + "mark",
|
2004 |
+
count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
|
2005 |
+
if ( count ) {
|
2006 |
+
jQuery._data( elem, key, count );
|
2007 |
+
} else {
|
2008 |
+
jQuery.removeData( elem, key, true );
|
2009 |
+
handleQueueMarkDefer( elem, type, "mark" );
|
2010 |
+
}
|
2011 |
+
}
|
2012 |
+
},
|
2013 |
+
|
2014 |
+
queue: function( elem, type, data ) {
|
2015 |
+
var q;
|
2016 |
+
if ( elem ) {
|
2017 |
+
type = ( type || "fx" ) + "queue";
|
2018 |
+
q = jQuery._data( elem, type );
|
2019 |
+
|
2020 |
+
// Speed up dequeue by getting out quickly if this is just a lookup
|
2021 |
+
if ( data ) {
|
2022 |
+
if ( !q || jQuery.isArray(data) ) {
|
2023 |
+
q = jQuery._data( elem, type, jQuery.makeArray(data) );
|
2024 |
+
} else {
|
2025 |
+
q.push( data );
|
2026 |
+
}
|
2027 |
+
}
|
2028 |
+
return q || [];
|
2029 |
+
}
|
2030 |
+
},
|
2031 |
+
|
2032 |
+
dequeue: function( elem, type ) {
|
2033 |
+
type = type || "fx";
|
2034 |
+
|
2035 |
+
var queue = jQuery.queue( elem, type ),
|
2036 |
+
fn = queue.shift(),
|
2037 |
+
hooks = {};
|
2038 |
+
|
2039 |
+
// If the fx queue is dequeued, always remove the progress sentinel
|
2040 |
+
if ( fn === "inprogress" ) {
|
2041 |
+
fn = queue.shift();
|
2042 |
+
}
|
2043 |
+
|
2044 |
+
if ( fn ) {
|
2045 |
+
// Add a progress sentinel to prevent the fx queue from being
|
2046 |
+
// automatically dequeued
|
2047 |
+
if ( type === "fx" ) {
|
2048 |
+
queue.unshift( "inprogress" );
|
2049 |
+
}
|
2050 |
+
|
2051 |
+
jQuery._data( elem, type + ".run", hooks );
|
2052 |
+
fn.call( elem, function() {
|
2053 |
+
jQuery.dequeue( elem, type );
|
2054 |
+
}, hooks );
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
if ( !queue.length ) {
|
2058 |
+
jQuery.removeData( elem, type + "queue " + type + ".run", true );
|
2059 |
+
handleQueueMarkDefer( elem, type, "queue" );
|
2060 |
+
}
|
2061 |
+
}
|
2062 |
+
});
|
2063 |
+
|
2064 |
+
jQuery.fn.extend({
|
2065 |
+
queue: function( type, data ) {
|
2066 |
+
if ( typeof type !== "string" ) {
|
2067 |
+
data = type;
|
2068 |
+
type = "fx";
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
if ( data === undefined ) {
|
2072 |
+
return jQuery.queue( this[0], type );
|
2073 |
+
}
|
2074 |
+
return this.each(function() {
|
2075 |
+
var queue = jQuery.queue( this, type, data );
|
2076 |
+
|
2077 |
+
if ( type === "fx" && queue[0] !== "inprogress" ) {
|
2078 |
+
jQuery.dequeue( this, type );
|
2079 |
+
}
|
2080 |
+
});
|
2081 |
+
},
|
2082 |
+
dequeue: function( type ) {
|
2083 |
+
return this.each(function() {
|
2084 |
+
jQuery.dequeue( this, type );
|
2085 |
+
});
|
2086 |
+
},
|
2087 |
+
// Based off of the plugin by Clint Helfers, with permission.
|
2088 |
+
// http://blindsignals.com/index.php/2009/07/jquery-delay/
|
2089 |
+
delay: function( time, type ) {
|
2090 |
+
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
2091 |
+
type = type || "fx";
|
2092 |
+
|
2093 |
+
return this.queue( type, function( next, hooks ) {
|
2094 |
+
var timeout = setTimeout( next, time );
|
2095 |
+
hooks.stop = function() {
|
2096 |
+
clearTimeout( timeout );
|
2097 |
+
};
|
2098 |
+
});
|
2099 |
+
},
|
2100 |
+
clearQueue: function( type ) {
|
2101 |
+
return this.queue( type || "fx", [] );
|
2102 |
+
},
|
2103 |
+
// Get a promise resolved when queues of a certain type
|
2104 |
+
// are emptied (fx is the type by default)
|
2105 |
+
promise: function( type, object ) {
|
2106 |
+
if ( typeof type !== "string" ) {
|
2107 |
+
object = type;
|
2108 |
+
type = undefined;
|
2109 |
+
}
|
2110 |
+
type = type || "fx";
|
2111 |
+
var defer = jQuery.Deferred(),
|
2112 |
+
elements = this,
|
2113 |
+
i = elements.length,
|
2114 |
+
count = 1,
|
2115 |
+
deferDataKey = type + "defer",
|
2116 |
+
queueDataKey = type + "queue",
|
2117 |
+
markDataKey = type + "mark",
|
2118 |
+
tmp;
|
2119 |
+
function resolve() {
|
2120 |
+
if ( !( --count ) ) {
|
2121 |
+
defer.resolveWith( elements, [ elements ] );
|
2122 |
+
}
|
2123 |
+
}
|
2124 |
+
while( i-- ) {
|
2125 |
+
if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
|
2126 |
+
( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
|
2127 |
+
jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
|
2128 |
+
jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
|
2129 |
+
count++;
|
2130 |
+
tmp.add( resolve );
|
2131 |
+
}
|
2132 |
+
}
|
2133 |
+
resolve();
|
2134 |
+
return defer.promise();
|
2135 |
+
}
|
2136 |
+
});
|
2137 |
+
|
2138 |
+
|
2139 |
+
|
2140 |
+
|
2141 |
+
var rclass = /[\n\t\r]/g,
|
2142 |
+
rspace = /\s+/,
|
2143 |
+
rreturn = /\r/g,
|
2144 |
+
rtype = /^(?:button|input)$/i,
|
2145 |
+
rfocusable = /^(?:button|input|object|select|textarea)$/i,
|
2146 |
+
rclickable = /^a(?:rea)?$/i,
|
2147 |
+
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
|
2148 |
+
getSetAttribute = jQuery.support.getSetAttribute,
|
2149 |
+
nodeHook, boolHook, fixSpecified;
|
2150 |
+
|
2151 |
+
jQuery.fn.extend({
|
2152 |
+
attr: function( name, value ) {
|
2153 |
+
return jQuery.access( this, name, value, true, jQuery.attr );
|
2154 |
+
},
|
2155 |
+
|
2156 |
+
removeAttr: function( name ) {
|
2157 |
+
return this.each(function() {
|
2158 |
+
jQuery.removeAttr( this, name );
|
2159 |
+
});
|
2160 |
+
},
|
2161 |
+
|
2162 |
+
prop: function( name, value ) {
|
2163 |
+
return jQuery.access( this, name, value, true, jQuery.prop );
|
2164 |
+
},
|
2165 |
+
|
2166 |
+
removeProp: function( name ) {
|
2167 |
+
name = jQuery.propFix[ name ] || name;
|
2168 |
+
return this.each(function() {
|
2169 |
+
// try/catch handles cases where IE balks (such as removing a property on window)
|
2170 |
+
try {
|
2171 |
+
this[ name ] = undefined;
|
2172 |
+
delete this[ name ];
|
2173 |
+
} catch( e ) {}
|
2174 |
+
});
|
2175 |
+
},
|
2176 |
+
|
2177 |
+
addClass: function( value ) {
|
2178 |
+
var classNames, i, l, elem,
|
2179 |
+
setClass, c, cl;
|
2180 |
+
|
2181 |
+
if ( jQuery.isFunction( value ) ) {
|
2182 |
+
return this.each(function( j ) {
|
2183 |
+
jQuery( this ).addClass( value.call(this, j, this.className) );
|
2184 |
+
});
|
2185 |
+
}
|
2186 |
+
|
2187 |
+
if ( value && typeof value === "string" ) {
|
2188 |
+
classNames = value.split( rspace );
|
2189 |
+
|
2190 |
+
for ( i = 0, l = this.length; i < l; i++ ) {
|
2191 |
+
elem = this[ i ];
|
2192 |
+
|
2193 |
+
if ( elem.nodeType === 1 ) {
|
2194 |
+
if ( !elem.className && classNames.length === 1 ) {
|
2195 |
+
elem.className = value;
|
2196 |
+
|
2197 |
+
} else {
|
2198 |
+
setClass = " " + elem.className + " ";
|
2199 |
+
|
2200 |
+
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
|
2201 |
+
if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
|
2202 |
+
setClass += classNames[ c ] + " ";
|
2203 |
+
}
|
2204 |
+
}
|
2205 |
+
elem.className = jQuery.trim( setClass );
|
2206 |
+
}
|
2207 |
+
}
|
2208 |
+
}
|
2209 |
+
}
|
2210 |
+
|
2211 |
+
return this;
|
2212 |
+
},
|
2213 |
+
|
2214 |
+
removeClass: function( value ) {
|
2215 |
+
var classNames, i, l, elem, className, c, cl;
|
2216 |
+
|
2217 |
+
if ( jQuery.isFunction( value ) ) {
|
2218 |
+
return this.each(function( j ) {
|
2219 |
+
jQuery( this ).removeClass( value.call(this, j, this.className) );
|
2220 |
+
});
|
2221 |
+
}
|
2222 |
+
|
2223 |
+
if ( (value && typeof value === "string") || value === undefined ) {
|
2224 |
+
classNames = ( value || "" ).split( rspace );
|
2225 |
+
|
2226 |
+
for ( i = 0, l = this.length; i < l; i++ ) {
|
2227 |
+
elem = this[ i ];
|
2228 |
+
|
2229 |
+
if ( elem.nodeType === 1 && elem.className ) {
|
2230 |
+
if ( value ) {
|
2231 |
+
className = (" " + elem.className + " ").replace( rclass, " " );
|
2232 |
+
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
|
2233 |
+
className = className.replace(" " + classNames[ c ] + " ", " ");
|
2234 |
+
}
|
2235 |
+
elem.className = jQuery.trim( className );
|
2236 |
+
|
2237 |
+
} else {
|
2238 |
+
elem.className = "";
|
2239 |
+
}
|
2240 |
+
}
|
2241 |
+
}
|
2242 |
+
}
|
2243 |
+
|
2244 |
+
return this;
|
2245 |
+
},
|
2246 |
+
|
2247 |
+
toggleClass: function( value, stateVal ) {
|
2248 |
+
var type = typeof value,
|
2249 |
+
isBool = typeof stateVal === "boolean";
|
2250 |
+
|
2251 |
+
if ( jQuery.isFunction( value ) ) {
|
2252 |
+
return this.each(function( i ) {
|
2253 |
+
jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
|
2254 |
+
});
|
2255 |
+
}
|
2256 |
+
|
2257 |
+
return this.each(function() {
|
2258 |
+
if ( type === "string" ) {
|
2259 |
+
// toggle individual class names
|
2260 |
+
var className,
|
2261 |
+
i = 0,
|
2262 |
+
self = jQuery( this ),
|
2263 |
+
state = stateVal,
|
2264 |
+
classNames = value.split( rspace );
|
2265 |
+
|
2266 |
+
while ( (className = classNames[ i++ ]) ) {
|
2267 |
+
// check each className given, space seperated list
|
2268 |
+
state = isBool ? state : !self.hasClass( className );
|
2269 |
+
self[ state ? "addClass" : "removeClass" ]( className );
|
2270 |
+
}
|
2271 |
+
|
2272 |
+
} else if ( type === "undefined" || type === "boolean" ) {
|
2273 |
+
if ( this.className ) {
|
2274 |
+
// store className if set
|
2275 |
+
jQuery._data( this, "__className__", this.className );
|
2276 |
+
}
|
2277 |
+
|
2278 |
+
// toggle whole className
|
2279 |
+
this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
|
2280 |
+
}
|
2281 |
+
});
|
2282 |
+
},
|
2283 |
+
|
2284 |
+
hasClass: function( selector ) {
|
2285 |
+
var className = " " + selector + " ",
|
2286 |
+
i = 0,
|
2287 |
+
l = this.length;
|
2288 |
+
for ( ; i < l; i++ ) {
|
2289 |
+
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
|
2290 |
+
return true;
|
2291 |
+
}
|
2292 |
+
}
|
2293 |
+
|
2294 |
+
return false;
|
2295 |
+
},
|
2296 |
+
|
2297 |
+
val: function( value ) {
|
2298 |
+
var hooks, ret, isFunction,
|
2299 |
+
elem = this[0];
|
2300 |
+
|
2301 |
+
if ( !arguments.length ) {
|
2302 |
+
if ( elem ) {
|
2303 |
+
hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
|
2304 |
+
|
2305 |
+
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
|
2306 |
+
return ret;
|
2307 |
+
}
|
2308 |
+
|
2309 |
+
ret = elem.value;
|
2310 |
+
|
2311 |
+
return typeof ret === "string" ?
|
2312 |
+
// handle most common string cases
|
2313 |
+
ret.replace(rreturn, "") :
|
2314 |
+
// handle cases where value is null/undef or number
|
2315 |
+
ret == null ? "" : ret;
|
2316 |
+
}
|
2317 |
+
|
2318 |
+
return;
|
2319 |
+
}
|
2320 |
+
|
2321 |
+
isFunction = jQuery.isFunction( value );
|
2322 |
+
|
2323 |
+
return this.each(function( i ) {
|
2324 |
+
var self = jQuery(this), val;
|
2325 |
+
|
2326 |
+
if ( this.nodeType !== 1 ) {
|
2327 |
+
return;
|
2328 |
+
}
|
2329 |
+
|
2330 |
+
if ( isFunction ) {
|
2331 |
+
val = value.call( this, i, self.val() );
|
2332 |
+
} else {
|
2333 |
+
val = value;
|
2334 |
+
}
|
2335 |
+
|
2336 |
+
// Treat null/undefined as ""; convert numbers to string
|
2337 |
+
if ( val == null ) {
|
2338 |
+
val = "";
|
2339 |
+
} else if ( typeof val === "number" ) {
|
2340 |
+
val += "";
|
2341 |
+
} else if ( jQuery.isArray( val ) ) {
|
2342 |
+
val = jQuery.map(val, function ( value ) {
|
2343 |
+
return value == null ? "" : value + "";
|
2344 |
+
});
|
2345 |
+
}
|
2346 |
+
|
2347 |
+
hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
|
2348 |
+
|
2349 |
+
// If set returns undefined, fall back to normal setting
|
2350 |
+
if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
|
2351 |
+
this.value = val;
|
2352 |
+
}
|
2353 |
+
});
|
2354 |
+
}
|
2355 |
+
});
|
2356 |
+
|
2357 |
+
jQuery.extend({
|
2358 |
+
valHooks: {
|
2359 |
+
option: {
|
2360 |
+
get: function( elem ) {
|
2361 |
+
// attributes.value is undefined in Blackberry 4.7 but
|
2362 |
+
// uses .value. See #6932
|
2363 |
+
var val = elem.attributes.value;
|
2364 |
+
return !val || val.specified ? elem.value : elem.text;
|
2365 |
+
}
|
2366 |
+
},
|
2367 |
+
select: {
|
2368 |
+
get: function( elem ) {
|
2369 |
+
var value, i, max, option,
|
2370 |
+
index = elem.selectedIndex,
|
2371 |
+
values = [],
|
2372 |
+
options = elem.options,
|
2373 |
+
one = elem.type === "select-one";
|
2374 |
+
|
2375 |
+
// Nothing was selected
|
2376 |
+
if ( index < 0 ) {
|
2377 |
+
return null;
|
2378 |
+
}
|
2379 |
+
|
2380 |
+
// Loop through all the selected options
|
2381 |
+
i = one ? index : 0;
|
2382 |
+
max = one ? index + 1 : options.length;
|
2383 |
+
for ( ; i < max; i++ ) {
|
2384 |
+
option = options[ i ];
|
2385 |
+
|
2386 |
+
// Don't return options that are disabled or in a disabled optgroup
|
2387 |
+
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
|
2388 |
+
(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
|
2389 |
+
|
2390 |
+
// Get the specific value for the option
|
2391 |
+
value = jQuery( option ).val();
|
2392 |
+
|
2393 |
+
// We don't need an array for one selects
|
2394 |
+
if ( one ) {
|
2395 |
+
return value;
|
2396 |
+
}
|
2397 |
+
|
2398 |
+
// Multi-Selects return an array
|
2399 |
+
values.push( value );
|
2400 |
+
}
|
2401 |
+
}
|
2402 |
+
|
2403 |
+
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
|
2404 |
+
if ( one && !values.length && options.length ) {
|
2405 |
+
return jQuery( options[ index ] ).val();
|
2406 |
+
}
|
2407 |
+
|
2408 |
+
return values;
|
2409 |
+
},
|
2410 |
+
|
2411 |
+
set: function( elem, value ) {
|
2412 |
+
var values = jQuery.makeArray( value );
|
2413 |
+
|
2414 |
+
jQuery(elem).find("option").each(function() {
|
2415 |
+
this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
|
2416 |
+
});
|
2417 |
+
|
2418 |
+
if ( !values.length ) {
|
2419 |
+
elem.selectedIndex = -1;
|
2420 |
+
}
|
2421 |
+
return values;
|
2422 |
+
}
|
2423 |
+
}
|
2424 |
+
},
|
2425 |
+
|
2426 |
+
attrFn: {
|
2427 |
+
val: true,
|
2428 |
+
css: true,
|
2429 |
+
html: true,
|
2430 |
+
text: true,
|
2431 |
+
data: true,
|
2432 |
+
width: true,
|
2433 |
+
height: true,
|
2434 |
+
offset: true
|
2435 |
+
},
|
2436 |
+
|
2437 |
+
attr: function( elem, name, value, pass ) {
|
2438 |
+
var ret, hooks, notxml,
|
2439 |
+
nType = elem.nodeType;
|
2440 |
+
|
2441 |
+
// don't get/set attributes on text, comment and attribute nodes
|
2442 |
+
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
2443 |
+
return;
|
2444 |
+
}
|
2445 |
+
|
2446 |
+
if ( pass && name in jQuery.attrFn ) {
|
2447 |
+
return jQuery( elem )[ name ]( value );
|
2448 |
+
}
|
2449 |
+
|
2450 |
+
// Fallback to prop when attributes are not supported
|
2451 |
+
if ( typeof elem.getAttribute === "undefined" ) {
|
2452 |
+
return jQuery.prop( elem, name, value );
|
2453 |
+
}
|
2454 |
+
|
2455 |
+
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
2456 |
+
|
2457 |
+
// All attributes are lowercase
|
2458 |
+
// Grab necessary hook if one is defined
|
2459 |
+
if ( notxml ) {
|
2460 |
+
name = name.toLowerCase();
|
2461 |
+
hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
|
2462 |
+
}
|
2463 |
+
|
2464 |
+
if ( value !== undefined ) {
|
2465 |
+
|
2466 |
+
if ( value === null ) {
|
2467 |
+
jQuery.removeAttr( elem, name );
|
2468 |
+
return;
|
2469 |
+
|
2470 |
+
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
2471 |
+
return ret;
|
2472 |
+
|
2473 |
+
} else {
|
2474 |
+
elem.setAttribute( name, "" + value );
|
2475 |
+
return value;
|
2476 |
+
}
|
2477 |
+
|
2478 |
+
} else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
|
2479 |
+
return ret;
|
2480 |
+
|
2481 |
+
} else {
|
2482 |
+
|
2483 |
+
ret = elem.getAttribute( name );
|
2484 |
+
|
2485 |
+
// Non-existent attributes return null, we normalize to undefined
|
2486 |
+
return ret === null ?
|
2487 |
+
undefined :
|
2488 |
+
ret;
|
2489 |
+
}
|
2490 |
+
},
|
2491 |
+
|
2492 |
+
removeAttr: function( elem, value ) {
|
2493 |
+
var propName, attrNames, name, l,
|
2494 |
+
i = 0;
|
2495 |
+
|
2496 |
+
if ( value && elem.nodeType === 1 ) {
|
2497 |
+
attrNames = value.toLowerCase().split( rspace );
|
2498 |
+
l = attrNames.length;
|
2499 |
+
|
2500 |
+
for ( ; i < l; i++ ) {
|
2501 |
+
name = attrNames[ i ];
|
2502 |
+
|
2503 |
+
if ( name ) {
|
2504 |
+
propName = jQuery.propFix[ name ] || name;
|
2505 |
+
|
2506 |
+
// See #9699 for explanation of this approach (setting first, then removal)
|
2507 |
+
jQuery.attr( elem, name, "" );
|
2508 |
+
elem.removeAttribute( getSetAttribute ? name : propName );
|
2509 |
+
|
2510 |
+
// Set corresponding property to false for boolean attributes
|
2511 |
+
if ( rboolean.test( name ) && propName in elem ) {
|
2512 |
+
elem[ propName ] = false;
|
2513 |
+
}
|
2514 |
+
}
|
2515 |
+
}
|
2516 |
+
}
|
2517 |
+
},
|
2518 |
+
|
2519 |
+
attrHooks: {
|
2520 |
+
type: {
|
2521 |
+
set: function( elem, value ) {
|
2522 |
+
// We can't allow the type property to be changed (since it causes problems in IE)
|
2523 |
+
if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
|
2524 |
+
jQuery.error( "type property can't be changed" );
|
2525 |
+
} else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
|
2526 |
+
// Setting the type on a radio button after the value resets the value in IE6-9
|
2527 |
+
// Reset value to it's default in case type is set after value
|
2528 |
+
// This is for element creation
|
2529 |
+
var val = elem.value;
|
2530 |
+
elem.setAttribute( "type", value );
|
2531 |
+
if ( val ) {
|
2532 |
+
elem.value = val;
|
2533 |
+
}
|
2534 |
+
return value;
|
2535 |
+
}
|
2536 |
+
}
|
2537 |
+
},
|
2538 |
+
// Use the value property for back compat
|
2539 |
+
// Use the nodeHook for button elements in IE6/7 (#1954)
|
2540 |
+
value: {
|
2541 |
+
get: function( elem, name ) {
|
2542 |
+
if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
|
2543 |
+
return nodeHook.get( elem, name );
|
2544 |
+
}
|
2545 |
+
return name in elem ?
|
2546 |
+
elem.value :
|
2547 |
+
null;
|
2548 |
+
},
|
2549 |
+
set: function( elem, value, name ) {
|
2550 |
+
if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
|
2551 |
+
return nodeHook.set( elem, value, name );
|
2552 |
+
}
|
2553 |
+
// Does not return so that setAttribute is also used
|
2554 |
+
elem.value = value;
|
2555 |
+
}
|
2556 |
+
}
|
2557 |
+
},
|
2558 |
+
|
2559 |
+
propFix: {
|
2560 |
+
tabindex: "tabIndex",
|
2561 |
+
readonly: "readOnly",
|
2562 |
+
"for": "htmlFor",
|
2563 |
+
"class": "className",
|
2564 |
+
maxlength: "maxLength",
|
2565 |
+
cellspacing: "cellSpacing",
|
2566 |
+
cellpadding: "cellPadding",
|
2567 |
+
rowspan: "rowSpan",
|
2568 |
+
colspan: "colSpan",
|
2569 |
+
usemap: "useMap",
|
2570 |
+
frameborder: "frameBorder",
|
2571 |
+
contenteditable: "contentEditable"
|
2572 |
+
},
|
2573 |
+
|
2574 |
+
prop: function( elem, name, value ) {
|
2575 |
+
var ret, hooks, notxml,
|
2576 |
+
nType = elem.nodeType;
|
2577 |
+
|
2578 |
+
// don't get/set properties on text, comment and attribute nodes
|
2579 |
+
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
2580 |
+
return;
|
2581 |
+
}
|
2582 |
+
|
2583 |
+
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
2584 |
+
|
2585 |
+
if ( notxml ) {
|
2586 |
+
// Fix name and attach hooks
|
2587 |
+
name = jQuery.propFix[ name ] || name;
|
2588 |
+
hooks = jQuery.propHooks[ name ];
|
2589 |
+
}
|
2590 |
+
|
2591 |
+
if ( value !== undefined ) {
|
2592 |
+
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
2593 |
+
return ret;
|
2594 |
+
|
2595 |
+
} else {
|
2596 |
+
return ( elem[ name ] = value );
|
2597 |
+
}
|
2598 |
+
|
2599 |
+
} else {
|
2600 |
+
if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
|
2601 |
+
return ret;
|
2602 |
+
|
2603 |
+
} else {
|
2604 |
+
return elem[ name ];
|
2605 |
+
}
|
2606 |
+
}
|
2607 |
+
},
|
2608 |
+
|
2609 |
+
propHooks: {
|
2610 |
+
tabIndex: {
|
2611 |
+
get: function( elem ) {
|
2612 |
+
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
|
2613 |
+
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
2614 |
+
var attributeNode = elem.getAttributeNode("tabindex");
|
2615 |
+
|
2616 |
+
return attributeNode && attributeNode.specified ?
|
2617 |
+
parseInt( attributeNode.value, 10 ) :
|
2618 |
+
rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
|
2619 |
+
0 :
|
2620 |
+
undefined;
|
2621 |
+
}
|
2622 |
+
}
|
2623 |
+
}
|
2624 |
+
});
|
2625 |
+
|
2626 |
+
// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
|
2627 |
+
jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
|
2628 |
+
|
2629 |
+
// Hook for boolean attributes
|
2630 |
+
boolHook = {
|
2631 |
+
get: function( elem, name ) {
|
2632 |
+
// Align boolean attributes with corresponding properties
|
2633 |
+
// Fall back to attribute presence where some booleans are not supported
|
2634 |
+
var attrNode,
|
2635 |
+
property = jQuery.prop( elem, name );
|
2636 |
+
return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
|
2637 |
+
name.toLowerCase() :
|
2638 |
+
undefined;
|
2639 |
+
},
|
2640 |
+
set: function( elem, value, name ) {
|
2641 |
+
var propName;
|
2642 |
+
if ( value === false ) {
|
2643 |
+
// Remove boolean attributes when set to false
|
2644 |
+
jQuery.removeAttr( elem, name );
|
2645 |
+
} else {
|
2646 |
+
// value is true since we know at this point it's type boolean and not false
|
2647 |
+
// Set boolean attributes to the same name and set the DOM property
|
2648 |
+
propName = jQuery.propFix[ name ] || name;
|
2649 |
+
if ( propName in elem ) {
|
2650 |
+
// Only set the IDL specifically if it already exists on the element
|
2651 |
+
elem[ propName ] = true;
|
2652 |
+
}
|
2653 |
+
|
2654 |
+
elem.setAttribute( name, name.toLowerCase() );
|
2655 |
+
}
|
2656 |
+
return name;
|
2657 |
+
}
|
2658 |
+
};
|
2659 |
+
|
2660 |
+
// IE6/7 do not support getting/setting some attributes with get/setAttribute
|
2661 |
+
if ( !getSetAttribute ) {
|
2662 |
+
|
2663 |
+
fixSpecified = {
|
2664 |
+
name: true,
|
2665 |
+
id: true
|
2666 |
+
};
|
2667 |
+
|
2668 |
+
// Use this for any attribute in IE6/7
|
2669 |
+
// This fixes almost every IE6/7 issue
|
2670 |
+
nodeHook = jQuery.valHooks.button = {
|
2671 |
+
get: function( elem, name ) {
|
2672 |
+
var ret;
|
2673 |
+
ret = elem.getAttributeNode( name );
|
2674 |
+
return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
|
2675 |
+
ret.nodeValue :
|
2676 |
+
undefined;
|
2677 |
+
},
|
2678 |
+
set: function( elem, value, name ) {
|
2679 |
+
// Set the existing or create a new attribute node
|
2680 |
+
var ret = elem.getAttributeNode( name );
|
2681 |
+
if ( !ret ) {
|
2682 |
+
ret = document.createAttribute( name );
|
2683 |
+
elem.setAttributeNode( ret );
|
2684 |
+
}
|
2685 |
+
return ( ret.nodeValue = value + "" );
|
2686 |
+
}
|
2687 |
+
};
|
2688 |
+
|
2689 |
+
// Apply the nodeHook to tabindex
|
2690 |
+
jQuery.attrHooks.tabindex.set = nodeHook.set;
|
2691 |
+
|
2692 |
+
// Set width and height to auto instead of 0 on empty string( Bug #8150 )
|
2693 |
+
// This is for removals
|
2694 |
+
jQuery.each([ "width", "height" ], function( i, name ) {
|
2695 |
+
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
|
2696 |
+
set: function( elem, value ) {
|
2697 |
+
if ( value === "" ) {
|
2698 |
+
elem.setAttribute( name, "auto" );
|
2699 |
+
return value;
|
2700 |
+
}
|
2701 |
+
}
|
2702 |
+
});
|
2703 |
+
});
|
2704 |
+
|
2705 |
+
// Set contenteditable to false on removals(#10429)
|
2706 |
+
// Setting to empty string throws an error as an invalid value
|
2707 |
+
jQuery.attrHooks.contenteditable = {
|
2708 |
+
get: nodeHook.get,
|
2709 |
+
set: function( elem, value, name ) {
|
2710 |
+
if ( value === "" ) {
|
2711 |
+
value = "false";
|
2712 |
+
}
|
2713 |
+
nodeHook.set( elem, value, name );
|
2714 |
+
}
|
2715 |
+
};
|
2716 |
+
}
|
2717 |
+
|
2718 |
+
|
2719 |
+
// Some attributes require a special call on IE
|
2720 |
+
if ( !jQuery.support.hrefNormalized ) {
|
2721 |
+
jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
|
2722 |
+
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
|
2723 |
+
get: function( elem ) {
|
2724 |
+
var ret = elem.getAttribute( name, 2 );
|
2725 |
+
return ret === null ? undefined : ret;
|
2726 |
+
}
|
2727 |
+
});
|
2728 |
+
});
|
2729 |
+
}
|
2730 |
+
|
2731 |
+
if ( !jQuery.support.style ) {
|
2732 |
+
jQuery.attrHooks.style = {
|
2733 |
+
get: function( elem ) {
|
2734 |
+
// Return undefined in the case of empty string
|
2735 |
+
// Normalize to lowercase since IE uppercases css property names
|
2736 |
+
return elem.style.cssText.toLowerCase() || undefined;
|
2737 |
+
},
|
2738 |
+
set: function( elem, value ) {
|
2739 |
+
return ( elem.style.cssText = "" + value );
|
2740 |
+
}
|
2741 |
+
};
|
2742 |
+
}
|
2743 |
+
|
2744 |
+
// Safari mis-reports the default selected property of an option
|
2745 |
+
// Accessing the parent's selectedIndex property fixes it
|
2746 |
+
if ( !jQuery.support.optSelected ) {
|
2747 |
+
jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
|
2748 |
+
get: function( elem ) {
|
2749 |
+
var parent = elem.parentNode;
|
2750 |
+
|
2751 |
+
if ( parent ) {
|
2752 |
+
parent.selectedIndex;
|
2753 |
+
|
2754 |
+
// Make sure that it also works with optgroups, see #5701
|
2755 |
+
if ( parent.parentNode ) {
|
2756 |
+
parent.parentNode.selectedIndex;
|
2757 |
+
}
|
2758 |
+
}
|
2759 |
+
return null;
|
2760 |
+
}
|
2761 |
+
});
|
2762 |
+
}
|
2763 |
+
|
2764 |
+
// IE6/7 call enctype encoding
|
2765 |
+
if ( !jQuery.support.enctype ) {
|
2766 |
+
jQuery.propFix.enctype = "encoding";
|
2767 |
+
}
|
2768 |
+
|
2769 |
+
// Radios and checkboxes getter/setter
|
2770 |
+
if ( !jQuery.support.checkOn ) {
|
2771 |
+
jQuery.each([ "radio", "checkbox" ], function() {
|
2772 |
+
jQuery.valHooks[ this ] = {
|
2773 |
+
get: function( elem ) {
|
2774 |
+
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
|
2775 |
+
return elem.getAttribute("value") === null ? "on" : elem.value;
|
2776 |
+
}
|
2777 |
+
};
|
2778 |
+
});
|
2779 |
+
}
|
2780 |
+
jQuery.each([ "radio", "checkbox" ], function() {
|
2781 |
+
jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
|
2782 |
+
set: function( elem, value ) {
|
2783 |
+
if ( jQuery.isArray( value ) ) {
|
2784 |
+
return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
|
2785 |
+
}
|
2786 |
+
}
|
2787 |
+
});
|
2788 |
+
});
|
2789 |
+
|
2790 |
+
|
2791 |
+
|
2792 |
+
|
2793 |
+
var rformElems = /^(?:textarea|input|select)$/i,
|
2794 |
+
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
|
2795 |
+
rhoverHack = /\bhover(\.\S+)?\b/,
|
2796 |
+
rkeyEvent = /^key/,
|
2797 |
+
rmouseEvent = /^(?:mouse|contextmenu)|click/,
|
2798 |
+
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
2799 |
+
rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
|
2800 |
+
quickParse = function( selector ) {
|
2801 |
+
var quick = rquickIs.exec( selector );
|
2802 |
+
if ( quick ) {
|
2803 |
+
// 0 1 2 3
|
2804 |
+
// [ _, tag, id, class ]
|
2805 |
+
quick[1] = ( quick[1] || "" ).toLowerCase();
|
2806 |
+
quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
|
2807 |
+
}
|
2808 |
+
return quick;
|
2809 |
+
},
|
2810 |
+
quickIs = function( elem, m ) {
|
2811 |
+
var attrs = elem.attributes || {};
|
2812 |
+
return (
|
2813 |
+
(!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
|
2814 |
+
(!m[2] || (attrs.id || {}).value === m[2]) &&
|
2815 |
+
(!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
|
2816 |
+
);
|
2817 |
+
},
|
2818 |
+
hoverHack = function( events ) {
|
2819 |
+
return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
|
2820 |
+
};
|
2821 |
+
|
2822 |
+
/*
|
2823 |
+
* Helper functions for managing events -- not part of the public interface.
|
2824 |
+
* Props to Dean Edwards' addEvent library for many of the ideas.
|
2825 |
+
*/
|
2826 |
+
jQuery.event = {
|
2827 |
+
|
2828 |
+
add: function( elem, types, handler, data, selector ) {
|
2829 |
+
|
2830 |
+
var elemData, eventHandle, events,
|
2831 |
+
t, tns, type, namespaces, handleObj,
|
2832 |
+
handleObjIn, quick, handlers, special;
|
2833 |
+
|
2834 |
+
// Don't attach events to noData or text/comment nodes (allow plain objects tho)
|
2835 |
+
if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
|
2836 |
+
return;
|
2837 |
+
}
|
2838 |
+
|
2839 |
+
// Caller can pass in an object of custom data in lieu of the handler
|
2840 |
+
if ( handler.handler ) {
|
2841 |
+
handleObjIn = handler;
|
2842 |
+
handler = handleObjIn.handler;
|
2843 |
+
}
|
2844 |
+
|
2845 |
+
// Make sure that the handler has a unique ID, used to find/remove it later
|
2846 |
+
if ( !handler.guid ) {
|
2847 |
+
handler.guid = jQuery.guid++;
|
2848 |
+
}
|
2849 |
+
|
2850 |
+
// Init the element's event structure and main handler, if this is the first
|
2851 |
+
events = elemData.events;
|
2852 |
+
if ( !events ) {
|
2853 |
+
elemData.events = events = {};
|
2854 |
+
}
|
2855 |
+
eventHandle = elemData.handle;
|
2856 |
+
if ( !eventHandle ) {
|
2857 |
+
elemData.handle = eventHandle = function( e ) {
|
2858 |
+
// Discard the second event of a jQuery.event.trigger() and
|
2859 |
+
// when an event is called after a page has unloaded
|
2860 |
+
return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
|
2861 |
+
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
|
2862 |
+
undefined;
|
2863 |
+
};
|
2864 |
+
// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
|
2865 |
+
eventHandle.elem = elem;
|
2866 |
+
}
|
2867 |
+
|
2868 |
+
// Handle multiple events separated by a space
|
2869 |
+
// jQuery(...).bind("mouseover mouseout", fn);
|
2870 |
+
types = jQuery.trim( hoverHack(types) ).split( " " );
|
2871 |
+
for ( t = 0; t < types.length; t++ ) {
|
2872 |
+
|
2873 |
+
tns = rtypenamespace.exec( types[t] ) || [];
|
2874 |
+
type = tns[1];
|
2875 |
+
namespaces = ( tns[2] || "" ).split( "." ).sort();
|
2876 |
+
|
2877 |
+
// If event changes its type, use the special event handlers for the changed type
|
2878 |
+
special = jQuery.event.special[ type ] || {};
|
2879 |
+
|
2880 |
+
// If selector defined, determine special event api type, otherwise given type
|
2881 |
+
type = ( selector ? special.delegateType : special.bindType ) || type;
|
2882 |
+
|
2883 |
+
// Update special based on newly reset type
|
2884 |
+
special = jQuery.event.special[ type ] || {};
|
2885 |
+
|
2886 |
+
// handleObj is passed to all event handlers
|
2887 |
+
handleObj = jQuery.extend({
|
2888 |
+
type: type,
|
2889 |
+
origType: tns[1],
|
2890 |
+
data: data,
|
2891 |
+
handler: handler,
|
2892 |
+
guid: handler.guid,
|
2893 |
+
selector: selector,
|
2894 |
+
quick: quickParse( selector ),
|
2895 |
+
namespace: namespaces.join(".")
|
2896 |
+
}, handleObjIn );
|
2897 |
+
|
2898 |
+
// Init the event handler queue if we're the first
|
2899 |
+
handlers = events[ type ];
|
2900 |
+
if ( !handlers ) {
|
2901 |
+
handlers = events[ type ] = [];
|
2902 |
+
handlers.delegateCount = 0;
|
2903 |
+
|
2904 |
+
// Only use addEventListener/attachEvent if the special events handler returns false
|
2905 |
+
if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
|
2906 |
+
// Bind the global event handler to the element
|
2907 |
+
if ( elem.addEventListener ) {
|
2908 |
+
elem.addEventListener( type, eventHandle, false );
|
2909 |
+
|
2910 |
+
} else if ( elem.attachEvent ) {
|
2911 |
+
elem.attachEvent( "on" + type, eventHandle );
|
2912 |
+
}
|
2913 |
+
}
|
2914 |
+
}
|
2915 |
+
|
2916 |
+
if ( special.add ) {
|
2917 |
+
special.add.call( elem, handleObj );
|
2918 |
+
|
2919 |
+
if ( !handleObj.handler.guid ) {
|
2920 |
+
handleObj.handler.guid = handler.guid;
|
2921 |
+
}
|
2922 |
+
}
|
2923 |
+
|
2924 |
+
// Add to the element's handler list, delegates in front
|
2925 |
+
if ( selector ) {
|
2926 |
+
handlers.splice( handlers.delegateCount++, 0, handleObj );
|
2927 |
+
} else {
|
2928 |
+
handlers.push( handleObj );
|
2929 |
+
}
|
2930 |
+
|
2931 |
+
// Keep track of which events have ever been used, for event optimization
|
2932 |
+
jQuery.event.global[ type ] = true;
|
2933 |
+
}
|
2934 |
+
|
2935 |
+
// Nullify elem to prevent memory leaks in IE
|
2936 |
+
elem = null;
|
2937 |
+
},
|
2938 |
+
|
2939 |
+
global: {},
|
2940 |
+
|
2941 |
+
// Detach an event or set of events from an element
|
2942 |
+
remove: function( elem, types, handler, selector, mappedTypes ) {
|
2943 |
+
|
2944 |
+
var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
|
2945 |
+
t, tns, type, origType, namespaces, origCount,
|
2946 |
+
j, events, special, handle, eventType, handleObj;
|
2947 |
+
|
2948 |
+
if ( !elemData || !(events = elemData.events) ) {
|
2949 |
+
return;
|
2950 |
+
}
|
2951 |
+
|
2952 |
+
// Once for each type.namespace in types; type may be omitted
|
2953 |
+
types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
|
2954 |
+
for ( t = 0; t < types.length; t++ ) {
|
2955 |
+
tns = rtypenamespace.exec( types[t] ) || [];
|
2956 |
+
type = origType = tns[1];
|
2957 |
+
namespaces = tns[2];
|
2958 |
+
|
2959 |
+
// Unbind all events (on this namespace, if provided) for the element
|
2960 |
+
if ( !type ) {
|
2961 |
+
for ( type in events ) {
|
2962 |
+
jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
|
2963 |
+
}
|
2964 |
+
continue;
|
2965 |
+
}
|
2966 |
+
|
2967 |
+
special = jQuery.event.special[ type ] || {};
|
2968 |
+
type = ( selector? special.delegateType : special.bindType ) || type;
|
2969 |
+
eventType = events[ type ] || [];
|
2970 |
+
origCount = eventType.length;
|
2971 |
+
namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
|
2972 |
+
|
2973 |
+
// Remove matching events
|
2974 |
+
for ( j = 0; j < eventType.length; j++ ) {
|
2975 |
+
handleObj = eventType[ j ];
|
2976 |
+
|
2977 |
+
if ( ( mappedTypes || origType === handleObj.origType ) &&
|
2978 |
+
( !handler || handler.guid === handleObj.guid ) &&
|
2979 |
+
( !namespaces || namespaces.test( handleObj.namespace ) ) &&
|
2980 |
+
( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
|
2981 |
+
eventType.splice( j--, 1 );
|
2982 |
+
|
2983 |
+
if ( handleObj.selector ) {
|
2984 |
+
eventType.delegateCount--;
|
2985 |
+
}
|
2986 |
+
if ( special.remove ) {
|
2987 |
+
special.remove.call( elem, handleObj );
|
2988 |
+
}
|
2989 |
+
}
|
2990 |
+
}
|
2991 |
+
|
2992 |
+
// Remove generic event handler if we removed something and no more handlers exist
|
2993 |
+
// (avoids potential for endless recursion during removal of special event handlers)
|
2994 |
+
if ( eventType.length === 0 && origCount !== eventType.length ) {
|
2995 |
+
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
|
2996 |
+
jQuery.removeEvent( elem, type, elemData.handle );
|
2997 |
+
}
|
2998 |
+
|
2999 |
+
delete events[ type ];
|
3000 |
+
}
|
3001 |
+
}
|
3002 |
+
|
3003 |
+
// Remove the expando if it's no longer used
|
3004 |
+
if ( jQuery.isEmptyObject( events ) ) {
|
3005 |
+
handle = elemData.handle;
|
3006 |
+
if ( handle ) {
|
3007 |
+
handle.elem = null;
|
3008 |
+
}
|
3009 |
+
|
3010 |
+
// removeData also checks for emptiness and clears the expando if empty
|
3011 |
+
// so use it instead of delete
|
3012 |
+
jQuery.removeData( elem, [ "events", "handle" ], true );
|
3013 |
+
}
|
3014 |
+
},
|
3015 |
+
|
3016 |
+
// Events that are safe to short-circuit if no handlers are attached.
|
3017 |
+
// Native DOM events should not be added, they may have inline handlers.
|
3018 |
+
customEvent: {
|
3019 |
+
"getData": true,
|
3020 |
+
"setData": true,
|
3021 |
+
"changeData": true
|
3022 |
+
},
|
3023 |
+
|
3024 |
+
trigger: function( event, data, elem, onlyHandlers ) {
|
3025 |
+
// Don't do events on text and comment nodes
|
3026 |
+
if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
|
3027 |
+
return;
|
3028 |
+
}
|
3029 |
+
|
3030 |
+
// Event object or event type
|
3031 |
+
var type = event.type || event,
|
3032 |
+
namespaces = [],
|
3033 |
+
cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
|
3034 |
+
|
3035 |
+
// focus/blur morphs to focusin/out; ensure we're not firing them right now
|
3036 |
+
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
|
3037 |
+
return;
|
3038 |
+
}
|
3039 |
+
|
3040 |
+
if ( type.indexOf( "!" ) >= 0 ) {
|
3041 |
+
// Exclusive events trigger only for the exact event (no namespaces)
|
3042 |
+
type = type.slice(0, -1);
|
3043 |
+
exclusive = true;
|
3044 |
+
}
|
3045 |
+
|
3046 |
+
if ( type.indexOf( "." ) >= 0 ) {
|
3047 |
+
// Namespaced trigger; create a regexp to match event type in handle()
|
3048 |
+
namespaces = type.split(".");
|
3049 |
+
type = namespaces.shift();
|
3050 |
+
namespaces.sort();
|
3051 |
+
}
|
3052 |
+
|
3053 |
+
if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
|
3054 |
+
// No jQuery handlers for this event type, and it can't have inline handlers
|
3055 |
+
return;
|
3056 |
+
}
|
3057 |
+
|
3058 |
+
// Caller can pass in an Event, Object, or just an event type string
|
3059 |
+
event = typeof event === "object" ?
|
3060 |
+
// jQuery.Event object
|
3061 |
+
event[ jQuery.expando ] ? event :
|
3062 |
+
// Object literal
|
3063 |
+
new jQuery.Event( type, event ) :
|
3064 |
+
// Just the event type (string)
|
3065 |
+
new jQuery.Event( type );
|
3066 |
+
|
3067 |
+
event.type = type;
|
3068 |
+
event.isTrigger = true;
|
3069 |
+
event.exclusive = exclusive;
|
3070 |
+
event.namespace = namespaces.join( "." );
|
3071 |
+
event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
|
3072 |
+
ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
|
3073 |
+
|
3074 |
+
// Handle a global trigger
|
3075 |
+
if ( !elem ) {
|
3076 |
+
|
3077 |
+
// TODO: Stop taunting the data cache; remove global events and always attach to document
|
3078 |
+
cache = jQuery.cache;
|
3079 |
+
for ( i in cache ) {
|
3080 |
+
if ( cache[ i ].events && cache[ i ].events[ type ] ) {
|
3081 |
+
jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
|
3082 |
+
}
|
3083 |
+
}
|
3084 |
+
return;
|
3085 |
+
}
|
3086 |
+
|
3087 |
+
// Clean up the event in case it is being reused
|
3088 |
+
event.result = undefined;
|
3089 |
+
if ( !event.target ) {
|
3090 |
+
event.target = elem;
|
3091 |
+
}
|
3092 |
+
|
3093 |
+
// Clone any incoming data and prepend the event, creating the handler arg list
|
3094 |
+
data = data != null ? jQuery.makeArray( data ) : [];
|
3095 |
+
data.unshift( event );
|
3096 |
+
|
3097 |
+
// Allow special events to draw outside the lines
|
3098 |
+
special = jQuery.event.special[ type ] || {};
|
3099 |
+
if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
|
3100 |
+
return;
|
3101 |
+
}
|
3102 |
+
|
3103 |
+
// Determine event propagation path in advance, per W3C events spec (#9951)
|
3104 |
+
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
|
3105 |
+
eventPath = [[ elem, special.bindType || type ]];
|
3106 |
+
if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
|
3107 |
+
|
3108 |
+
bubbleType = special.delegateType || type;
|
3109 |
+
cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
|
3110 |
+
old = null;
|
3111 |
+
for ( ; cur; cur = cur.parentNode ) {
|
3112 |
+
eventPath.push([ cur, bubbleType ]);
|
3113 |
+
old = cur;
|
3114 |
+
}
|
3115 |
+
|
3116 |
+
// Only add window if we got to document (e.g., not plain obj or detached DOM)
|
3117 |
+
if ( old && old === elem.ownerDocument ) {
|
3118 |
+
eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
|
3119 |
+
}
|
3120 |
+
}
|
3121 |
+
|
3122 |
+
// Fire handlers on the event path
|
3123 |
+
for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
|
3124 |
+
|
3125 |
+
cur = eventPath[i][0];
|
3126 |
+
event.type = eventPath[i][1];
|
3127 |
+
|
3128 |
+
handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
|
3129 |
+
if ( handle ) {
|
3130 |
+
handle.apply( cur, data );
|
3131 |
+
}
|
3132 |
+
// Note that this is a bare JS function and not a jQuery handler
|
3133 |
+
handle = ontype && cur[ ontype ];
|
3134 |
+
if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
|
3135 |
+
event.preventDefault();
|
3136 |
+
}
|
3137 |
+
}
|
3138 |
+
event.type = type;
|
3139 |
+
|
3140 |
+
// If nobody prevented the default action, do it now
|
3141 |
+
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
|