vendor: 6,208 bytes, lines 1-192
1/*! 2 * Jasny Bootstrap v3.1.3 (http://jasny.github.io/bootstrap) 3 * Copyright 2012-2014 Arnold Daniels 4 * Licensed under Apache-2.0 (https://github.com/jasny/bootstrap/blob/master/LICENSE) 5 */ 6 7if (typeof jQuery === 'undefined') { throw new Error('Jasny Bootstrap\'s JavaScript requires jQuery') } 8 9/* ======================================================================== 10 * Bootstrap: transition.js v3.1.3 11 * http://getbootstrap.com/javascript/#transitions 12 * ======================================================================== 13 * Copyright 2011-2014 Twitter, Inc. 14 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 15 * ======================================================================== */ 16 17 18+function ($) { 19 'use strict'; 20 21 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 22 // ============================================================ 23 24 function transitionEnd() { 25 var el = document.createElement('bootstrap') 26 27 var transEndEventNames = { 28 WebkitTransition : 'webkitTransitionEnd', 29 MozTransition : 'transitionend', 30 OTransition : 'oTransitionEnd otransitionend', 31 transition : 'transitionend' 32 } 33 34 for (var name in transEndEventNames) { 35 if (el.style[name] !== undefined) { 36 return { end: transEndEventNames[name] } 37 } 38 } 39 40 return false // explicit for ie8 ( ._.) 41 } 42 43 if ($.support.transition !== undefined) return // Prevent conflict with Twitter Bootstrap 44 45 // http://blog.alexmaccaw.com/css-transitions 46 $.fn.emulateTransitionEnd = function (duration) { 47 var called = false, $el = this 48 $(this).one($.support.transition.end, function () { called = true }) 49 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 50 setTimeout(callback, duration) 51 return this 52 } 53 54 $(function () { 55 $.support.transition = transitionEnd() 56 }) 57 58}(window.jQuery); 59 60/* ======================================================================== 61 * Bootstrap: offcanvas.js v3.1.3 62 * http://jasny.github.io/bootstrap/javascript/#offcanvas 63 * ======================================================================== 64 * Copyright 2013-2014 Arnold Daniels 65 * 66 * Licensed under the Apache License, Version 2.0 (the "License") 67 * you may not use this file except in compliance with the License. 68 * You may obtain a copy of the License at 69 * 70 * http://www.apache.org/licenses/LICENSE-2.0 71 * 72 * Unless required by applicable law or agreed to in writing, software 73 * distributed under the License is distributed on an "AS IS" BASIS, 74 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 75 * See the License for the specific language governing permissions and 76 * limitations under the License. 77 * ======================================================================== */ 78 79+function ($) { "use strict"; 80 81 // OFFCANVAS PUBLIC CLASS DEFINITION 82 // ================================= 83 84 var OffCanvas = function (element, options) { 85 this.$element = $(element) 86 this.options = $.extend({}, OffCanvas.DEFAULTS, options) 87 this.state = null 88 this.placement = null 89 90 if (this.options.recalc) { 91 this.calcClone() 92 $(window).on('resize', $.proxy(this.recalc, this)) 93 } 94 95 if (this.options.autohide) 96 $(document).on('click', $.proxy(this.autohide, this)) 97 98 if (this.options.toggle) this.toggle() 99 100 if (this.options.disablescrolling) { 101 this.options.disableScrolling = this.options.disablescrolling 102 delete this.options.disablescrolling 103 } 104 105 } 106 107 OffCanvas.DEFAULTS = { 108 toggle: true, 109 placement: 'auto', 110 autohide: true, 111 recalc: true, 112 disableScrolling: true 113 } 114 115 OffCanvas.prototype.offset = function () { 116 switch (this.placement) { 117 case 'left': 118 case 'right': return this.$element.outerWidth() 119 case 'top': 120 case 'bottom': return this.$element.outerHeight() 121 } 122 } 123 124 OffCanvas.prototype.calcPlacement = function () { 125 if (this.options.placement !== 'auto') { 126 this.placement = this.options.placement 127 return 128 } 129 130 if (!this.$element.hasClass('in')) { 131 this.$element.css('visiblity', 'hidden !important').addClass('in') 132 } 133 134 var horizontal = $(window).width() / this.$element.width() 135 var vertical = $(window).height() / this.$element.height() 136 137 var element = this.$element 138 function ab(a, b) { 139 if (element.css(b) === 'auto') return a 140 if (element.css(a) === 'auto') return b 141 142 var size_a = parseInt(element.css(a), 10) 143 var size_b = parseInt(element.css(b), 10) 144 145 return size_a > size_b ? b : a 146 } 147 148 //this.placement = horizontal >= vertical ? ab('left', 'right') : ab('top', 'bottom') 149 //override for htc, always left 150 this.placement = 'left'; 151 152 if (this.$element.css('visibility') === 'hidden !important') { 153 this.$element.removeClass('in').css('visiblity', '') 154 } 155 } 156 157 OffCanvas.prototype.opposite = function (placement) { 158 switch (placement) { 159 case 'top': return 'bottom' 160 case 'left': return 'right' 161 case 'bottom': return 'top' 162 case 'right': return 'left' 163 } 164 } 165 166 OffCanvas.prototype.getCanvasElements = function() { 167 // Return a set containing the canvas plus all fixed elements 168 var canvas = this.options.canvas ? $(this.options.canvas) : this.$element 169 170 var fixed_elements = canvas.find('*').filter(function() { 171 return $(this).css('position') === 'fixed' 172 }).not(this.options.exclude) 173 174 return canvas.add(fixed_elements) 175 } 176 177 OffCanvas.prototype.slide = function (elements, offset, callback) { 178 // Use jQuery animation if CSS transitions aren't supported 179 if (!$.support.transition) { 180 var anim = {} 181 anim[this.placement] = "+=" + offset 182 return elements.animate(anim, 350, callback) 183 } 184 185 var placement = this.placement 186 var opposite = this.opposite(placement) 187 188 elements.each(function() { 189 if ($(this).css(placement) !== 'auto') 190 $(this).css(placement, (parseInt($(this).css(placement), 10) || 0) + offset) 191 192 if ($(this).css(opposite) !== 'auto')
193 $(this).css(opposite, (parseInt($(this).css(opposite), 10) || 0) - offset) 194 }) 195 196 this.$element 197 .one($.support.transition.end, callback) 198 .emulateTransitionEnd(350) 199 } 200 201 OffCanvas.prototype.disableScrolling = function() { 202 var bodyWidth = $('body').width() 203 var prop = 'padding-' + this.opposite(this.placement) 204 205 if ($('body').data('offcanvas-style') === undefined) { 206 $('body').data('offcanvas-style', $('body').attr('style') || '') 207 } 208 209 $('body').css('overflow', 'hidden') 210 211 if ($('body').width() > bodyWidth) { 212 var padding = parseInt($('body').css(prop), 10) + $('body').width() - bodyWidth 213 214 setTimeout(function() { 215 $('body').css(prop, padding) 216 }, 1) 217 } 218 } 219 220 OffCanvas.prototype.show = function () { 221 if (this.state) return 222 223 var bodyWidthBefore = $('body').width() 224 var startEvent = $.Event('show.bs.offcanvas') 225 this.$element.trigger(startEvent) 226 if (startEvent.isDefaultPrevented()) return 227 228 this.state = 'slide-in' 229 this.calcPlacement(); 230 231 var elements = this.getCanvasElements() 232 var placement = this.placement 233 var opposite = this.opposite(placement) 234 var offset = this.offset() 235 236 if (elements.index(this.$element) !== -1) { 237 $(this.$element).data('offcanvas-style', $(this.$element).attr('style') || '') 238 this.$element.css(placement, -1 * offset) 239 this.$element.css(placement); // Workaround: Need to get the CSS property for it to be applied before the next line of code 240 } 241 242 elements.addClass('canvas-sliding').each(function() { 243 if ($(this).data('offcanvas-style') === undefined) $(this).data('offcanvas-style', $(this).attr('style') || '') 244 if ($(this).css('position') === 'static') $(this).css('position', 'relative') /* was relative */ 245 if (($(this).css(placement) === 'auto' || $(this).css(placement) === '0px') && 246 ($(this).css(opposite) === 'auto' || $(this).css(opposite) === '0px')) { 247 $(this).css(placement, 0); 248 } 249 $('body').css('width',bodyWidthBefore); 250 }) 251 252 if (this.options.disableScrolling) this.disableScrolling() 253 254 var complete = function () { 255 if (this.state != 'slide-in') return 256 257 this.state = 'slid' 258 259 elements.removeClass('canvas-sliding').addClass('canvas-slid') 260 this.$element.trigger('shown.bs.offcanvas') 261 $('body').css('position','fixed'); 262 } 263 264 setTimeout($.proxy(function() { 265 this.$element.addClass('in') 266 this.slide(elements, offset, $.proxy(complete, this)) 267 }, this), 1) 268 269 //respond to touch on ios,etc to close menu 270 document.addEventListener('touchstart', touchmenucheck, false); 271 272 } 273 274 OffCanvas.prototype.hide = function (fast) { 275 if (this.state !== 'slid') return 276 277 $('body').css('position','relative'); 278 var startEvent = $.Event('hide.bs.offcanvas') 279 this.$element.trigger(startEvent) 280 if (startEvent.isDefaultPrevented()) return 281 282 this.state = 'slide-out' 283 284 var elements = $('.canvas-slid') 285 var placement = this.placement 286 var offset = -1 * this.offset() 287 288 var complete = function () { 289 if (this.state != 'slide-out') return 290 291 this.state = null 292 this.placement = null 293 294 this.$element.removeClass('in') 295 296 elements.removeClass('canvas-sliding') 297 elements.add(this.$element).add('body').each(function() { 298 $(this).attr('style', $(this).data('offcanvas-style')).removeData('offcanvas-style') 299 }) 300 301 this.$element.trigger('hidden.bs.offcanvas') 302 } 303 304 elements.removeClass('canvas-slid').addClass('canvas-sliding') 305 306 setTimeout($.proxy(function() { 307 this.slide(elements, offset, $.proxy(complete, this)) 308 }, this), 1) 309 310 //respond to touch on ios,etc to close menu (remove event handler) 311 document.removeEventListener('touchstart', touchmenucheck, false); 312 313 } 314 315 OffCanvas.prototype.toggle = function () { 316 if (this.state === 'slide-in' || this.state === 'slide-out') return 317 this[this.state === 'slid' ? 'hide' : 'show']() 318 } 319 320 OffCanvas.prototype.calcClone = function() { 321 this.$calcClone = this.$element.clone() 322 .html('') 323 .addClass('offcanvas-clone').removeClass('in') 324 .appendTo($('body')) 325 } 326 327 OffCanvas.prototype.recalc = function () { 328 if (this.$calcClone.css('display') === 'none' || (this.state !== 'slid' && this.state !== 'slide-in')) return 329 330 this.state = null 331 this.placement = null 332 var elements = this.getCanvasElements() 333 334 this.$element.removeClass('in') 335 336 elements.removeClass('canvas-slid') 337 elements.add(this.$element).add('body').each(function() { 338 $(this).attr('style', $(this).data('offcanvas-style')).removeData('offcanvas-style') 339 }) 340 } 341 342 OffCanvas.prototype.autohide = function (e) { 343 if ($(e.target).closest(this.$element).length === 0) this.hide() 344 } 345 346 // OFFCANVAS PLUGIN DEFINITION 347 // ========================== 348 349 var old = $.fn.offcanvas 350 351 $.fn.offcanvas = function (option) { 352 return this.each(function () { 353 var $this = $(this) 354 var data = $this.data('bs.offcanvas') 355 var options = $.extend({}, OffCanvas.DEFAULTS, $this.data(), typeof option === 'object' && option) 356 357 if (!data) $this.data('bs.offcanvas', (data = new OffCanvas(this, options))) 358 if (typeof option === 'string') data[option]() 359 }) 360 } 361 362 $.fn.offcanvas.Constructor = OffCanvas 363 364 365 // OFFCANVAS NO CONFLICT 366 // ==================== 367 368 $.fn.offcanvas.noConflict = function () { 369 $.fn.offcanvas = old 370 return this 371 } 372 373 374 // OFFCANVAS DATA-API 375 // ================= 376 377 $(document).on('click.bs.offcanvas.data-api', '[data-toggle=offcanvas]', function (e) { 378 var $this = $(this), href 379 var target = $this.attr('data-target') 380 || e.preventDefault() 381 || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 382 var $canvas = $(target) 383 var data = $canvas.data('bs.offcanvas') 384 var option = data ? 'toggle' : $this.data() 385 386 e.stopPropagation() 387 388 if (data) data.toggle() 389 else $canvas.offcanvas(option) 390 }) 391 392}(window.jQuery); 393 394/* ============================================================ 395 * Bootstrap: rowlink.js v3.1.3 396 * http://jasny.github.io/bootstrap/javascript/#rowlink 397 * ============================================================
398 * Copyright 2012-2014 Arnold Daniels 399 * 400 * Licensed under the Apache License, Version 2.0 (the "License"); 401 * you may not use this file except in compliance with the License. 402 * You may obtain a copy of the License at 403 * 404 * http://www.apache.org/licenses/LICENSE-2.0 405 * 406 * Unless required by applicable law or agreed to in writing, software 407 * distributed under the License is distributed on an "AS IS" BASIS, 408 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 409 * See the License for the specific language governing permissions and 410 * limitations under the License. 411 * ============================================================ */ 412 413+function ($) { "use strict"; 414 415 var Rowlink = function (element, options) { 416 this.$element = $(element) 417 this.options = $.extend({}, Rowlink.DEFAULTS, options) 418 419 this.$element.on('click.bs.rowlink', 'td:not(.rowlink-skip)', $.proxy(this.click, this)) 420 } 421 422 Rowlink.DEFAULTS = { 423 target: "a" 424 } 425 426 Rowlink.prototype.click = function(e) { 427 var target = $(e.currentTarget).closest('tr').find(this.options.target)[0] 428 if ($(e.target)[0] === target) return 429 430 e.preventDefault(); 431 432 if (target.click) { 433 target.click() 434 } else if (document.createEvent) { 435 var evt = document.createEvent("MouseEvents"); 436 evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); 437 target.dispatchEvent(evt); 438 } 439 } 440 441 442 // ROWLINK PLUGIN DEFINITION 443 // =========================== 444 445 var old = $.fn.rowlink 446 447 $.fn.rowlink = function (options) { 448 return this.each(function () { 449 var $this = $(this) 450 var data = $this.data('bs.rowlink') 451 if (!data) $this.data('bs.rowlink', (data = new Rowlink(this, options))) 452 }) 453 } 454 455 $.fn.rowlink.Constructor = Rowlink 456 457 458 // ROWLINK NO CONFLICT 459 // ==================== 460 461 $.fn.rowlink.noConflict = function () { 462 $.fn.rowlink = old 463 return this 464 } 465 466 467 // ROWLINK DATA-API 468 // ================== 469 470 $(document).on('click.bs.rowlink.data-api', '[data-link="row"]', function (e) { 471 if ($(e.target).closest('.rowlink-skip').length !== 0) return 472 473 var $this = $(this) 474 if ($this.data('bs.rowlink')) return 475 $this.rowlink($this.data()) 476 $(e.target).trigger('click.bs.rowlink') 477 }) 478 479}(window.jQuery); 480 481/* =========================================================== 482 * Bootstrap: inputmask.js v3.1.0 483 * http://jasny.github.io/bootstrap/javascript/#inputmask 484 * 485 * Based on Masked Input plugin by Josh Bush (digitalbush.com) 486 * =========================================================== 487 * Copyright 2012-2014 Arnold Daniels 488 * 489 * Licensed under the Apache License, Version 2.0 (the "License") 490 * you may not use this file except in compliance with the License. 491 * You may obtain a copy of the License at 492 * 493 * http://www.apache.org/licenses/LICENSE-2.0 494 * 495 * Unless required by applicable law or agreed to in writing, software 496 * distributed under the License is distributed on an "AS IS" BASIS, 497 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 498 * See the License for the specific language governing permissions and 499 * limitations under the License. 500 * ========================================================== */ 501 502+function ($) { "use strict"; 503 504 var isIphone = (window.orientation !== undefined) 505 var isAndroid = navigator.userAgent.toLowerCase().indexOf("android") > -1 506 var isIE = window.navigator.appName == 'Microsoft Internet Explorer' 507 508 // INPUTMASK PUBLIC CLASS DEFINITION 509 // ================================= 510 511 var Inputmask = function (element, options) { 512 if (isAndroid) return // No support because caret positioning doesn't work on Android 513 514 this.$element = $(element) 515 this.options = $.extend({}, Inputmask.DEFAULTS, options) 516 this.mask = String(this.options.mask) 517 518 this.init() 519 this.listen() 520 521 this.checkVal() //Perform initial check for existing values 522 } 523 524 Inputmask.DEFAULTS = { 525 mask: "", 526 placeholder: "_", 527 definitions: { 528 '9': "[0-9]", 529 'a': "[A-Za-z]", 530 'w': "[A-Za-z0-9]", 531 '*': "." 532 } 533 } 534 535 Inputmask.prototype.init = function() { 536 var defs = this.options.definitions 537 var len = this.mask.length 538 539 this.tests = [] 540 this.partialPosition = this.mask.length 541 this.firstNonMaskPos = null 542 543 $.each(this.mask.split(""), $.proxy(function(i, c) { 544 if (c == '?') { 545 len-- 546 this.partialPosition = i 547 } else if (defs[c]) { 548 this.tests.push(new RegExp(defs[c])) 549 if (this.firstNonMaskPos === null) 550 this.firstNonMaskPos = this.tests.length - 1 551 } else { 552 this.tests.push(null) 553 } 554 }, this)) 555 556 this.buffer = $.map(this.mask.split(""), $.proxy(function(c, i) { 557 if (c != '?') return defs[c] ? this.options.placeholder : c 558 }, this)) 559 560 this.focusText = this.$element.val() 561 562 this.$element.data("rawMaskFn", $.proxy(function() { 563 return $.map(this.buffer, function(c, i) { 564 return this.tests[i] && c != this.options.placeholder ? c : null 565 }).join('') 566 }, this)) 567 } 568 569 Inputmask.prototype.listen = function() { 570 if (this.$element.attr("readonly")) return 571 572 var pasteEventName = (isIE ? 'paste' : 'input') + ".mask" 573 574 this.$element 575 .on("unmask.bs.inputmask", $.proxy(this.unmask, this)) 576 577 .on("focus.bs.inputmask", $.proxy(this.focusEvent, this)) 578 .on("blur.bs.inputmask", $.proxy(this.blurEvent, this)) 579
580 .on("keydown.bs.inputmask", $.proxy(this.keydownEvent, this)) 581 .on("keypress.bs.inputmask", $.proxy(this.keypressEvent, this)) 582 583 .on(pasteEventName, $.proxy(this.pasteEvent, this)) 584 } 585 586 //Helper Function for Caret positioning 587 Inputmask.prototype.caret = function(begin, end) { 588 if (this.$element.length === 0) return 589 if (typeof begin == 'number') { 590 end = (typeof end == 'number') ? end : begin 591 return this.$element.each(function() { 592 if (this.setSelectionRange) { 593 this.setSelectionRange(begin, end) 594 } else if (this.createTextRange) { 595 var range = this.createTextRange() 596 range.collapse(true) 597 range.moveEnd('character', end) 598 range.moveStart('character', begin) 599 range.select() 600 } 601 }) 602 } else { 603 if (this.$element[0].setSelectionRange) { 604 begin = this.$element[0].selectionStart 605 end = this.$element[0].selectionEnd 606 } else if (document.selection && document.selection.createRange) { 607 var range = document.selection.createRange() 608 begin = 0 - range.duplicate().moveStart('character', -100000) 609 end = begin + range.text.length 610 } 611 return { 612 begin: begin, 613 end: end 614 } 615 } 616 } 617 618 Inputmask.prototype.seekNext = function(pos) { 619 var len = this.mask.length 620 while (++pos <= len && !this.tests[pos]); 621 622 return pos 623 } 624 625 Inputmask.prototype.seekPrev = function(pos) { 626 while (--pos >= 0 && !this.tests[pos]); 627 628 return pos 629 } 630 631 Inputmask.prototype.shiftL = function(begin,end) { 632 var len = this.mask.length 633 634 if (begin < 0) return 635 636 for (var i = begin, j = this.seekNext(end); i < len; i++) { 637 if (this.tests[i]) { 638 if (j < len && this.tests[i].test(this.buffer[j])) { 639 this.buffer[i] = this.buffer[j] 640 this.buffer[j] = this.options.placeholder 641 } else 642 break 643 j = this.seekNext(j) 644 } 645 } 646 this.writeBuffer() 647 this.caret(Math.max(this.firstNonMaskPos, begin)) 648 } 649 650 Inputmask.prototype.shiftR = function(pos) { 651 var len = this.mask.length 652 653 for (var i = pos, c = this.options.placeholder; i < len; i++) { 654 if (this.tests[i]) { 655 var j = this.seekNext(i) 656 var t = this.buffer[i] 657 this.buffer[i] = c 658 if (j < len && this.tests[j].test(t)) 659 c = t 660 else 661 break 662 } 663 } 664 }, 665 666 Inputmask.prototype.unmask = function() { 667 this.$element 668 .unbind(".mask") 669 .removeData("inputmask") 670 } 671 672 Inputmask.prototype.focusEvent = function() { 673 this.focusText = this.$element.val() 674 var len = this.mask.length 675 var pos = this.checkVal() 676 this.writeBuffer() 677 678 var that = this 679 var moveCaret = function() { 680 if (pos == len) 681 that.caret(0, pos) 682 else 683 that.caret(pos) 684 } 685 686 moveCaret() 687 setTimeout(moveCaret, 50) 688 } 689 690 Inputmask.prototype.blurEvent = function() { 691 this.checkVal() 692 if (this.$element.val() !== this.focusText) 693 this.$element.trigger('change') 694 } 695 696 Inputmask.prototype.keydownEvent = function(e) { 697 var k = e.which 698 699 //backspace, delete, and escape get special treatment 700 if (k == 8 || k == 46 || (isIphone && k == 127)) { 701 var pos = this.caret(), 702 begin = pos.begin, 703 end = pos.end 704 705 if (end - begin === 0) { 706 begin = k != 46 ? this.seekPrev(begin) : (end = this.seekNext(begin - 1)) 707 end = k == 46 ? this.seekNext(end) : end 708 } 709 this.clearBuffer(begin, end) 710 this.shiftL(begin, end - 1) 711 712 return false 713 } else if (k == 27) {//escape 714 this.$element.val(this.focusText) 715 this.caret(0, this.checkVal()) 716 return false 717 } 718 } 719 720 Inputmask.prototype.keypressEvent = function(e) { 721 var len = this.mask.length 722 723 var k = e.which, 724 pos = this.caret() 725 726 if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {//Ignore 727 return true 728 } else if (k) { 729 if (pos.end - pos.begin !== 0) { 730 this.clearBuffer(pos.begin, pos.end) 731 this.shiftL(pos.begin, pos.end - 1) 732 } 733 734 var p = this.seekNext(pos.begin - 1) 735 if (p < len) { 736 var c = String.fromCharCode(k) 737 if (this.tests[p].test(c)) { 738 this.shiftR(p) 739 this.buffer[p] = c 740 this.writeBuffer() 741 var next = this.seekNext(p) 742 this.caret(next) 743 } 744 } 745 return false 746 } 747 } 748 749 Inputmask.prototype.pasteEvent = function() { 750 var that = this 751 752 setTimeout(function() { 753 that.caret(that.checkVal(true)) 754 }, 0) 755 } 756 757 Inputmask.prototype.clearBuffer = function(start, end) { 758 var len = this.mask.length 759 760 for (var i = start; i < end && i < len; i++) { 761 if (this.tests[i]) 762 this.buffer[i] = this.options.placeholder 763 } 764 } 765 766 Inputmask.prototype.writeBuffer = function() { 767 return this.$element.val(this.buffer.join('')).val() 768 } 769 770 Inputmask.prototype.checkVal = function(allow) { 771 var len = this.mask.length 772 //try to place characters where they belong 773 var test = this.$element.val() 774 var lastMatch = -1 775 776 for (var i = 0, pos = 0; i < len; i++) { 777 if (this.tests[i]) { 778 this.buffer[i] = this.options.placeholder 779 while (pos++ < test.length) { 780 var c = test.charAt(pos - 1) 781 if (this.tests[i].test(c)) { 782 this.buffer[i] = c 783 lastMatch = i 784 break 785 } 786 } 787 if (pos > test.length) 788 break 789 } else if (this.buffer[i] == test.charAt(pos) && i != this.partialPosition) { 790 pos++ 791 lastMatch = i 792 } 793 } 794 if (!allow && lastMatch + 1 < this.partialPosition) { 795 this.$element.val("") 796 this.clearBuffer(0, len) 797 } else if (allow || lastMatch + 1 >= this.partialPosition) { 798 this.writeBuffer() 799 if (!allow) this.$element.val(this.$element.val().substring(0, lastMatch + 1)) 800 } 801 return (this.partialPosition ? i : this.firstNonMaskPos) 802 } 803 804 805 // INPUTMASK PLUGIN DEFINITION 806 // =========================== 807 808 var old = $.fn.inputmask 809 810 $.fn.inputmask = function (options) { 811 return this.each(function () { 812 var $this = $(this) 813 var data = $this.data('bs.inputmask') 814 815 if (!data) $this.data('bs.inputmask', (data = new Inputmask(this, options))) 816 }) 817 } 818 819 $.fn.inputmask.Constructor = Inputmask 820 821 822 // INPUTMASK NO CONFLICT 823 // ==================== 824 825 $.fn.inputmask.noConflict = function () { 826 $.fn.inputmask = old 827 return this 828 } 829 830 831 // INPUTMASK DATA-API 832 // ================== 833 834 $(document).on('focus.bs.inputmask.data-api', '[data-mask]', function (e) { 835 var $this = $(this) 836 if ($this.data('bs.inputmask')) return 837 $this.inputmask($this.data()) 838 }) 839 840}(window.jQuery); 841 842/* =========================================================== 843 * Bootstrap: fileinput.js v3.1.3 844 * http://jasny.github.com/bootstrap/javascript/#fileinput 845 * ===========================================================
846 * Copyright 2012-2014 Arnold Daniels 847 * 848 * Licensed under the Apache License, Version 2.0 (the "License") 849 * you may not use this file except in compliance with the License. 850 * You may obtain a copy of the License at 851 * 852 * http://www.apache.org/licenses/LICENSE-2.0 853 * 854 * Unless required by applicable law or agreed to in writing, software 855 * distributed under the License is distributed on an "AS IS" BASIS, 856 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 857 * See the License for the specific language governing permissions and 858 * limitations under the License. 859 * ========================================================== */ 860 861+function ($) { "use strict"; 862 863 var isIE = window.navigator.appName == 'Microsoft Internet Explorer' 864 865 // FILEUPLOAD PUBLIC CLASS DEFINITION 866 // ================================= 867 868 var Fileinput = function (element, options) { 869 this.$element = $(element) 870 871 this.$input = this.$element.find(':file') 872 if (this.$input.length === 0) return 873 874 this.name = this.$input.attr('name') || options.name 875 876 this.$hidden = this.$element.find('input[type=hidden][name="' + this.name + '"]') 877 if (this.$hidden.length === 0) { 878 this.$hidden = $('<input type="hidden">').insertBefore(this.$input) 879 } 880 881 this.$preview = this.$element.find('.fileinput-preview') 882 var height = this.$preview.css('height') 883 if (this.$preview.css('display') !== 'inline' && height !== '0px' && height !== 'none') { 884 this.$preview.css('line-height', height) 885 } 886 887 this.original = { 888 exists: this.$element.hasClass('fileinput-exists'), 889 preview: this.$preview.html(), 890 hiddenVal: this.$hidden.val() 891 } 892 893 this.listen() 894 } 895 896 Fileinput.prototype.listen = function() { 897 this.$input.on('change.bs.fileinput', $.proxy(this.change, this)) 898 $(this.$input[0].form).on('reset.bs.fileinput', $.proxy(this.reset, this)) 899 900 this.$element.find('[data-trigger="fileinput"]').on('click.bs.fileinput', $.proxy(this.trigger, this)) 901 this.$element.find('[data-dismiss="fileinput"]').on('click.bs.fileinput', $.proxy(this.clear, this)) 902 }, 903 904 Fileinput.prototype.change = function(e) { 905 var files = e.target.files === undefined ? (e.target && e.target.value ? [{ name: e.target.value.replace(/^.+\\/, '')}] : []) : e.target.files 906 907 e.stopPropagation() 908 909 if (files.length === 0) { 910 this.clear() 911 return 912 } 913 914 this.$hidden.val('') 915 this.$hidden.attr('name', '') 916 this.$input.attr('name', this.name) 917 918 var file = files[0] 919 920 if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match(/^image\/(gif|png|jpeg)$/) : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") { 921 var reader = new FileReader() 922 var preview = this.$preview 923 var element = this.$element 924 925 reader.onload = function(re) { 926 var $img = $('<img>') 927 $img[0].src = re.target.result 928 files[0].result = re.target.result 929 930 element.find('.fileinput-filename').text(file.name) 931 932 // if parent has max-height, using `(max-)height: 100%` on child doesn't take padding and border into account 933 if (preview.css('max-height') != 'none') $img.css('max-height', parseInt(preview.css('max-height'), 10) - parseInt(preview.css('padding-top'), 10) - parseInt(preview.css('padding-bottom'), 10) - parseInt(preview.css('border-top'), 10) - parseInt(preview.css('border-bottom'), 10)) 934 935 preview.html($img) 936 element.addClass('fileinput-exists').removeClass('fileinput-new') 937 938 element.trigger('change.bs.fileinput', files) 939 } 940 941 reader.readAsDataURL(file) 942 } else { 943 this.$element.find('.fileinput-filename').text(file.name) 944 this.$preview.text(file.name) 945 946 this.$element.addClass('fileinput-exists').removeClass('fileinput-new') 947 948 this.$element.trigger('change.bs.fileinput') 949 } 950 }, 951 952 Fileinput.prototype.clear = function(e) { 953 if (e) e.preventDefault() 954 955 this.$hidden.val('') 956 this.$hidden.attr('name', this.name) 957 this.$input.attr('name', '') 958 959 //ie8+ doesn't support changing the value of input with type=file so clone instead 960 if (isIE) { 961 var inputClone = this.$input.clone(true); 962 this.$input.after(inputClone); 963 this.$input.remove(); 964 this.$input = inputClone; 965 } else { 966 this.$input.val('') 967 } 968 969 this.$preview.html('') 970 this.$element.find('.fileinput-filename').text('') 971 this.$element.addClass('fileinput-new').removeClass('fileinput-exists') 972 973 if (e !== undefined) { 974 this.$input.trigger('change') 975 this.$element.trigger('clear.bs.fileinput') 976 } 977 }, 978 979 Fileinput.prototype.reset = function() { 980 this.clear() 981 982 this.$hidden.val(this.original.hiddenVal) 983 this.$preview.html(this.original.preview) 984 this.$element.find('.fileinput-filename').text('') 985 986 if (this.original.exists) this.$element.addClass('fileinput-exists').removeClass('fileinput-new') 987 else this.$element.addClass('fileinput-new').removeClass('fileinput-exists') 988 989 this.$element.trigger('reset.bs.fileinput') 990 }, 991 992 Fileinput.prototype.trigger = function(e) { 993 this.$input.trigger('click') 994 e.preventDefault() 995 } 996 997 998 // FILEUPLOAD PLUGIN DEFINITION 999 // =========================== 1000 1001 var old = $.fn.fileinput 1002 1003 $.fn.fileinput = function (options) { 1004 return this.each(function () { 1005 var $this = $(this), 1006 data = $this.data('bs.fileinput') 1007 if (!data) $this.data('bs.fileinput', (data = new Fileinput(this, options))) 1008 if (typeof options == 'string') data[options]() 1009 }) 1010 } 1011 1012 $.fn.fileinput.Constructor = Fileinput 1013 1014 1015 // FILEINPUT NO CONFLICT 1016 // ==================== 1017 1018 $.fn.fileinput.noConflict = function () { 1019 $.fn.fileinput = old 1020 return this 1021 } 1022 1023 1024 // FILEUPLOAD DATA-API 1025 // ================== 1026
1027 $(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) { 1028 var $this = $(this) 1029 if ($this.data('bs.fileinput')) return 1030 $this.fileinput($this.data()) 1031 1032 var $target = $(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]'); 1033 if ($target.length > 0) { 1034 e.preventDefault() 1035 $target.trigger('click.bs.fileinput') 1036 } 1037 }) 1038 1039}(window.jQuery); 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060// Scroll shrink header added by Brandon 1061//$(window).on("scroll", function() { 1062// $("nav").toggleClass("nav-shrink", $(this).scrollTop() > 15) 1063// $("#mybrandlogo").toggleClass("brandlogo-shrink", $(this).scrollTop() > 15) 1064//}); 1065 1066//Go button show for search box 1067$(document).ready(function() { 1068 $('#searchinput').focus(function() { 1069 $('#searchgo').show(); 1070 }); 1071 1072 $('#searchinput').blur(function() { 1073 if( !$(this).val() ) { 1074 $('#searchgo').hide(); 1075 } 1076 }); 1077}); 1078 1079//Touch menu check 1080function touchmenucheck(e) { 1081 var touch = e.touches[0]; 1082 if (touch.pageX > 250) { 1083 var event = new MouseEvent('click', { 1084 view: window, 1085 bubbles: true, 1086 cancelable: true 1087 }); 1088 var mb = document.getElementById('NavbarToggle'); 1089 var dontcare = !mb.dispatchEvent(event); 1090 } 1091} 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106/* ======================================================================== 1107 * Bootstrap: bootstrap-dropdown-multilevel.js v1.0.0 1108 * http://getbootstrap.com/javascript/#dropdowns 1109 * ======================================================================== 1110 * Copyright 2011-2014 Twitter, Inc. 1111 * Copyright 2014 George Donev. 1112 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1113 * ======================================================================== */ 1114 1115 1116+function ($) { 1117 'use strict'; 1118 1119 // DROPDOWN CLASS DEFINITION 1120 // ========================= 1121 1122 var backdrop = '.dropdown-backdrop' 1123 var toggle = '[data-toggle=dropdown]' 1124 var Dropdown = function (element) { 1125 $(element).on('click.bs.dropdown', this.toggle) 1126 } 1127 1128 Dropdown.prototype.toggle = function (e) { 1129 var $this = $(this) 1130 1131 if ($this.is('.disabled, :disabled')) return 1132 1133 var $parent = getParent($this) 1134 var isActive = $parent.hasClass('open') 1135 1136 clearMenus($(this)) 1137 1138 if (!isActive) { 1139 if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 1140 // if mobile we use a backdrop because click events don't delegate 1141 $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus) 1142 } 1143 1144 var relatedTarget = { relatedTarget: this } 1145 $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) 1146 1147 if (e.isDefaultPrevented()) return 1148 1149 $parent 1150 .toggleClass('open') 1151 .trigger('shown.bs.dropdown', relatedTarget) 1152 1153 $this.focus(); 1154 1155 var $windowheight = window.innerHeight; 1156 var $lastheight = $parent.find('ul:first').height(); 1157 var $minheight = $windowheight-(($parent.find('ul:first').offset().top-$(window).scrollTop())+30); 1158 if ( getParent($parent).hasClass('navbar-nav') && ($lastheight > $minheight) && !$parent.hasClass('myaccountmenu') && !($('.hidden-xs').css('display')=='none') ) { 1159 $parent.find('ul:first').height($minheight); 1160 } 1161 } else { 1162 $parent.find('ul:first').css('height','auto'); 1163 } 1164 1165 return false 1166 } 1167 1168 Dropdown.prototype.keydown = function (e) { 1169 if (!/(38|40|27)/.test(e.keyCode)) return 1170 1171 var $this = $(this) 1172 1173 e.preventDefault() 1174 e.stopPropagation() 1175 1176 if ($this.is('.disabled, :disabled')) return 1177 1178 var $parent = getParent($this) 1179 var isActive = $parent.hasClass('open') 1180 1181 if (!isActive || (isActive && e.keyCode == 27)) { 1182 if (e.which == 27) $parent.find(toggle).focus() 1183 return $this.click() 1184 } 1185 1186 var desc = ' li:not(.divider):visible a' 1187 var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc) 1188 1189 if (!$items.length) return 1190 1191 var index = $items.index($items.filter(':focus')) 1192 1193 if (e.keyCode == 38 && index > 0) index-- // up 1194 if (e.keyCode == 40 && index < $items.length - 1) index++ // down 1195 if (!~index) index = 0 1196 1197 $items.eq(index).focus() 1198 } 1199 1200 function clearMenus(e) { 1201 $(backdrop).remove() 1202 $(toggle).each(function () { 1203 var $parent = getParent($(this)); 1204 var $childMenus = $parent.find('.dropdown'); 1205 if ($childMenus.length) { 1206 var $DoNotCloseThisOne = false;
1207 $childMenus.each(function(){ 1208 if ($($(this).find(':first-child')[0]).is(e)) $DoNotCloseThisOne = true; 1209 }) 1210 if ($DoNotCloseThisOne) return 1211 } 1212 var relatedTarget = { relatedTarget: this } 1213 if (!$parent.hasClass('open')) return 1214 $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) 1215 if (e.isDefaultPrevented()) return 1216 $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) 1217 }) 1218 } 1219 1220 function getParent($this) { 1221 var selector = $this.attr('data-target') 1222 1223 if (!selector) { 1224 selector = $this.attr('href') 1225 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 1226 } 1227 1228 var $parent = selector && $(selector) 1229 1230 return $parent && $parent.length ? $parent : $this.parent() 1231 } 1232 1233 1234 // DROPDOWN PLUGIN DEFINITION 1235 // ========================== 1236 1237 //var old = $.fn.dropdown 1238 1239 $.fn.dropdown = function (option) { 1240 return this.each(function () { 1241 var $this = $(this) 1242 var data = $this.data('bs.dropdown') 1243 1244 if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) 1245 if (typeof option == 'string') data[option].call($this) 1246 }) 1247 } 1248 1249 $.fn.dropdown.Constructor = Dropdown 1250 1251 1252 // DROPDOWN NO CONFLICT 1253 // ==================== 1254 1255 $.fn.dropdown.noConflict = function () { 1256 //$.fn.dropdown = old 1257 return this 1258 } 1259 1260 1261 1262 $(document) 1263 .off('click.bs.dropdown.data-api', "**") 1264 .off('keydown.bs.dropdown.data-api', "**") 1265 1266 // APPLY TO STANDARD DROPDOWN ELEMENTS 1267 // =================================== 1268 $(document) 1269 .on('click.bs.dropdown.data-api', clearMenus) 1270 .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) 1271 .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) 1272 .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown) 1273 1274}(jQuery); 1275 1276 1277function emailCheck (emailStr) { 1278 var emailPat=/^(.+)@(.+)$/; 1279 var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"; 1280 var validChars="\[^\\s" + specialChars + "\]"; 1281 var quotedUser="(\"[^\"]*\")"; 1282 var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/; 1283 var atom=validChars + '+'; 1284 var word="(" + atom + "|" + quotedUser + ")"; 1285 var userPat=new RegExp("^" + word + "(\\." + word + ")*$"); 1286 var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$"); 1287 var matchArray=emailStr.match(emailPat); 1288 if (matchArray==null) { 1289 alert("Email address seems incorrect (check @ and .'s)"); 1290 return false; 1291 } 1292 var user=matchArray[1]; 1293 var domain=matchArray[2]; 1294 if (user.match(userPat)==null) { 1295 alert("The username doesn't seem to be valid."); 1296 return false; 1297 } 1298 var IPArray=domain.match(ipDomainPat); 1299 if (IPArray!=null) { 1300 for (var i=1;i<=4;i++) { 1301 if (IPArray[i]>255) { 1302 alert("Destination IP address is invalid!"); 1303 return false; 1304 } 1305 } 1306 return true; 1307 } 1308 var domainArray=domain.match(domainPat); 1309 if (domainArray==null) { 1310 alert("The domain name doesn't seem to be valid."); 1311 return false; 1312 } 1313 var atomPat=new RegExp(atom,"g"); 1314 var domArr=domain.match(atomPat); 1315 var len=domArr.length; 1316 if ((domArr[domArr.length-1] != "info") && 1317 (domArr[domArr.length-1] != "name") && 1318 (domArr[domArr.length-1] != "arpa") && 1319 (domArr[domArr.length-1] != "coop") && 1320 (domArr[domArr.length-1] != "aero")) { 1321 if (domArr[domArr.length-1].length<2 || 1322 domArr[domArr.length-1].length>3) { 1323 alert("The address must end in a three-letter domain, or two letter country."); 1324 return false; 1325 } 1326 } 1327 if (len<2) { 1328 var errStr="This address is missing a hostname!"; 1329 alert(errStr); 1330 return false; 1331 } 1332 return true; 1333} 1334function UPTvalidateform(thisform) { 1335 if (thisform.val_1.value=="") { 1336 alert("Please enter a value for First Name"); 1337 return(true); 1338 } 1339 if (emailCheck(thisform.email.value)) { 1340 /*if (document.getElementById('unsubscribe') 1341 && !document.getElementById('unsubscribe').checked) { 1342 } else { 1343 }*/ 1344 return false; 1345 } else { 1346 return true; 1347 } 1348} 1349 1350 1351 1352/** 1353 * Fire an event handler to the specified node. Event handlers can detect that the event was fired programatically 1354 * by testing for a 'synthetic=true' property on the event object 1355 * @param {HTMLNode} node The node to fire the event handler on. 1356 * @param {String}
1356 eventName The name of the event without the "on" (e.g., "focus") 1357 */ 1358function fireEvent(node, eventName) { 1359 // Make sure we use the ownerDocument from the provided node to avoid cross-window problems 1360 var doc; 1361 if (node.ownerDocument) { 1362 doc = node.ownerDocument; 1363 } else if (node.nodeType == 9){ 1364 // the node may be the document itself, nodeType 9 = DOCUMENT_NODE 1365 doc = node; 1366 } else { 1367 throw new Error("Invalid node passed to fireEvent: " + node.id); 1368 } 1369 1370 if (node.dispatchEvent) { 1371 // Gecko-style approach (now the standard) takes more work 1372 var eventClass = ""; 1373 1374 // Different events have different event classes. 1375 // If this switch statement can't map an eventName to an eventClass, 1376 // the event firing is going to fail. 1377 switch (eventName) { 1378 case "click": // Dispatching of 'click' appears to not work correctly in Safari. Use 'mousedown' or 'mouseup' instead. 1379 case "mousedown": 1380 case "mouseup": 1381 eventClass = "MouseEvents"; 1382 break; 1383 1384 case "focus": 1385 case "change": 1386 case "blur": 1387 case "select": 1388 eventClass = "HTMLEvents"; 1389 break; 1390 1391 default: 1392 throw "fireEvent: Couldn't find an event class for event '" + eventName + "'."; 1393 break; 1394 } 1395 var event = doc.createEvent(eventClass); 1396 event.initEvent(eventName, true, true); // All events created as bubbling and cancelable. 1397 1398 event.synthetic = true; // allow detection of synthetic events 1399 // The second parameter says go ahead with the default action 1400 node.dispatchEvent(event, true); 1401 } else if (node.fireEvent) { 1402 // IE-old school style, you can drop this if you don't need to support IE8 and lower 1403 var event = doc.createEventObject(); 1404 event.synthetic = true; // allow detection of synthetic events 1405 node.fireEvent("on" + eventName, event); 1406 } 1407};
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.