1/* 2 * åºç¡å·¥å ·ï¼è¯¦æ åè§ï¼jquery.utils.commons-1.0.0.js 3 */ 4;(function(b) { 5 b.isHTMLElement = function(e) { 6 return ((typeof HTMLElement === "object") ? function() { 7 return e instanceof HTMLElement 8 } 9 : function() { 10 return e && typeof e === "object" && e.nodeType === 1 && typeof e.nodeName === "string" 11 } 12 ).call(this) 13 } 14 ; 15 b.fn.isHTMLElement = function() { 16 return b.isHTMLElement(this[0]) 17 } 18 ; 19 var a = b.fn.is 20 , d = b.fn.filter; 21 function c(e) { 22 e = b(e); 23 if (e.isHTMLElement()) { 24 return !!(e.width() || e.height()) && e.css("display") !== "none" 25 } 26 return true 27 } 28 b.fn.is = function(e) { 29 if (e === ":visible") { 30 return c(this) 31 } 32 if (e === ":hidden") { 33 return !c(this) 34 } 35 return a.call(this, e) 36 } 37 ; 38 b.fn.filter = function(e) { 39 if (e === ":visible") { 40 return b([].filter.call(this, function(f) { 41 return c(f) 42 })) 43 } 44 if (e === ":hidden") { 45 return b([].filter.call(this, function(f) { 46 return !c(f) 47 })) 48 } 49 return d.call(this, e) 50 } 51 ; 52 b.extend({ 53 encode: function(e) { 54 return encodeURIComponent(encodeURIComponent(e)) 55 }, 56 defined: function(e) { 57 return (typeof e != "undefined" && e != "undefined" && e != null && e != "null") 58 }, 59 founded: function(e) { 60 if (b.defined(e)) { 61 if (typeof e == "boolean") { 62 return e 63 } else { 64 if (typeof e == "string") { 65 return b.trim(e).length > 0 66 } else { 67 if (jQuery.isArray(e)) { 68 return jQuery.merge([], e).length > 0 69 } else { 70 if (b.isPlainObject(e)) { 71 return !b.isEmptyObject(e) 72 } else { 73 return true 74 } 75 } 76 } 77 } 78 } else { 79 return false 80 } 81 }, 82 buildForm: function(i, g, e, h) { 83 var f = b("#" + (i || "drdcForm")); 84 if (b(f).size() > 0 && b(f).is("form")) { 85 f = b(f).empty() 86 } else { 87 f = jQuery("<form/>"); 88 b(f).css("display", "none").appendTo("body") 89 } 90 b(f).attr({ 91 id: (i || "drdcForm"), 92 action: g, 93 method: "post", 94 enctype: "application/x-www-form-urlencoded; charset=UTF-8", 95 target: h || "_blank" 96 }); 97 b(f).append(b.buildHiddens({ 98 gnmkdmKey: jQuery("#gnmkdmKey").val(), 99 sessionUserKey: jQuery("#sessionUserKey").val() 100 }, true)); 101 b(f).append(b.buildHiddens(e || {}, true)); 102 return b(f) 103 }, 104 buildHiddens: function(f, e) { 105 var g = []; 106 b.each(f || {}, function(h, i) { 107 if (b.isPlainObject(i) && true == e) { 108 g.push(b.buildHiddens(i)) 109 } else { 110 if (b.isArray(i)) { 111 b.each(i, function(j, k) { 112 g.push('<input type="hidden" name="' + h + "[" + j + ']" value="' + k + '">') 113 }) 114 } else { 115 if (b.isFunction(i)) {} else { 116 g.push('<input type="hidden" name="' + h + '" value="' + i + '">') 117 } 118 } 119 } 120 }); 121 return g.join("") 122 }, 123 cloneObj: function(e) { 124 return b.extend(true, {}, e || {}) 125 }, 126 mergeObj: function() { 127 var e = {}; 128 b.each(arguments, function(f, g) { 129 b.extend(true, e, g || {}) 130 }); 131 return e 132 }, 133 getTextLength: function(g) { 134 var f = g.length; 135 for (var e = 0; e < g.length; e += 1) { 136 if (g.charCodeAt(e) > 127) { 137 f += 1 138 } 139 } 140 return f 141 }, 142 toBoolean: function(e) { 143 if (b.defined(e)) { 144 if (b.type(e) == "boolean") { 145 return e 146 } else { 147 if (b.type(e) == "string") { 148 e = b.trim(e).toLowerCase(); 149 if ("yes" == e || "true" == e || "1" == e) { 150 return true 151 } else { 152 if ("no" == e || "false" == e || "0" == e) { 153 return false 154 } else { 155 return Boolean(e) 156 } 157 } 158 } else { 159 return Boolean(e) 160 } 161 } 162 } else { 163 return false 164 } 165 }, 166 toTime: function(i) { 167 if (/^([0-1][0-9]|2[0-3])[:]([0-5]{1}[0-9]{1})[:]([0-5]{1}[0-9]{1})?$/mg.test(i)) { 168 var e = RegExp.$1 169 , f = RegExp.$2 ? RegExp.$2 : 0 170 , g = RegExp.$3 ? RegExp.$3 : 0; 171 var h = new Date(); 172 h.setHours(e, f, g, 0); 173 return h 174 } else { 175 return null 176 } 177 }, 178 convertID: function(e) { 179 return e.replace(/(:|\(|\)|\{|\}|\-|\.|\#|\@|\$|\%|\^|\&|\*|\!)/g, "\\$1") 180 }, 181 getUID: function(e) { 182 e = e || "UID_"; 183 do { 184 e += ((Math.random() * 1000000) + new Date().getTime()) 185 } while (document.getElementById(e)); 186 return (e + "").replace(".", "") 187 }, 188 matchURL: function(e) { 189 var f = b.trim(e || "").toLowerCase(); 190 return typeof e == "string" && f.length >
190 0 && /(?:\S+\.(?:js|css|properties)(?:\?ver=\S+)?)/.test(f) 191 }, 192 matchJS: function(e) { 193 var f = b.trim(e || "").toLowerCase(); 194 return typeof e == "string" && f.length > 0 && /(?:\S+\.js(?:\?ver=\S+)?)/.test(f) 195 }, 196 matchCss: function(e) { 197 var f = b.trim(e || "").toLowerCase(); 198 return typeof e == "string" && f.length > 0 && /(?:\S+\.css(?:\?ver=\S+)?)/.test(f) 199 } 200 }); 201 b.extend(Array.prototype, { 202 indexOf: function(f, g) { 203 var g = g || 0; 204 for (var e = 0; e < this.length; ++e) { 205 if (this[e] === f) { 206 return e 207 } 208 } 209 return -1 210 }, 211 remove: function(f, e) { 212 var g = [].concat(this); 213 if (b.isNumeric(f)) { 214 g.splice(f, 1) 215 } else { 216 b.each(this, function(h, j) { 217 if (j[e] == f) { 218 g.splice(h, 1); 219 return false 220 } 221 }) 222 } 223 return g 224 } 225 }); 226 b.fn.getUID = function(e) { 227 var f = b(this).attr("id"); 228 if (!b.founded(f)) { 229 f = e || "UID_"; 230 do { 231 f += ~~((Math.random() * 1000000) + new Date().getTime()) 232 } while (document.getElementById(f)) 233 } 234 return f 235 } 236 ; 237 b.fn.killFocus = function() { 238 return b(this).each(function() { 239 this.onmousedown = function() { 240 this.blur(); 241 this.hideFocus = true; 242 this.style.outline = "none" 243 } 244 ; 245 this.onmouseout = this.onmouseup = function() { 246 this.blur(); 247 this.hideFocus = false; 248 this.style.outline = null 249 } 250 }) 251 } 252 ; 253 b.fn.extend({ 254 defined: function() { 255 return b(this).size() != 0 256 }, 257 founded: function() { 258 var e = b(this).is("select") ? b(this).getSelected().val() : b(this).val(); 259 return b(this).defined() && b.founded(e) 260 }, 261 disabled: function() { 262 return b(this).filter(":input").each(function() { 263 b(this).prop("disabled", true).addClass("disabled").data("disabled", true) 264 }) 265 }, 266 isDisabled: function() { 267 return !b(this).isEnabled() 268 }, 269 enabled: function() { 270 return b(this).filter(":input").each(function() { 271 b(this).prop("disabled", false).removeClass("disabled").removeData("disabled") 272 }) 273 }, 274 isEnabled: function() { 275 return (b(this).prop("disabled") == false && !b(this).hasClass("disabled") && !b(this).data("disabled") === true) 276 }, 277 attrs: function() { 278 var g = b(this)[0].attributes; 279 var f = {}; 280 for (var h = 0; h < g.length; h += 1) { 281 var e = g[h]; 282 if (e.specified) { 283 f[e.name] = e.value 284 } 285 } 286 return f 287 }, 288 disableContextMenu: function() { 289 b(this).each(function(e, f) { 290 b(f).bind("contextmenu", function() { 291 return false 292 }) 293 }) 294 }, 295 getWidget: function() { 296 if (!b.metadata) { 297 return {} 298 } else { 299 return b(this).metadata({ 300 single: "widget" 301 }) 302 } 303 }, 304 getValueLength: function() { 305 return b.getTextLength(b(this).val()) 306 }, 307 getTextLength: function(e) { 308 b.getTextLength(b(this).text()) 309 }, 310 getVisualWidth: function(e) { 311 b("#visualLength_ruler").remove(); 312 b(document.body).append('<span id="visualLength_ruler">test</span>'); 313 var g = b("#visualLength_ruler"); 314 b(g).css({ 315 visibility: "hidden", 316 "white-space": "nowrap", 317 "font-size": e || "14px" 318 }); 319 if (b(this).is(":radio") || b(this).is(":checkbox")) { 320 var f = b(this)[0].nextSibling.nodeValue; 321 g.text(this); 322 return b(this).outerWidth() + g[0].offsetWidth 323 } else { 324 return b(this).outerWidth() 325 } 326 }, 327 encode: function() { 328 return encodeURIComponent(encodeURIComponent(b(this).val())) 329 }, 330 removeOption: function(e) { 331 if (b(this).is("select")) { 332 if (typeof e == "string") { 333 b(this).find("option").each(function(f, g) { 334 if (b(g).val() == e) { 335 b(g).remove() 336 } 337 }) 338 } else { 339 if (typeof e == "number") { 340 b(this).find("option").eq(e).remove() 341 } 342 } 343 } 344 }, 345 buildOptions: function(g, h, e) { 346 if (b(this).is("select")) { 347 var f = []; 348 if (h && h == true) { 349 f.push('<option value="">--\u8bf7\u9009\u62e9--</option>') 350 } 351 b.each(g || [], function(k, j) { 352 var l = ""; 353 if (b.founded(e) && e == j.value) { 354 l = ' selected="selected" ' 355 } 356 f.push("<option "); 357 b(j).each(function(m, i) { 358 if (m != "value") { 359 f.push(m + '="' + i + '"') 360 } 361 }); 362 f.push(' value="' + j.value + '" ' + l + ">" + j.text + "</option>") 363 }); 364 b(this).append(f.join("")) 365 } 366 }, 367 setSelected: function(e) { 368 return this.each(function() { 369 if (b(this).is("select")) { 370 if (typeof e == "string") { 371 b(this).find("option").each(function(f, g) { 372 if (b(g).val() == e) { 373 b(g).prop("selected", true) 374 } 375 }) 376 } else { 377 if (typeof e == "number") { 378 b(this)[0].selectedIndex = e 379 } 380 } 381 } 382 }) 383 }, 384 getSelected: function() { 385 if (b(this).is("select")) { 386 return b(this).find("option:selected") 387 } 388 }, 389 getSelectedList: function() { 390 var g = this; 391 var f = b(this).getSelected(); 392 if (b(f).size() > 1) { 393 var e = new Array(); 394 b(f).each(function(h, j) { 395 e.push(b.extend({}, b(g).attrs(), b(j).attrs(), { 396 key: b(j).val(), 397 value: b(j).val(), 398 text: b(j).text() 399 })) 400 }); 401 return e 402 } else { 403 return b.extend({}, b(this).attrs(), b(f[0]).attrs(), { 404 key: b(f[0]).val(), 405 value: b(f[0]).val(), 406 text: b(f[0]).text() 407 }) 408 } 409 }, 410 setChecked: function(e) { 411 return this.each(function() { 412 if (b(this).is("input") && b(this).is(function() { 413 var f = b.trim(b(this).attr("type")); 414 return (f === "radio" || f === "checkbox") 415 })) { 416 if (typeof e == "string") { 417 b(this).each(function(g, f) { 418 if (b(f).val() == e) { 419 b(f)[0].checked = true 420 } 421 }) 422 } else { 423 if (typeof e == "number") {
424 b(this).get(e).checked = true 425 } 426 } 427 } 428 }) 429 }, 430 getChecked: function() { 431 if (b(this).is(":radio") || b(this).is(":checkbox")) { 432 var f = b(this).filter(":checked"); 433 if (b(f).size() > 1) { 434 var e = new Array(); 435 b(f).each(function(g, h) { 436 e.push(b(h)) 437 }); 438 return e 439 } else { 440 return b(f[0]) 441 } 442 } 443 }, 444 getCheckedList: function() { 445 var g = this; 446 if (b(this).is(":radio") || b(this).is(":checkbox")) { 447 var f = b(g).filter(":checked"); 448 if (b(f).size() > 1) { 449 var e = new Array(); 450 b(f).each(function(h, j) { 451 e.push(b.extend({}, b(g).attrs(), b(j).attrs(), { 452 key: b(j).val(), 453 value: b(j).val(), 454 text: b(j)[0].nextSibling.nodeValue 455 })) 456 }); 457 return e 458 } else { 459 return b.extend({}, b(g).attrs(), b(f[0]).attrs(), { 460 key: b(f[0]).val(), 461 value: b(f[0]).val(), 462 text: b(f[0])[0].nextSibling.nodeValue 463 }) 464 } 465 } 466 }, 467 getPosition: function() { 468 var f = this 469 , g = this[0]; 470 var e = g.tagName == "BODY"; 471 return b.extend({}, (typeof g.getBoundingClientRect == "function") ? g.getBoundingClientRect() : null, { 472 scroll: e ? document.documentElement.scrollTop || document.body.scrollTop : f.scrollTop(), 473 width: e ? b(window).width() : f.outerWidth(), 474 height: e ? b(window).height() : f.outerHeight() 475 }, e ? { 476 top: 0, 477 left: 0 478 } : f.offset()) 479 }, 480 getElementID: function() { 481 return b.convertID(b.trim(b(this).attr("id"))) 482 } 483 }); 484 b.fn.getRealElement = function() { 485 var f = this; 486 if (b.defined(b(this).data("chosen"))) { 487 var e = "#" + b(this).getElementID() + "_chosen"; 488 if (b(e).size() > 0) { 489 f = b(e) 490 } 491 } else { 492 if (b(this).parent().hasClass("input-group-tooltips")) { 493 f = b(this).parent() 494 } else { 495 if (b(this).is(":radio") || b(this).is(":checkbox")) { 496 f = b("input[name='" + b(this).attr("name") + "']").last() 497 } 498 } 499 } 500 return b(f) 501 } 502 ; 503 b.fn.loadIframe = function(e, g) { 504 var h = { 505 progress: b.noop, 506 complete: b.noop 507 }; 508 var f = b(this[0]); 509 if (!b(f).is("iframe")) { 510 throw new Error(" Current Element is not an iframe ! ") 511 } else { 512 return b.when(b.Deferred(function(i) { 513 var n = b.trim(e).toLowerCase(); 514 if (typeof e == "string" && n.length > 0) { 515 try { 516 var q = b.extend(true, {}, h, b(f).data(), ((typeof g == "object" && g) ? g : {})); 517 var l = function() { 518 f.onload = f.onreadystatechange = f.onerror = null 519 }; 520 var m = function() { 521 if ((!this.readyState) || (/loaded|complete/.test(this.readyState))) { 522 if (b.isFunction(q.complete)) { 523 q.complete.call(this) 524 } 525 l(); 526 i.resolve() 527 } 528 }; 529 var o = function() { 530 l(); 531 if (q.ignore && q.ignore != true) { 532 i.reject() 533 } 534 }; 535 var k = window.setInterval(function() { 536 if (f) { 537 if ((!f.readyState) || (/loaded|complete/.test(f.readyState))) { 538 window.clearInterval(k) 539 } else { 540 if (b.isFunction(q.progress)) { 541 q.progress.call(f) 542 } 543 } 544 } else { 545 window.clearInterval(k) 546 } 547 }, 100); 548 if (f.attachEvent) { 549 f.attachEvent("onload", function() { 550 alert("Local iframe is now loaded."); 551 if (j) { 552 return 553 } 554 m.call(this); 555 j = true 556 }); 557 f.attachEvent("onerror", function() { 558 o.call(this) 559 }) 560 } else { 561 var j = false; 562 f.onload = f.onreadystatechange = function() { 563 alert("Local iframe is now loaded."); 564 if (j) { 565 return 566 } 567 m.call(this); 568 j = true 569 } 570 ; 571 f.onerror = function() { 572 o.call(this) 573 } 574 } 575 f.src = e 576 } catch (p) { 577 throw new Error(p) 578 } 579 } else { 580 i.resolve() 581 } 582 })) 583 } 584 } 585 ; 586 b.fn.serializeJSON = function(f) { 587 var e = {}; 588 b(this).find("input[type!='button'][type!='file'][name!='multi-item'],select,textarea").each(function(k, j) { 589 var l = b(this).attr("name"), h; 590 if (!e[l]) { 591 if (b(this).is("select")) { 592 h = b(this).find("option:selected").val() 593 } else { 594 if (b(this).is(":radio")) { 595 var g = b("input[name='" + l + "']").filter(":checked"); 596 h = b(g[0]).val() 597 } else { 598 if (b(this).is(":checkbox")) { 599 var g = b("input[name='" + l + "']").filter(":checked"); 600 if (b(g).size() > 1) { 601 h = new Array(); 602 b(g).each(function(n, o) { 603 h.push(b(o).val()) 604 }) 605 } else { 606 h = b(g[0]).val() 607 } 608 } else { 609 h = b(this).val() 610 } 611 } 612 } 613 if (h) { 614 if (b.isArray(h)) { 615 var m = []; 616 b.each(h || [], function(n, o) { 617 m.push((f != false ? encodeURIComponent(o) : o)) 618 }); 619 e[l].push(m.join(",")) 620 } else { 621 e[l] = f != false ? encodeURIComponent(h) : h 622 } 623 } else { 624 e[l] = "" 625 } 626 } 627 }); 628 return e 629 } 630} 631)(jQuery); 632/* 633 * èµæºå è½½å·¥å ·ï¼è¯¦æ åè§ï¼jquery.utils.resources.js 634 */ 635;(function(b) { 636 var c = { 637 media: "all", 638 charset: "utf-8", 639 ignore: true, 640 cache: true, 641 cacheURL: true, 642 async: false, 643 progress: b.noop, 644 complete: b.noop 645 }; 646 b.extend(Array.prototype, { 647 contains: function(f, h) { 648 var g = false 649 , h = h || 0; 650 for (var e = h; e < this.length; e++) { 651 if (f == this[e]) { 652 g = true; 653 break 654 } 655 } 656 return g 657 } 658 });
659 b.extend({ 660 matchURL: function(e) { 661 var f = b.trim(e || "").toLowerCase(); 662 return typeof e == "string" && f.length > 0 && /(?:\S+\.(?:js|css|properties)(?:\?ver=\S+)?)/.test(f) 663 }, 664 matchJS: function(e) { 665 var f = b.trim(e || "").toLowerCase(); 666 return typeof e == "string" && f.length > 0 && /(?:\S+\.js(?:\?ver=\S+)?)/.test(f) 667 }, 668 matchCss: function(e) { 669 var f = b.trim(e || "").toLowerCase(); 670 return typeof e == "string" && f.length > 0 && /(?:\S+\.css(?:\?ver=\S+)?)/.test(f) 671 } 672 }); 673 function a(e, f) { 674 if (e.attachEvent) { 675 e.attachEvent("onload", f) 676 } else { 677 setTimeout(function() { 678 d(e, f) 679 }, 0) 680 } 681 } 682 function d(g, h) { 683 if (h.isCalled) { 684 return 685 } 686 var e = false; 687 if (/webkit/i.test(navigator.userAgent)) { 688 if (g.sheet) { 689 e = true 690 } 691 } else { 692 if (g.sheet) { 693 try { 694 if (g.sheet.cssRules) { 695 e = true 696 } 697 } catch (f) { 698 if (f.code === 1000) { 699 e = true 700 } 701 } 702 } 703 } 704 if (e) { 705 setTimeout(function() { 706 h() 707 }, 1) 708 } else { 709 setTimeout(function() { 710 d(g, h) 711 }, 1) 712 } 713 } 714 b.fn.include = function(e, f) { 715 var g = b(this[0]); 716 var h = b.data(g, "cacheURL") || []; 717 return b.when(b.Deferred(function(m) { 718 if (b.matchURL(e)) { 719 if (h.contains(e)) { 720 m.resolve() 721 } else { 722 try { 723 var j = b.extend(true, {}, c, b(g).data(), ((typeof f == "object" && f) ? f : {}), { 724 dataType: "text", 725 url: e 726 }); 727 var k = function(o) { 728 do { 729 o += ~~(Math.random() * 1000000) 730 } while (document.getElementById(o)); 731 return o 732 }; 733 b.ajaxSetup({ 734 async: j.async, 735 cache: j.cache 736 }); 737 if (b.matchJS(e)) { 738 var i = document.createElement("script"); 739 i.language = "javascript"; 740 i.type = "text/javascript"; 741 i.id = k("script"); 742 b.ajax(b.extend(true, j, { 743 success: function(p) { 744 try { 745 i.appendChild(document.createTextNode(p)) 746 } catch (o) { 747 i.text = p 748 } 749 m.resolve() 750 }, 751 error: function() { 752 document.removeChild(i); 753 if (j.ignore && j.ignore != true) { 754 m.reject() 755 } 756 } 757 })); 758 g[0].appendChild(i) 759 } else { 760 if (b.matchCss(e)) { 761 var l = document.createElement("style"); 762 l.id = k("css"); 763 l.media = j.media || "all"; 764 b.ajax(b.extend(true, j, { 765 success: function(o) { 766 if (l.styleSheet) { 767 l.styleSheet.cssText = o 768 } else { 769 l.appendChild(document.createTextNode(o)) 770 } 771 m.resolve() 772 }, 773 error: function() { 774 document.removeChild(l); 775 if (j.ignore && j.ignore != true) { 776 m.reject() 777 } 778 } 779 })); 780 g[0].appendChild(l) 781 } 782 } 783 b.ajaxSetup({ 784 async: true, 785 cache: true 786 }); 787 if (j.cacheURL == true) { 788 h.push(e); 789 b.data(g, "cacheURL", h) 790 } 791 } catch (n) { 792 m.reject(); 793 throw new Error(n) 794 } 795 } 796 } else { 797 m.resolve() 798 } 799 }).promise()) 800 } 801 ; 802 b.fn.includes = function(h, e) { 803 var g = b(this); 804 h = b.grep(b.makeArray(h || []), function(j, k) { 805 return b.matchURL(j) 806 }, false); 807 function f(l, k, j) { 808 return b.when(b.Deferred(function(i) { 809 k[j].call(g, i, h[j]) 810 }).promise()).always(function() { 811 if (j < k.length) { 812 f(l, k, j + 1) 813 } else { 814 l.resolve() 815 } 816 }) 817 } 818 return b.when(b.Deferred(function(l) { 819 try { 820 var k = []; 821 for (var j = 0; j < h.length; j++) { 822 k[j] = function(i, n) { 823 console.log("url:" + n); 824 b(g).include(n, e).fail(function() { 825 if (e.ignore && e.ignore != true) { 826 i.reject() 827 } 828 }).always(function() { 829 i.resolve() 830 }) 831 } 832 } 833 f(l, k, 0) 834 } catch (m) { 835 l.reject() 836 } 837 }).promise()) 838 } 839 ; 840 b.fn.loadResource = function(e, f) { 841 var g = b(this[0]); 842 var h = b.data(g, "cacheURL") || []; 843 return b.when(b.Deferred(function(j) { 844 if (b.matchURL(e)) { 845 if (h.contains(e)) { 846 j.resolve() 847 } else { 848 try { 849 var s = b.extend(true, {}, c, b(g).data(), ((typeof f == "object" && f) ? f : {})); 850 var p = function(t) { 851 do { 852 t += ~~(Math.random() * 1000000) 853 } while (document.getElementById(t)); 854 return t 855 }; 856 if (b.matchJS(e)) { 857 if (s.async == false) { 858 b.ajaxSetup({ 859 async: s.async, 860 cache: s.cache 861 }); 862 b.getScript(e).done(function() { 863 if (b.isFunction(s.complete)) { 864 s.complete.call(this) 865 } 866 j.resolve(); 867 if (s.cacheURL == true) { 868 h.push(e); 869 b.data(g, "cacheURL", h) 870 } 871 }).fail(function() { 872 if (s.ignore && s.ignore != true) { 873 j.reject() 874 } 875 }); 876 b.ajaxSetup({ 877 async: true, 878 cache: true 879 }) 880 } else { 881 var r = document.createElement("script"); 882 r.setAttribute("id", p("script")); 883 r.setAttribute("type", "text/javascript"); 884 r.setAttribute("media", s.media || "all"); 885 r.setAttribute("charset", s.charset || "utf-8"); 886 r.setAttribute("src", e); 887 if (s.async == true) { 888 r.setAttribute("async", true); 889 r.setAttribute("defer", true) 890 } else { 891 r.setAttribute("async", false) 892 } 893 g[0].appendChild(r); 894 var l = function() { 895 r.onload = r.onreadystatechange = r.onerror = null; 896 if (g[0] && r.parentNode) { 897 g[0].removeChild(r); 898 r = null 899 } 900 }; 901 var m = function(t) { 902 if ((!this.readyState) || (/loaded|complete/.test(this.readyState))) { 903 if (b.isFunction(s.complete)) { 904 s.complete.call(this) 905 } 906 l(); 907 j.resolve(); 908 if (s.cacheURL == true) { 909 h.push(e); 910 b.data(g, "cacheURL", h) 911 } 912 } 913 }; 914 var n = function() { 915 l(); 916 if (s.ignore && s.ignore != true) { 917 j.reject() 918 } 919 }; 920 var k = window.setInterval(function() { 921 if (r) { 922 if ((!r.readyState) || (/loaded|complete/.test(r.readyState))) { 923 window.clearInterval(k) 924 } else { 925 if (b.isFunction(s.progress)) { 926 s.progress.call(r) 927 } 928 } 929 } else { 930 window.clearInterval(k) 931 } 932 }, 100); 933 var i = false; 934 r.onload = r.onreadystatechange = function() { 935 if (i) { 936 return 937 } 938 m.call(this); 939 i = true 940 } 941 ; 942 r.onerror = function() { 943 n.call(this) 944 } 945 } 946 } else { 947 if (b.matchCss(e)) { 948 var q = window.document.createElement("link"); 949 q.setAttribute("id", p("css")); 950 q.setAttribute("type", "text/css"); 951 q.setAttribute("rel", "stylesheet"); 952 q.setAttribute("media", s.media || "all"); 953 q.setAttribute("charset", s.charset || "utf-8"); 954 q.setAttribute("href", e); 955 g[0].appendChild(q); 956 a(q, function() { 957 j.resolve(); 958 if (s.cacheURL == true) { 959 h.push(e); 960 b.data(g, "cacheURL", h) 961 } 962 }) 963 } 964 } 965 } catch (o) { 966 j.reject(); 967 throw new Error(o) 968 } 969 } 970 } else { 971 j.resolve() 972 } 973 }).promise()) 974 } 975 ; 976 b.fn.loadResources = function(h, e) { 977 var g = b(this); 978 h = b.grep(b.makeArray(h || []), function(j, k) { 979 return typeof j == "string" && b.trim(j).length > 0 && /(?:\S+\.(?:js|css)(?:\?ver=\S+)?)/.test(b.trim(j).toLowerCase()) 980 }, false); 981 function f(k, l, j) { 982 return b.when(b.Deferred(function(i) { 983 if (typeof l[j] != "undefined") { 984 l[j].call(g, i, h[j]) 985 } else { 986 i.resolve() 987 } 988 }).promise()).always(function() { 989 if (j < l.length) { 990 f(k, l, j + 1) 991 } else { 992 k.resolve() 993 } 994 }) 995 } 996 return b.when(b.Deferred(function(k) { 997 try { 998 var m = []; 999 for (var j = 0; j < h.length; j++) { 1000 m[j] = function(i, n) { 1001 console.log("url:" + n); 1002 b(g).loadResource(n, e).fail(function() { 1003 if (e.ignore && e.ignore != true) { 1004 i.reject() 1005 } 1006 }).always(function() { 1007 i.resolve() 1008 }) 1009 } 1010 } 1011 f(k, m, 0) 1012 } catch (l) { 1013 k.reject() 1014 } 1015 }).promise()) 1016 } 1017}(jQuery)); 1018/* 1019 * å ç´ å°ºå¯¸ç¸å ³å·¥å ·ï¼è¯¦æ åè§ï¼jquery.utils.dimension-1.0.0.js 1020 */ 1021;(function(a) { 1022 a.viewWidth = function() { 1023 var b = 0 1024 , c = document; 1025 if (c.documentElement && c.documentElement.clientWidth) { 1026 b = c.documentElement.clientWidth 1027 } else { 1028 if (c.body && c.body.clientWidth) { 1029 b = c.body.clientWidth 1030 } 1031 } 1032 return b 1033 } 1034 ; 1035 a.viewHeight = function() { 1036 var b = 0 1037 , c = document; 1038 if (document.compatMode != "CSS1Compat") { 1039 b = c.body.clientHeight 1040 } else { 1041 if (c.documentElement && c.documentElement.clientHeight) { 1042 b = c.documentElement.clientHeight 1043 } else { 1044 if (c.body && c.body.clientHeight) { 1045 b = c.body.clientHeight 1046 } 1047 } 1048 } 1049 return b 1050 } 1051 ; 1052 a.canvasHeight = function() { 1053 var c = document 1054 , b = 0; 1055 b
1055= Math.max(Math.max(c.body.scrollHeight, c.documentElement.scrollHeight), Math.max(c.body.offsetHeight, c.documentElement.offsetHeight), Math.max(c.body.clientHeight, c.documentElement.clientHeight)); 1056 if (a.browser.msie && a.browser.version > 6 && c.body.scrollHeight < a.viewHeight()) { 1057 b = c.body.clientHeight 1058 } 1059 if (a.browser.msie && document.compatMode == "CSS1Compat" && c.body.scrollHeight < a.viewHeight()) { 1060 if (a.browser.version > 7 && a.browser.version < 9) {} else { 1061 if (a.browser.version > 6 && a.browser.version < 8) {} 1062 } 1063 b = c.documentElement.clientHeight 1064 } 1065 return b 1066 } 1067 ; 1068 a.canvasWidth = function() { 1069 var c = document 1070 , b = c.body.scrollWidth; 1071 if (document.compatMode == "CSS1Compat") { 1072 b = c.documentElement.scrollWidth 1073 } else { 1074 if (a.browser.msie && a.browser.version <= 6 && c.body.scrollWidth > a.viewWidth()) { 1075 b = Math.max(Math.max(c.body.scrollWidth, c.documentElement.scrollWidth), Math.max(c.body.offsetWidth, c.documentElement.offsetWidth), Math.max(c.body.clientWidth, c.documentElement.clientWidth)) 1076 } 1077 } 1078 return b 1079 } 1080 ; 1081 a.scrollLeft = function() { 1082 if (document.compatMode != "CSS1Compat" || (a.browser.msie && a.browser.version <= 6)) { 1083 return Math.max(a("body").scrollLeft(), document.documentElement.scrollLeft) 1084 } else { 1085 return a("body").scrollLeft() 1086 } 1087 } 1088 ; 1089 a.scrollTop = function() { 1090 if (document.compatMode != "CSS1Compat" || (a.browser.msie && a.browser.version <= 6)) { 1091 return Math.max(a("body").scrollTop(), document.documentElement.scrollTop) 1092 } else { 1093 return a("body").scrollTop() 1094 } 1095 } 1096 ; 1097 a.extend({ 1098 clientWidth: function() { 1099 var c = a(window).width(); 1100 var d = a.browser; 1101 var b = ""; 1102 if (d.msie || d.mozilla) { 1103 c = document.documentElement.clientWidth 1104 } 1105 if (d.safari) { 1106 b = "Apple Safari " + d.version 1107 } 1108 if (d.opera) { 1109 c = document.body.clientWidth 1110 } 1111 if (document.compatMode == "BackCompat") { 1112 c = document.body.clientWidth 1113 } else { 1114 c = document.documentElement.clientWidth 1115 } 1116 return c 1117 }, 1118 clientHeight: function() { 1119 var c = window.screen.availHeight; 1120 var d = a.browser; 1121 var b = ""; 1122 if (d.msie || d.mozilla) { 1123 c = document.documentElement.clientHeight 1124 } 1125 if (d.safari) { 1126 b = "Apple Safari " + d.version 1127 } 1128 if (d.opera) { 1129 c = document.body.clientHeight 1130 } 1131 if (document.compatMode == "BackCompat") { 1132 c = document.body.clientHeight 1133 } else { 1134 if (document.compatMode == "CSS1Compat") { 1135 c = document.documentElement.clientHeight 1136 } 1137 } 1138 return c 1139 }, 1140 windowWidth: function() { 1141 var b = a(window).width(); 1142 if (self.innerHeight) { 1143 b = self.innerWidth; 1144 if (document.documentElement.clientWidth) { 1145 b = document.documentElement.clientWidth 1146 } 1147 } else { 1148 if (document.documentElement && document.documentElement.clientHeight) { 1149 b = document.documentElement.clientWidth 1150 } else { 1151 if (document.body) { 1152 b = document.body.clientWidth 1153 } 1154 } 1155 } 1156 return b 1157 }, 1158 windowHeight: function() { 1159 var b = a(window).height();
1160 if (self.innerHeight) { 1161 b = self.innerHeight 1162 } else { 1163 if (document.documentElement && document.documentElement.clientHeight) { 1164 b = document.documentElement.clientHeight 1165 } else { 1166 if (document.body) { 1167 b = document.body.clientHeight 1168 } 1169 } 1170 } 1171 return b 1172 } 1173 }); 1174 a.fn.getHeight = function() { 1175 var d = a(this) 1176 , b = "auto"; 1177 if (d.is(":visible")) { 1178 b = d.height() 1179 } else { 1180 var c = { 1181 position: d.css("position"), 1182 visibility: d.css("visibility"), 1183 display: d.css("display") 1184 }; 1185 b = d.css({ 1186 position: "absolute", 1187 visibility: "hidden", 1188 display: "block" 1189 }).height(); 1190 d.css(c) 1191 } 1192 return b 1193 } 1194 ; 1195 a.fn.getSize = function() { 1196 var e = a(this); 1197 if (e.css("display") !== "none") { 1198 return { 1199 width: e.width(), 1200 height: e.height() 1201 } 1202 } 1203 var d = { 1204 position: e.css("position"), 1205 visibility: e.css("visibility"), 1206 display: e.css("display") 1207 } 1208 , c = { 1209 display: "block", 1210 position: "absolute", 1211 visibility: "hidden" 1212 }; 1213 e.css(c); 1214 var f = e.width() 1215 , b = e.height(); 1216 e.css(d); 1217 return { 1218 width: f, 1219 height: b 1220 } 1221 } 1222 ; 1223 a.getPageSize = function() { 1224 var c, b; 1225 if (window.innerHeight && window.scrollMaxY) { 1226 c = window.innerWidth + window.scrollMaxX; 1227 b = window.innerHeight + window.scrollMaxY 1228 } else { 1229 if (document.body.scrollHeight > document.body.offsetHeight) { 1230 c = document.body.scrollWidth; 1231 b = document.body.scrollHeight 1232 } else { 1233 c = document.body.offsetWidth; 1234 b = document.body.offsetHeight 1235 } 1236 } 1237 var d = a(window).getDimension(); 1238 if (b < d.height) { 1239 pageHeight = d.height 1240 } else { 1241 pageHeight = b 1242 } 1243 if (c < d.width) { 1244 pageWidth = c 1245 } else { 1246 pageWidth = d.width 1247 } 1248 return { 1249 width: pageWidth, 1250 height: pageHeight 1251 } 1252 } 1253 ; 1254 a.getClientSize = function() { 1255 return { 1256 width: function() { 1257 var c = a(window).width(); 1258 var d = a.browser; 1259 var b = ""; 1260 if (d.msie || d.mozilla) { 1261 c = document.documentElement.clientWidth 1262 } 1263 if (d.safari) { 1264 b = "Apple Safari " + d.version 1265 } 1266 if (d.opera) { 1267 c = document.body.clientWidth 1268 } 1269 if (document.compatMode == "BackCompat") { 1270 c = document.body.clientWidth 1271 } else { 1272 c = document.documentElement.clientWidth 1273 } 1274 return c 1275 } 1276 .call(this), 1277 height: function() { 1278 var b = a(window).height(); 1279 if (self.innerHeight) { 1280 b = self.innerHeight 1281 } else { 1282 if (document.documentElement && document.documentElement.clientHeight) { 1283 b = document.documentElement.clientHeight 1284 } else { 1285 if (document.body) { 1286 b = document.body.clientHeight 1287 } 1288 } 1289 } 1290 return b 1291 } 1292 .call(this) 1293 } 1294 } 1295 ; 1296 a.fn.getDimension = function() { 1297 var c = a(this); 1298 var b = this[0].tagName ? this[0].tagName.toLocaleLowerCase() == "body" : false; 1299 var d = a.isWindow(this); 1300 return { 1301 width: function() { 1302 if (d) { 1303 return a(window).width() 1304 } else { 1305 if (b) { 1306 return a(document).width() 1307 } else { 1308 return Math.max(c.width(), c.innerWidth()) 1309 } 1310 } 1311 } 1312 .call(this), 1313 height: function() { 1314 if (d) { 1315 return a(window).height() 1316 } else { 1317 if (b) { 1318 return a(document).height() 1319 } else { 1320 return Math.max(c.height(), c.innerHeight()) 1321 } 1322 } 1323 } 1324 .call(this) 1325 } 1326 } 1327 ; 1328 a.fn.getPosition = function() { 1329 var d = a(this); 1330 var c = a(this)[0].tagName ? a(this)[0].tagName.toLocaleLowerCase() == "body" : false; 1331 var e = a.isWindow(this); 1332 var b = a.extend(true, {}, { 1333 scrollTop: c ? a(document).scrollTop() : d.scrollTop(), 1334 scrollLeft: c ? a(document).scrollLeft() : d.scrollLeft() 1335 }, (e ? { 1336 left: 0, 1337 top: 0 1338 } : d.offset())); 1339 var f = d.getDimension(); 1340 return a.extend({}, b, { 1341 width: f.width,
1342 height: f.height, 1343 pageX: b.left + b.scrollLeft, 1344 pageY: b.top + b.scrollTop, 1345 border: e ? 0 : (d.outerWidth() - d.innerWidth()), 1346 padding: e ? 0 : (d.innerWidth() - d.width()), 1347 margin: e ? 0 : (d.outerWidth(true) - d.outerWidth()) 1348 }, c ? { 1349 top: 0, 1350 left: 0 1351 } : d.offset()) 1352 } 1353 ; 1354 a.fn.getBoundingRect = function() { 1355 var b = this; 1356 var d = a.isWindow(this); 1357 var c = d ? 0 : (a(b).outerWidth() - a(b).innerWidth()); 1358 var f = d ? 0 : (a(b).innerWidth() - a(b).width()); 1359 var e = d ? 0 : function() { 1360 try { 1361 return (a(b).outerWidth(true) - a(b).outerWidth()) 1362 } catch (g) { 1363 return 0 1364 } 1365 } 1366 .call(this); 1367 return { 1368 border: c, 1369 "border-left": d ? 0 : function() { 1370 try { 1371 var g = a.trim((a(b).css("border-left") || "").replace(/\!important/ig, "").replace("px", "")); 1372 return a.isNumeric(g) ? parseInt(g) : c 1373 } catch (h) { 1374 return c 1375 } 1376 } 1377 .call(this), 1378 "border-top": d ? 0 : function() { 1379 try { 1380 var g = a.trim((a(b).css("border-top") || "").replace(/\!important/ig, "").replace("px", "")); 1381 return a.isNumeric(g) ? parseInt(g) : c 1382 } catch (h) { 1383 return c 1384 } 1385 } 1386 .call(this), 1387 "border-right": d ? 0 : function() { 1388 try { 1389 var g = a.trim((a(b).css("border-right") || "").replace(/\!important/ig, "").replace("px", "")); 1390 return a.isNumeric(g) ? parseInt(g) : c 1391 } catch (h) { 1392 return c 1393 } 1394 } 1395 .call(this), 1396 "border-bottom": d ? 0 : function() { 1397 try { 1398 var g = a.trim((a(b).css("border-bottom") || "").replace(/\!important/ig, "").replace("px", "")); 1399 return a.isNumeric(g) ? parseInt(g) : c 1400 } catch (h) { 1401 return c 1402 } 1403 } 1404 .call(this), 1405 padding: f, 1406 "padding-left": d ? 0 : function() { 1407 try { 1408 var g = a.trim((a(b).css("padding-left") || "").replace(/\!important/ig, "").replace("px", "")); 1409 return a.isNumeric(g) ? parseInt(g) : f 1410 } catch (h) { 1411 return f 1412 } 1413 } 1414 .call(this), 1415 "padding-top": d ? 0 : function() { 1416 try { 1417 var g = a.trim((a(b).css("padding-top") || "").replace(/\!important/ig, "").replace("px", "")); 1418 return a.isNumeric(g) ? parseInt(g) : f 1419 } catch (h) { 1420 return f 1421 } 1422 } 1423 .call(this), 1424 "padding-right": d ? 0 : function() { 1425 try { 1426 var g = a.trim((a(b).css("padding-right") || "").replace(/\!important/ig, "").replace("px", "")); 1427 return a.isNumeric(g) ? parseInt(g) : f 1428 } catch (h) { 1429 return f 1430 } 1431 } 1432 .call(this), 1433 "padding-bottom": d ? 0 : function() { 1434 try { 1435 var g = a.trim((a(b).css("padding-bottom") || "").replace(/\!important/ig, "").replace("px", "")); 1436 return a.isNumeric(g) ? parseInt(g) : f 1437 } catch (h) { 1438 return f 1439 } 1440 } 1441 .call(this), 1442 margin: e, 1443 "margin-left": d ? 0 : function() { 1444 try { 1445 var g = a.trim((a(b).css("margin-left") || "").replace(/\!important/ig, "").replace("px", "")); 1446 return a.isNumeric(g) ? parseInt(g) : e 1447 } catch (h) { 1448 return e 1449 } 1450 } 1451 .call(this), 1452 "margin-top": d ? 0 : function() { 1453 try { 1454 var g = a.trim((a(b).css("margin-top") || "").replace(/\!important/ig, "").replace("px", "")); 1455 return a.isNumeric(g) ? parseInt(g) : e 1456 } catch (h) { 1457 return e 1458 } 1459 } 1460 .call(this), 1461 "margin-right": d ? 0 : function() { 1462 try { 1463 var g = a.trim((a(b).css("margin-right") || "").replace(/\!important/ig, "").replace("px", "")); 1464 return a.isNumeric(g) ? parseInt(g) : e 1465 } catch (h) { 1466 return e 1467 } 1468 } 1469 .call(this), 1470 "margin-bottom": d ? 0 : function() { 1471 try { 1472 var g = a.trim((a(b).css("margin-bottom") || "").replace(/\!important/ig, "").replace("px", "")); 1473 return a.isNumeric(g) ? parseInt(g) : e 1474 } catch (h) { 1475 return e 1476 } 1477 } 1478 .call(this) 1479 } 1480 } 1481} 1482)(jQuery); 1483/* 1484 * åç¬¦æ ¼å¼åå·¥å ·ï¼è¯¦æ åè§ï¼jquery.utils.format-1.0.0.js 1485 */ 1486;(function(a) { 1487 a.replacement = function(f) { 1488 var e; 1489 if (typeof (f) == "string") { 1490 e = 0; 1491 while ((e = f.indexOf("\\", e)) != -1) { 1492 if (f.charAt(e + 1) == "t") { 1493 f = f.substring(0, e) + "\t" + f.substring((e++) + 2) 1494 } else { 1495 if (f.charAt(e + 1) == "r") { 1496 f = f.substring(0, e) + "\r" + f.substring((e++) + 2) 1497 } else { 1498 if (f.charAt(e + 1) == "n") { 1499 f = f.substring(0, e) + "\n" + f.substring((e++) + 2) 1500 } else { 1501 if (f.charAt(e + 1) == "f") { 1502 f = f.substring(0, e) + "\f" + f.substring((e++) + 2) 1503 } else { 1504 if (f.charAt(e + 1) == "\\") { 1505 f = f.substring(0, e) + "\\" + f.substring((e++) + 2) 1506 } else { 1507 f = f.substring(0, e) + f.substring(e + 1) 1508 } 1509 } 1510 } 1511 } 1512 } 1513 } 1514 var b = [], d, c; 1515 e = 0; 1516 while (e < f.length) { 1517 if (f.charAt(e) == "'") { 1518 if (e == f.length - 1) { 1519 f = f.substring(0, e) 1520 } else { 1521 if (f.charAt(e + 1) == "'") { 1522 f = f.substring(0, e) + f.substring(++e) 1523 } else { 1524 d = e + 2; 1525 while ((d = f.indexOf("'", d)) != -1) { 1526 if (d == f.length - 1 || f.charAt(d + 1) != "'") { 1527 f = f.substring(0, e) + f.substring(e + 1, d) + f.substring(d + 1); 1528 e = d - 1; 1529 break 1530 } else { 1531 f = f.substring(0, d) + f.substring(++d) 1532 } 1533 } 1534 if (d == -1) { 1535 f = f.substring(0, e) + f.substring(e + 1) 1536 } 1537 } 1538 } 1539 } else { 1540 e++ 1541 } 1542 } 1543 } 1544 return f 1545 } 1546 ; 1547 a.format = function(c, d) { 1548 c = a.replacement(c); 1549 if (arguments.length == 1) { 1550 return function() { 1551 var e = a.makeArray(arguments); 1552 e.unshift(c); 1553 return a.format.apply(this, e) 1554 } 1555 } 1556 if (arguments.length > 2 && d.constructor != Array) { 1557 d = a.makeArray(arguments).slice(1) 1558 } 1559 if (!isNaN(c) && Number.prototype.format) { 1560 return Number(c).format(d) 1561 } else { 1562 if (a.type(c) === "date" && Date.prototype.format) { 1563 return c.format(d) 1564 } else { 1565 if (a.type(c) === "string") { 1566 if (String.prototype.format) { 1567 return new String(c).format(d) 1568 } else { 1569 if (a.isArray(d)) { 1570 return c.replace(/\{([^}]*)\}/mg, function(f, e) { 1571 return f = d[e] 1572 }) 1573 } else { 1574 if (a.isPlainObject(d)) { 1575 return c.replace(/\$\{([^}]*)\}/mg, function(f, e) { 1576 return f = d[e.trim()] 1577 }) 1578 } else { 1579 if (a.type(d) === "string") { 1580 if (String.prototype.toDate) { 1581 var b = c.toDate(); 1582 if (b != null && Date.prototype.format) { 1583 return b.format(d) 1584 } 1585 } else { 1586 a.each(a.makeArray(d), function(e, f) { 1587 c = c.replace(new RegExp("\\{" + e + "\\}","mg"), f) 1588 }) 1589 } 1590 } 1591 } 1592 } 1593 } 1594 } 1595 } 1596 } 1597 return c 1598 } 1599}(jQuery)); 1600/* 1601 * æä»¶å¯¹è±¡ç¸å ³å·¥å ·ï¼è¯¦æ åè§ï¼jquery.utils.file-1.0.0.js 1602 */ 1603;(function(a) { 1604 var b = { 1605 regex: /^([1-9]\d*|[1-9]\d*.\d*|0.\d*[1-9]\d*)(B|KB|MB|GB|TB|PB|EB|ZB|YB|BB)$/, 1606 powers: { 1607 B: 1, 1608 KB: 1024, 1609 MB: 1024 * 1024, 1610 GB: 1024 * 1024 * 1024, 1611 TB: 1024 * 1024 * 1024 * 1024 1612 } 1613 }; 1614 a.capacity = function(f, g) { 1615 if (!a.founded(f)) { 1616 return 0 1617 } 1618 f = a.trim(f.toString()); 1619 if (!a.founded(g)) { 1620 f = f.toUpperCase(); 1621 var d = b.regex.exec(f); 1622 if (d && d[2]) { 1623 var e = parseFloat(d[1]); 1624 var h = b.powers[d[2]] || 1; 1625 return e * h 1626 } else { 1627 return f 1628 } 1629 } else { 1630 if (a.isNumeric(f)) { 1631 f = parseFloat(f); 1632 if (f < 1024) { 1633 return f + "B" 1634 } else { 1635 var c = b.powers[g.toUpperCase()]; 1636 return (Math.round(f * 100 / c) / 100).toString() + g.toUpperCase() 1637 } 1638 } 1639 } 1640 return 0 1641 } 1642 ; 1643 a.fileMatch = function(d, e, f) { 1644 var h = f && a.trim(f).length > 0 ? a.trim(f) : ""; 1645 var c = h.split("/"); 1646 h = c[c.length - 1].toLowerCase(); 1647 e = (e || "").toLowerCase(); 1648 if (a.type(d) === "regexp") { 1649 if (d.test(e) || d.test(h)) { 1650 return true 1651 } 1652 return false 1653 } else { 1654 if (!a.isArray(d)) { 1655 return a.fileMatch(a.makeArray(d), e, f) 1656 } 1657 var g = false; 1658 a.each(d, function(j, l) { 1659 if (a.type(l) === "regexp") { 1660 g = a.fileMatch(l, e, f) 1661 } else { 1662 if (a.type(l) === "string" && a.trim(l).length > 0) { 1663 var k = l.split(";"); 1664 a.each(k, function(m, i) { 1665 i = a.trim(i || ""); 1666 if (i.length > 0 && i.indexOf(".") > -1) { 1667 if (i == "*.*") { 1668 g = true 1669 } else { 1670 if (i.indexOf(".") != 0) { 1671 i = i.replace(".", "\\.") 1672 } 1673 var o = ""; 1674 if (i.indexOf("*") == 0) { 1675 i = i.substring(1); 1676 if (i.indexOf(".") != 0) { 1677 o += "." 1678 } 1679 } 1680 if (i.lastIndexOf("*") == (i.length - 1)) { 1681 i = i.substring(0, (i.length - 1)) 1682 } 1683 o += i + "$"; 1684 var n = new RegExp(o,"g"); 1685 if (n.test(e) || n.test(h)) { 1686 g = true 1687 } 1688 } 1689 } 1690 if (g) { 1691 return false 1692 } 1693 }) 1694 } 1695 } 1696 if (g) { 1697 return false 1698 } 1699 }); 1700 return g 1701 } 1702 } 1703 ; 1704 a.fn.extend({ 1705 elementBlur: function() { 1706 if (self.frameElement.tagName == "IFRAME") { 1707 var c = self.document.getElementById("focusDiv"); 1708 if (!c) { 1709 a('<div id="focusDiv" style="width: 1px; height: 1px;"></div>').appendTo(self.document.body); 1710 c = self.document.getElementById("focusDiv") 1711 } 1712 a(c).focus() 1713 } else { 1714 this.blur() 1715 } 1716 }, 1717 getFiles: function() { 1718 if (a(this[0]).is(":file")) { 1719 var c = this[0].files; 1720 if (!c) { 1721 c = function() { 1722 if (a.browser.msie === true) { 1723 try { 1724 var f = new ActiveXObject("Scripting.FileSystemObject"); 1725 var d = null; 1726 if (a.browser.version <= 6) { 1727 d = f.GetFile(this.value) 1728 } else { 1729 if (a.browser.version >= 7) { 1730 this.select(); 1731 a(this).elementBlur(); 1732 d = f.GetFile(document.selection.createRange().text) 1733 } 1734 } 1735 } catch (g) { 1736 alert("\u8bf7\u4fee\u6539IE\u6d4f\u89c8\u5668ActiveX\u5b89\u5168\u8bbe\u7f6e\u4e3a\u542f\u7528~\uff01") 1737 } 1738 return [d] 1739 } 1740 } 1741 .call(this[0]) 1742 } 1743 return c 1744 } 1745 return [] 1746 }, 1747 getFileCount: function() { 1748 return a(this).getFiles().length 1749 }, 1750 getFileSize: function() { 1751 if (a(this[0]).is(":file")) { 1752 var d = a(this).getFiles(); 1753 if (d.length > 0) { 1754 if (d.length > 1) { 1755 var c = []; 1756 a.each(this.files || [], fu
1756nction(h, g) { 1757 try { 1758 c.push(d.item(h).fileSize) 1759 } catch (j) { 1760 c.push(g.size) 1761 } 1762 }); 1763 return c.join(";") 1764 } else { 1765 try { 1766 return d.item(0).fileSize 1767 } catch (f) { 1768 return d[0].size 1769 } 1770 } 1771 } 1772 } 1773 return 0 1774 }, 1775 getFileName: function(c) { 1776 if (a(this[0]).is(":file")) { 1777 var f = a(this).getFiles(); 1778 if (f.length > 0) { 1779 if (f.length > 1) { 1780 var d = []; 1781 a.each(this.files || [], function(j, h) { 1782 try { 1783 d.push(f.item(j).fileName) 1784 } catch (k) { 1785 d.push(h.name) 1786 } 1787 }); 1788 return d.join(";") 1789 } else { 1790 try { 1791 return f.item(0).fileName 1792 } catch (g) { 1793 return f[0].name 1794 } 1795 } 1796 } 1797 } 1798 return 0 1799 }, 1800 getFileFullPath: function() { 1801 var d = ""; 1802 if (a(this[0]).is(":file")) { 1803 var f = this[0].files; 1804 if (!f) { 1805 if (a.browser.msie) { 1806 if (a.browser.version <= 6) { 1807 d = this[0].value 1808 } else { 1809 if (a.browser.version >= 7) { 1810 this.select(); 1811 a(this).elementBlur(); 1812 d = document.selection.createRange().text 1813 } 1814 } 1815 } else { 1816 d = this[0].value 1817 } 1818 } else { 1819 var h = []; 1820 for (var c = 0; c < f.length; c++) { 1821 try { 1822 d = f.item(c).getAsDataURL() 1823 } catch (g) { 1824 d = window.URL.createObjectURL(f[c]) 1825 } 1826 h.push(d) 1827 } 1828 d = h.join(";") 1829 } 1830 } 1831 return d 1832 }, 1833 getFilePath: function() { 1834 var c = ""; 1835 if (a(this[0]).is(":file")) { 1836 var d = a(this).getFiles(); 1837 var e = []; 1838 a.each(d || [], function(g, f) { 1839 try { 1840 c = (f.path || d.item(g).getAsDataURL()) 1841 } catch (h) { 1842 c = window.URL.createObjectURL(f) 1843 } 1844 e.push(c) 1845 }); 1846 c = e.join(";") 1847 } 1848 return c 1849 }, 1850 getFileSuffix: function() { 1851 var e = a(this).getFilePath(); 1852 if (a.founded(e)) { 1853 var d = e.split(";"); 1854 var c = []; 1855 a.each(d || [], function(f, g) { 1856 c.push(g.substr(g.lastIndexOf(".")).toLowerCase()) 1857 }); 1858 return c.join(";") 1859 } else { 1860 return null 1861 } 1862 }, 1863 isSuffix: function(f) { 1864 if (a(this[0]).is(":file")) { 1865 var e = a(this).getFileSuffix(); 1866 if (a.founded(e) && a.founded(f)) { 1867 var c = e.split(";"); 1868 var d = false; 1869 a.each(c || [], function(g, h) { 1870 d = a.fileMatch(f, h, h); 1871 return d 1872 }); 1873 return d 1874 } else { 1875 return false 1876 } 1877 } else { 1878 return false 1879 } 1880 }, 1881 clearFile: function() { 1882 var f = a(this[0]); 1883 if (a(f).is(":file")) { 1884 var d = a(f).clone(true, true).val(""); 1885 try { 1886 this.select(); 1887 document.execCommand("delete") 1888 } catch (c) { 1889 f.after(d); 1890 f.remove() 1891 } 1892 } 1893 }, 1894 getAsBinary: function(d) { 1895 if (a(this[0]).is(":file")) { 1896 try { 1897 return this[0].files.item(d || 0).getAsBinary() 1898 } catch (f) { 1899 if (typeof FileReader != "undefined") { 1900 var c = new FileReader(); 1901 c.readAsBinaryString(this[0].files[d || 0]); 1902 c.onload = function(h) { 1903 var g = this.result 1904 } 1905 } 1906 } 1907 } 1908 return null 1909 }, 1910 getAsDataURL: function(d) { 1911 if (a(this[0]).is(":file")) { 1912 try { 1913 return this[0].files.item(d || 0).getAsDataURL() 1914 } catch (f) { 1915 if (typeof FileReader != "undefined") { 1916 var c = new FileReader(); 1917 c.readAsDataURL(this[0].files[d || 0]); 1918 c.onload = function(h) { 1919 var g = this.result 1920 } 1921 } 1922 } 1923 } 1924 return null 1925 }, 1926 getAsText: function(d, f) { 1927 if (a(this[0]).is(":file")) { 1928 try { 1929 return this[0].files.item(d || 0).getAsText(f || "utf-8") 1930 } catch (g) { 1931 if (typeof FileReader != "undefined") { 1932 var c = new FileReader(); 1933 c.readAsDataURL(this[0].files[d || 0], f || "utf-8"); 1934 c.onload = function(i) { 1935 var h = this.result 1936 } 1937 } 1938 } 1939 } 1940 return null 1941 } 1942 }) 1943} 1944)(jQuery); 1945/* 1946 * Md5å å¯å·¥å ·ï¼è¯¦æ åè§ï¼jquery.md5.js 1947 */ 1948;(function(e) { 1949 var m = function(p, o) { 1950 return (p << o) | (p >>> (32 - o)) 1951 }; 1952 var a = function(s, p) { 1953 var u, o, r, t, q; 1954 r = (s & 2147483648); 1955 t = (p & 2147483648); 1956 u = (s & 1073741824);
1957 o = (p & 1073741824); 1958 q = (s & 1073741823) + (p & 1073741823); 1959 if (u & o) { 1960 return (q ^ 2147483648 ^ r ^ t) 1961 } 1962 if (u | o) { 1963 if (q & 1073741824) { 1964 return (q ^ 3221225472 ^ r ^ t) 1965 } else { 1966 return (q ^ 1073741824 ^ r ^ t) 1967 } 1968 } else { 1969 return (q ^ r ^ t) 1970 } 1971 }; 1972 var n = function(o, q, p) { 1973 return (o & q) | ((~o) & p) 1974 }; 1975 var l = function(o, q, p) { 1976 return (o & p) | (q & (~p)) 1977 }; 1978 var j = function(o, q, p) { 1979 return (o ^ q ^ p) 1980 }; 1981 var i = function(o, q, p) { 1982 return (q ^ (o | (~p))) 1983 }; 1984 var g = function(q, p, v, u, o, r, t) { 1985 q = a(q, a(a(n(p, v, u), o), t)); 1986 return a(m(q, r), p) 1987 }; 1988 var c = function(q, p, v, u, o, r, t) { 1989 q = a(q, a(a(l(p, v, u), o), t)); 1990 return a(m(q, r), p) 1991 }; 1992 var h = function(q, p, v, u, o, r, t) { 1993 q = a(q, a(a(j(p, v, u), o), t)); 1994 return a(m(q, r), p) 1995 }; 1996 var d = function(q, p, v, u, o, r, t) { 1997 q = a(q, a(a(i(p, v, u), o), t)); 1998 return a(m(q, r), p) 1999 }; 2000 var f = function(r) { 2001 var v; 2002 var q = r.length; 2003 var p = q + 8; 2004 var u = (p - (p % 64)) / 64; 2005 var t = (u + 1) * 16; 2006 var w = Array(t - 1); 2007 var o = 0; 2008 var s = 0; 2009 while (s < q) { 2010 v = (s - (s % 4)) / 4; 2011 o = (s % 4) * 8; 2012 w[v] = (w[v] | (r.charCodeAt(s) << o)); 2013 s++ 2014 } 2015 v = (s - (s % 4)) / 4; 2016 o = (s % 4) * 8; 2017 w[v] = w[v] | (128 << o); 2018 w[t - 2] = q << 3; 2019 w[t - 1] = q >>> 29; 2020 return w 2021 }; 2022 var b = function(r) { 2023 var q = "", o = "", s, p; 2024 for (p = 0; p <= 3; p++) { 2025 s = (r >>> (p * 8)) & 255; 2026 o = "0" + s.toString(16); 2027 q = q + o.substr(o.length - 2, 2) 2028 } 2029 return q 2030 }; 2031 var k = function(p) { 2032 p = p.replace(/\x0d\x0a/g, "\x0a"); 2033 var o = ""; 2034 for (var r = 0; r < p.length; r++) { 2035 var q = p.charCodeAt(r); 2036 if (q < 128) { 2037 o += String.fromCharCode(q) 2038 } else { 2039 if ((q > 127) && (q < 2048)) { 2040 o += String.fromCharCode((q >> 6) | 192); 2041 o += String.fromCharCode((q & 63) | 128) 2042 } else { 2043 o += String.fromCharCode((q >> 12) | 224); 2044 o += String.fromCharCode(((q >> 6) & 63) | 128); 2045 o += String.fromCharCode((q & 63) | 128) 2046 } 2047 } 2048 } 2049 return o 2050 }; 2051 e.extend({ 2052 md5: function(o) { 2053 var v = Array(); 2054 var G, H, p, u, F, Q, P, N, K; 2055 var D = 7 2056 , B = 12 2057 , z = 17 2058 , w = 22; 2059 var O = 5 2060 , L = 9 2061 , J = 14 2062 , I = 20; 2063 var t = 4 2064 , s = 11 2065 , r = 16 2066 , q = 23; 2067 var E = 6 2068 , C = 10 2069 , A = 15 2070 , y = 21; 2071 o = k(o); 2072 v = f(o); 2073 Q = 1732584193; 2074 P = 4023233417; 2075 N = 2562383102; 2076 K = 271733878; 2077 for (G = 0; G < v.length; G += 16) { 2078 H = Q; 2079 p = P; 2080 u = N; 2081 F = K; 2082 Q = g(Q, P, N, K, v[G + 0], D, 3614090360); 2083 K = g(K, Q, P, N, v[G + 1], B, 3905402710); 2084 N = g(N, K, Q, P, v[G + 2], z, 606105819); 2085 P = g(P, N, K, Q, v[G + 3], w, 3250441966); 2086 Q = g(Q, P, N, K, v[G + 4], D, 4118548399); 2087 K = g(K, Q, P, N, v[G + 5], B, 1200080426); 2088 N = g(N, K, Q, P, v[G + 6], z, 2821735955); 2089 P = g(P, N, K, Q, v[G + 7], w, 4249261313); 2090 Q = g(Q, P, N, K, v[G + 8], D, 1770035416); 2091 K = g(K, Q, P, N, v[G + 9], B, 2336552879); 2092 N = g(N, K, Q, P, v[G + 10], z, 4294925233); 2093 P = g(P, N, K, Q, v[G + 11], w, 2304563134); 2094 Q = g(Q, P, N, K, v[G + 12], D, 1804603682); 2095 K = g(K, Q, P, N, v[G + 13], B, 4254626195); 2096 N = g(N, K, Q, P, v[G + 14], z, 2792965006); 2097 P = g(P, N, K, Q, v[G + 15], w, 1236535329); 2098 Q = c(Q, P, N, K, v[G + 1], O, 4129170786); 2099 K = c(K, Q, P, N, v[G + 6], L, 3225465664); 2100 N = c(N, K, Q, P, v[G + 11], J, 643717713); 2101 P = c(P, N, K, Q, v[G + 0], I, 3921069994); 2102 Q = c(Q, P, N, K, v[G + 5], O, 3593408605); 2103 K = c(K, Q, P, N, v[G + 10], L, 38016083); 2104 N = c(N, K, Q, P, v[G + 15], J, 3634488961); 2105 P = c(P, N, K, Q, v[G + 4], I, 3889429448); 2106 Q = c(Q, P, N, K, v[G + 9], O, 568446438); 2107 K = c(K, Q, P, N, v[G + 14], L, 3275163606); 2108 N = c(N, K, Q, P, v[G + 3], J, 4107603335);
2109 P = c(P, N, K, Q, v[G + 8], I, 1163531501); 2110 Q = c(Q, P, N, K, v[G + 13], O, 2850285829); 2111 K = c(K, Q, P, N, v[G + 2], L, 4243563512); 2112 N = c(N, K, Q, P, v[G + 7], J, 1735328473); 2113 P = c(P, N, K, Q, v[G + 12], I, 2368359562); 2114 Q = h(Q, P, N, K, v[G + 5], t, 4294588738); 2115 K = h(K, Q, P, N, v[G + 8], s, 2272392833); 2116 N = h(N, K, Q, P, v[G + 11], r, 1839030562); 2117 P = h(P, N, K, Q, v[G + 14], q, 4259657740); 2118 Q = h(Q, P, N, K, v[G + 1], t, 2763975236); 2119 K = h(K, Q, P, N, v[G + 4], s, 1272893353); 2120 N = h(N, K, Q, P, v[G + 7], r, 4139469664); 2121 P = h(P, N, K, Q, v[G + 10], q, 3200236656); 2122 Q = h(Q, P, N, K, v[G + 13], t, 681279174); 2123 K = h(K, Q, P, N, v[G + 0], s, 3936430074); 2124 N = h(N, K, Q, P, v[G + 3], r, 3572445317); 2125 P = h(P, N, K, Q, v[G + 6], q, 76029189); 2126 Q = h(Q, P, N, K, v[G + 9], t, 3654602809); 2127 K = h(K, Q, P, N, v[G + 12], s, 3873151461); 2128 N = h(N, K, Q, P, v[G + 15], r, 530742520); 2129 P = h(P, N, K, Q, v[G + 2], q, 3299628645); 2130 Q = d(Q, P, N, K, v[G + 0], E, 4096336452); 2131 K = d(K, Q, P, N, v[G + 7], C, 1126891415); 2132 N = d(N, K, Q, P, v[G + 14], A, 2878612391); 2133 P = d(P, N, K, Q, v[G + 5], y, 4237533241); 2134 Q = d(Q, P, N, K, v[G + 12], E, 1700485571); 2135 K = d(K, Q, P, N, v[G + 3], C, 2399980690); 2136 N = d(N, K, Q, P, v[G + 10], A, 4293915773); 2137 P = d(P, N, K, Q, v[G + 1], y, 2240044497); 2138 Q = d(Q, P, N, K, v[G + 8], E, 1873313359); 2139 K = d(K, Q, P, N, v[G + 15], C, 4264355552); 2140 N = d(N, K, Q, P, v[G + 6], A, 2734768916); 2141 P = d(P, N, K, Q, v[G + 13], y, 1309151649); 2142 Q = d(Q, P, N, K, v[G + 4], E, 4149444226); 2143 K = d(K, Q, P, N, v[G + 11], C, 3174756917); 2144 N = d(N, K, Q, P, v[G + 2], A, 718787259); 2145 P = d(P, N, K, Q, v[G + 9], y, 3951481745); 2146 Q = a(Q, H); 2147 P = a(P, p); 2148 N = a(N, u); 2149 K = a(K, F) 2150 } 2151 var M = b(Q) + b(P) + b(N) + b(K); 2152 return M.toLowerCase() 2153 } 2154 }) 2155} 2156)(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.