vendor: 70,059 bytes, lines 1-2320
1/*! 2 * Bootstrap v3.3.4 (http://getbootstrap.com) 3 * Copyright 2011-2015 Twitter, Inc. 4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 */ 6 7/*! 8 * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=df21da690e89b4e4f12d) 9 * Config saved to config.json and https://gist.github.com/df21da690e89b4e4f12d 10 */ 11if (typeof jQuery === 'undefined') { 12 throw new Error('Bootstrap\'s JavaScript requires jQuery') 13} 14+function ($) { 15 'use strict'; 16 var version = $.fn.jquery.split(' ')[0].split('.') 17 if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) { 18 throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher') 19 } 20}(jQuery); 21 22/* ======================================================================== 23 * Bootstrap: alert.js v3.3.2 24 * http://getbootstrap.com/javascript/#alerts 25 * ======================================================================== 26 * Copyright 2011-2015 Twitter, Inc. 27 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 28 * ======================================================================== */ 29 30 31+function ($) { 32 'use strict'; 33 34 // ALERT CLASS DEFINITION 35 // ====================== 36 37 var dismiss = '[data-dismiss="alert"]' 38 var Alert = function (el) { 39 $(el).on('click', dismiss, this.close) 40 } 41 42 Alert.VERSION = '3.3.2' 43 44 Alert.TRANSITION_DURATION = 150 45 46 Alert.prototype.close = function (e) { 47 var $this = $(this) 48 var selector = $this.attr('data-target') 49 50 if (!selector) { 51 selector = $this.attr('href') 52 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 53 } 54 55 var $parent = $(selector) 56 57 if (e) e.preventDefault() 58 59 if (!$parent.length) { 60 $parent = $this.closest('.alert') 61 } 62 63 $parent.trigger(e = $.Event('close.bs.alert')) 64 65 if (e.isDefaultPrevented()) return 66 67 $parent.removeClass('in') 68 69 function removeElement() { 70 // detach from parent, fire event then clean up data 71 $parent.detach().trigger('closed.bs.alert').remove() 72 } 73 74 $.support.transition && $parent.hasClass('fade') ? 75 $parent 76 .one('bsTransitionEnd', removeElement) 77 .emulateTransitionEnd(Alert.TRANSITION_DURATION) : 78 removeElement() 79 } 80 81 82 // ALERT PLUGIN DEFINITION 83 // ======================= 84 85 function Plugin(option) { 86 return this.each(function () { 87 var $this = $(this) 88 var data = $this.data('bs.alert') 89 90 if (!data) $this.data('bs.alert', (data = new Alert(this))) 91 if (typeof option == 'string') data[option].call($this) 92 }) 93 } 94 95 var old = $.fn.alert 96 97 $.fn.alert = Plugin 98 $.fn.alert.Constructor = Alert 99 100 101 // ALERT NO CONFLICT 102 // ================= 103 104 $.fn.alert.noConflict = function () { 105 $.fn.alert = old 106 return this 107 } 108 109 110 // ALERT DATA-API 111 // ============== 112 113 $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 114 115}(jQuery); 116 117/* ======================================================================== 118 * Bootstrap: button.js v3.3.2 119 * http://getbootstrap.com/javascript/#buttons 120 * ======================================================================== 121 * Copyright 2011-2015 Twitter, Inc. 122 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 123 * ======================================================================== */ 124 125 126+function ($) { 127 'use strict'; 128 129 // BUTTON PUBLIC CLASS DEFINITION 130 // ============================== 131 132 var Button = function (element, options) { 133 this.$element = $(element) 134 this.options = $.extend({}, Button.DEFAULTS, options) 135 this.isLoading = false 136 } 137 138 Button.VERSION = '3.3.2' 139 140 Button.DEFAULTS = { 141 loadingText: 'loading...' 142 } 143 144 Button.prototype.setState = function (state) { 145 var d = 'disabled' 146 var $el = this.$element 147 var val = $el.is('input') ? 'val' : 'html' 148 var data = $el.data() 149 150 state = state + 'Text' 151 152 if (data.resetText == null) $el.data('resetText', $el[val]()) 153 154 // push to event loop to allow forms to submit 155 setTimeout($.proxy(function () { 156 $el[val](data[state] == null ? this.options[state] : data[state]) 157 158 if (state == 'loadingText') { 159 this.isLoading = true 160 $el.addClass(d).attr(d, d) 161 } else if (this.isLoading) { 162 this.isLoading = false 163 $el.removeClass(d).removeAttr(d) 164 } 165 }, this), 0) 166 } 167 168 Button.prototype.toggle = function () { 169 var changed = true 170 var $parent = this.$element.closest('[data-toggle="buttons"]') 171 172 if ($parent.length) { 173 var $input = this.$element.find('input') 174 if ($input.prop('type') == 'radio') { 175 if ($input.prop('checked') && this.$element.hasClass('active')) changed = false 176 else $parent.find('.active').removeClass('active') 177 } 178 if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') 179 } else { 180 this.$element.attr('aria-pressed', !this.$element.hasClass('active')) 181 } 182 183 if (changed) this.$element.toggleClass('active') 184 } 185 186 187 // BUTTON PLUGIN DEFINITION 188 // ======================== 189 190 function Plugin(option) { 191 return this.each(function () { 192 var $this = $(this) 193 var data = $this.data('bs.button') 194 var options = typeof option == 'object' && option 195 196 if (!data) $this.data('bs.button', (data = new Button(this, options))) 197 198 if (option == 'toggle') data.toggle() 199 else if (option) data.setState(option) 200 }) 201 } 202 203 var old = $.fn.button 204 205 $.fn.button = Plugin 206 $.fn.button.Constructor = Button 207 208 209 // BUTTON NO CONFLICT 210 // ================== 211 212 $.fn.button.noConflict = function () { 213 $.fn.button = old 214 return this 215 } 216 217 218 // BUTTON DATA-API 219 // =============== 220 221 $(document) 222 .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { 223 var $btn = $(e.target) 224 if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 225 Plugin.call($btn, 'toggle') 226 e.preventDefault() 227 }) 228 .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { 229 $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) 230 }) 231 232}(jQuery); 233 234/* ======================================================================== 235 * Bootstrap: carousel.js v3.3.2 236 * http://getbootstrap.com/javascript/#carousel 237 * ======================================================================== 238 * Copyright 2011-2015 Twitter, Inc. 239 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 240 * ======================================================================== */ 241 242 243+function ($) { 244 'use strict'; 245 246 // CAROUSEL CLASS DEFINITION 247 // ========================= 248 249 var Carousel = function (element, options) { 250 this.$element = $(element) 251 this.$indicators = this.$element.find('.carousel-indicators') 252 this.options = options 253 this.paused = null 254 this.sliding = null 255 this.interval = null 256 this.$active = null 257 this.$items = null 258 259 this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) 260 261 this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element 262 .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) 263 .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) 264 } 265 266 Carousel.VERSION = '3.3.2' 267 268 Carousel.TRANSITION_DURATION = 600 269 270 Carousel.DEFAULTS = { 271 interval: 5000, 272 pause: 'hover', 273 wrap: true, 274 keyboard: true 275 } 276 277 Carousel.prototype.keydown = function (e) { 278 if (/input|textarea/i.test(e.target.tagName)) return 279 switch (e.which) { 280 case 37: this.prev(); break 281 case 39: this.next(); break 282 default: return 283 } 284 285 e.preventDefault() 286 } 287 288 Carousel.prototype.cycle = function (e) { 289 e || (this.paused = false) 290 291 this.interval && clearInterval(this.interval) 292 293 this.options.interval 294 && !this.paused 295 && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 296 297 return this 298 } 299 300 Carousel.prototype.getItemIndex = function (item) { 301 this.$items = item.parent().children('.item') 302 return this.$items.index(item || this.$active) 303 } 304 305 Carousel.prototype.getItemForDirection = function (direction, active) { 306 var activeIndex = this.getItemIndex(active) 307 var willWrap = (direction == 'prev' && activeIndex === 0) 308 || (direction == 'next' && activeIndex == (this.$items.length - 1)) 309 if (willWrap && !this.options.wrap) return active 310 var delta = direction == 'prev' ? -1 : 1 311 var itemIndex = (activeIndex + delta) % this.$items.length 312 return this.$items.eq(itemIndex) 313 } 314 315 Carousel.prototype.to = function (pos) { 316 var that = this 317 var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) 318 319 if (pos > (this.$items.length - 1) || pos < 0) return 320 321 if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" 322 if (activeIndex == pos) return this.pause().cycle() 323 324 return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) 325 } 326 327 Carousel.prototype.pause = function (e) { 328 e || (this.paused = true) 329 330 if (this.$element.find('.next, .prev').length && $.support.transition) { 331 this.$element.trigger($.support.transition.end) 332 this.cycle(true) 333 } 334 335 this.interval = clearInterval(this.interval) 336 337 return this 338 } 339 340 Carousel.prototype.next = function () { 341 if (this.sliding) return 342 return this.slide('next') 343 } 344 345 Carousel.prototype.prev = function () { 346 if (this.sliding) return 347 return this.slide('prev') 348 } 349 350 Carousel.prototype.slide = function (type, next) { 351 var $active = this.$element.find('.item.active') 352 var $next = next || this.getItemForDirection(type, $active) 353 var isCycling = this.interval 354 var direction = type == 'next' ? 'left' : 'right' 355 var that = this 356 357 if ($next.hasClass('active')) return (this.sliding = false) 358 359 var relatedTarget = $next[0] 360 var slideEvent = $.Event('slide.bs.carousel', { 361 relatedTarget: relatedTarget, 362 direction: direction 363 }) 364 this.$element.trigger(slideEvent) 365 if (slideEvent.isDefaultPrevented()) return 366 367 this.sliding = true 368 369 isCycling && this.pause() 370 371 if (this.$indicators.length) { 372 this.$indicators.find('.active').removeClass('active') 373 var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) 374 $nextIndicator && $nextIndicator.addClass('active') 375 } 376 377 var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" 378 if ($.support.transition && this.$element.hasClass('slide')) { 379 $next.addClass(type) 380 $next[0].offsetWidth // force reflow 381 $active.addClass(direction) 382 $next.addClass(direction) 383 $active 384 .one('bsTransitionEnd', function () { 385 $next.removeClass([type, direction].join(' ')).addClass('active') 386 $active.removeClass(['active', direction].join(' ')) 387 that.sliding = false 388 setTimeout(function () { 389 that.$element.trigger(slidEvent) 390 }, 0) 391 }) 392 .emulateTransitionEnd(Carousel.TRANSITION_DURATION) 393 } else { 394 $active.removeClass('active') 395 $next.addClass('active') 396 this.sliding = false 397 this.$element.trigger(slidEvent) 398 } 399 400 isCycling && this.cycle() 401 402 return this 403 } 404 405 406 // CAROUSEL PLUGIN DEFINITION 407 // ========================== 408 409 function Plugin(option) { 410 return this.each(function () { 411 var $this = $(this) 412 var data = $this.data('bs.carousel') 413 var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) 414 var action = typeof option == 'string' ? option : options.slide 415 416 if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) 417 if (typeof option == 'number') data.to(option) 418 else if (action) data[action]() 419 else if (options.interval) data.pause().cycle() 420 }) 421 } 422 423 var old = $.fn.carousel 424 425 $.fn.carousel = Plugin 426 $.fn.carousel.Constructor = Carousel 427 428 429 // CAROUSEL NO CONFLICT 430 // ==================== 431 432 $.fn.carousel.noConflict = function () { 433 $.fn.carousel = old 434 return this 435 } 436 437 438 // CAROUSEL DATA-API 439 // ================= 440 441 var clickHandler = function (e) { 442 var href 443 var $this = $(this) 444 var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 445 if (!$target.hasClass('carousel')) return 446 var options = $.extend({}, $target.data(), $this.data()) 447 var slideIndex = $this.attr('data-slide-to') 448 if (slideIndex) options.interval = false 449 450 Plugin.call($target, options) 451 452 if (slideIndex) { 453 $target.data('bs.carousel').to(slideIndex) 454 } 455 456 e.preventDefault() 457 } 458 459 $(document) 460 .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) 461 .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) 462 463 $(window).on('load', function () { 464 $('[data-ride="carousel"]').each(function () { 465 var $carousel = $(this) 466 Plugin.call($carousel, $carousel.data()) 467 }) 468 }) 469 470}(jQuery); 471 472/* ======================================================================== 473 * Bootstrap: dropdown.js v3.3.2 474 * http://getbootstrap.com/javascript/#dropdowns 475 * ======================================================================== 476 * Copyright 2011-2015 Twitter, Inc. 477 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 478 * ======================================================================== */ 479 480 481+function ($) { 482 'use strict'; 483 484 // DROPDOWN CLASS DEFINITION 485 // ========================= 486 487 var backdrop = '.dropdown-backdrop' 488 var toggle = '[data-toggle="dropdown"]' 489 var Dropdown = function (element) { 490 $(element).on('click.bs.dropdown', this.toggle) 491 } 492 493 Dropdown.VERSION = '3.3.2' 494 495 Dropdown.prototype.toggle = function (e) { 496 var $this = $(this) 497 498 if ($this.is('.disabled, :disabled')) return 499 500 var $parent = getParent($this) 501 var isActive = $parent.hasClass('open') 502 503 clearMenus() 504 505 if (!isActive) { 506 if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 507 // if mobile we use a backdrop because click events don't delegate 508 $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus) 509 } 510 511 var relatedTarget = { relatedTarget: this } 512 $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) 513 514 if (e.isDefaultPrevented()) return 515 516 $this 517 .trigger('focus') 518 .attr('aria-expanded', 'true') 519 520 $parent 521 .toggleClass('open') 522 .trigger('shown.bs.dropdown', relatedTarget) 523 } 524 525 return false 526 } 527 528 Dropdown.prototype.keydown = function (e) { 529 if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return 530 531 var $this = $(this) 532 533 e.preventDefault() 534 e.stopPropagation() 535 536 if ($this.is('.disabled, :disabled')) return 537 538 var $parent = getParent($this) 539 var isActive = $parent.hasClass('open') 540 541 if ((!isActive && e.which != 27) || (isActive && e.which == 27)) { 542 if (e.which == 27) $parent.find(toggle).trigger('focus') 543 return $this.trigger('click') 544 } 545 546 var desc = ' li:not(.disabled):visible a' 547 var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc) 548 549 if (!$items.length) return 550 551 var index = $items.index(e.target) 552 553 if (e.which == 38 && index > 0) index-- // up 554 if (e.which == 40 && index < $items.length - 1) index++ // down 555 if (!~index) index = 0 556 557 $items.eq(index).trigger('focus') 558 } 559 560 function clearMenus(e) { 561 if (e && e.which === 3) return 562 $(backdrop).remove() 563 $(toggle).each(function () { 564 var $this = $(this) 565 var $parent = getParent($this) 566 var relatedTarget = { relatedTarget: this } 567 568 if (!$parent.hasClass('open')) return 569 570 $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) 571 572 if (e.isDefaultPrevented()) return 573 574 $this.attr('aria-expanded', 'false') 575 $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) 576 }) 577 } 578 579 function getParent($this) { 580 var selector = $this.attr('data-target') 581 582 if (!selector) { 583 selector = $this.attr('href') 584 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 585 } 586 587 var $parent = selector && $(selector) 588 589 return $parent && $parent.length ? $parent : $this.parent() 590 } 591 592 593 // DROPDOWN PLUGIN DEFINITION 594 // ========================== 595 596 function Plugin(option) { 597 return this.each(function () { 598 var $this = $(this) 599 var data = $this.data('bs.dropdown') 600 601 if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) 602 if (typeof option == 'string') data[option].call($this) 603 }) 604 } 605 606 var old = $.fn.dropdown 607 608 $.fn.dropdown = Plugin 609 $.fn.dropdown.Constructor = Dropdown 610 611 612 // DROPDOWN NO CONFLICT 613 // ==================== 614 615 $.fn.dropdown.noConflict = function () { 616 $.fn.dropdown = old 617 return this 618 } 619 620 621 // APPLY TO STANDARD DROPDOWN ELEMENTS 622 // =================================== 623 624 $(document) 625 .on('click.bs.dropdown.data-api', clearMenus) 626 .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) 627 .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) 628 .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) 629 .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown) 630 .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown) 631 632}(jQuery); 633 634/* ======================================================================== 635 * Bootstrap: modal.js v3.3.2 636 * http://getbootstrap.com/javascript/#modals 637 * ======================================================================== 638 * Copyright 2011-2015 Twitter, Inc. 639 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 640 * ======================================================================== */ 641 642 643+function ($) { 644 'use strict'; 645 646 // MODAL CLASS DEFINITION 647 // ====================== 648 649 var Modal = function (element, options) { 650 this.options = options 651 this.$body = $(document.body) 652 this.$element = $(element) 653 this.$dialog = this.$element.find('.modal-dialog') 654 this.$backdrop = null 655 this.isShown = null 656 this.originalBodyPad = null 657 this.scrollbarWidth = 0 658 this.ignoreBackdropClick = false 659 660 if (this.options.remote) { 661 this.$element 662 .find('.modal-content') 663 .load(this.options.remote, $.proxy(function () { 664 this.$element.trigger('loaded.bs.modal') 665 }, this)) 666 } 667 } 668 669 Modal.VERSION = '3.3.2' 670 671 Modal.TRANSITION_DURATION = 300 672 Modal.BACKDROP_TRANSITION_DURATION = 150 673 674 Modal.DEFAULTS = { 675 backdrop: true, 676 keyboard: true, 677 show: true 678 } 679 680 Modal.prototype.toggle = function (_relatedTarget) { 681 return this.isShown ? this.hide() : this.show(_relatedTarget) 682 } 683 684 Modal.prototype.show = function (_relatedTarget) { 685 var that = this 686 var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) 687 688 this.$element.trigger(e) 689 690 if (this.isShown || e.isDefaultPrevented()) return 691 692 this.isShown = true 693 694 this.checkScrollbar() 695 this.setScrollbar() 696 this.$body.addClass('modal-open') 697 698 this.escape() 699 this.resize() 700 701 this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) 702 703 this.$dialog.on('mousedown.dismiss.bs.modal', function () { 704 that.$element.one('mouseup.dismiss.bs.modal', function (e) { 705 if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true 706 }) 707 }) 708 709 this.backdrop(function () { 710 var transition = $.support.transition && that.$element.hasClass('fade') 711 712 if (!that.$element.parent().length) { 713 that.$element.appendTo(that.$body) // don't move modals dom position 714 } 715 716 that.$element 717 .show() 718 .scrollTop(0) 719 720 that.adjustDialog() 721 722 if (transition) { 723 that.$element[0].offsetWidth // force reflow 724 } 725 726 that.$element 727 .addClass('in') 728 .attr('aria-hidden', false) 729 730 that.enforceFocus() 731 732 var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) 733 734 transition ? 735 that.$dialog // wait for modal to slide in 736 .one('bsTransitionEnd', function () { 737 that.$element.trigger('focus').trigger(e) 738 }) 739 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 740 that.$element.trigger('focus').trigger(e) 741 }) 742 } 743 744 Modal.prototype.hide = function (e) { 745 if (e) e.preventDefault() 746 747 e = $.Event('hide.bs.modal') 748 749 this.$element.trigger(e) 750 751 if (!this.isShown || e.isDefaultPrevented()) return 752 753 this.isShown = false 754 755 this.escape() 756 this.resize() 757 758 $(document).off('focusin.bs.modal') 759 760 this.$element 761 .removeClass('in') 762 .attr('aria-hidden', true) 763 .off('click.dismiss.bs.modal') 764 .off('mouseup.dismiss.bs.modal') 765 766 this.$dialog.off('mousedown.dismiss.bs.modal') 767 768 $.support.transition && this.$element.hasClass('fade') ? 769 this.$element 770 .one('bsTransitionEnd', $.proxy(this.hideModal, this)) 771 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 772 this.hideModal() 773 } 774 775 Modal.prototype.enforceFocus = function () { 776 $(document) 777 .off('focusin.bs.modal') // guard against infinite focus loop 778 .on('focusin.bs.modal', $.proxy(function (e) { 779 if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { 780 this.$element.trigger('focus') 781 } 782 }, this)) 783 } 784 785 Modal.prototype.escape = function () { 786 if (this.isShown && this.options.keyboard) { 787 this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { 788 e.which == 27 && this.hide() 789 }, this)) 790 } else if (!this.isShown) { 791 this.$element.off('keydown.dismiss.bs.modal') 792 } 793 } 794 795 Modal.prototype.resize = function () { 796 if (this.isShown) { 797 $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) 798 } else { 799 $(window).off('resize.bs.modal') 800 } 801 } 802 803 Modal.prototype.hideModal = function () { 804 var that = this 805 this.$element.hide() 806 this.backdrop(function () { 807 that.$body.removeClass('modal-open') 808 that.resetAdjustments() 809 that.resetScrollbar() 810 that.$element.trigger('hidden.bs.modal') 811 }) 812 } 813 814 Modal.prototype.removeBackdrop = function () { 815 this.$backdrop && this.$backdrop.remove() 816 this.$backdrop = null 817 } 818 819 Modal.prototype.backdrop = function (callback) { 820 var that = this 821 var animate = this.$element.hasClass('fade') ? 'fade' : '' 822 823 if (this.isShown && this.options.backdrop) { 824 var doAnimate = $.support.transition && animate 825 826 this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') 827 .appendTo(this.$body) 828 829 this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { 830 if (this.ignoreBackdropClick) { 831 this.ignoreBackdropClick = false 832 return 833 } 834 if (e.target !== e.currentTarget) return 835 this.options.backdrop == 'static' 836 ? this.$element[0].focus() 837 : this.hide() 838 }, this)) 839 840 if (doAnimate) this.$backdrop[0].offsetWidth // force reflow 841 842 this.$backdrop.addClass('in') 843 844 if (!callback) return 845 846 doAnimate ? 847 this.$backdrop 848 .one('bsTransitionEnd', callback) 849 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : 850 callback() 851 852 } else if (!this.isShown && this.$backdrop) { 853 this.$backdrop.removeClass('in') 854 855 var callbackRemove = function () { 856 that.removeBackdrop() 857 callback && callback() 858 } 859 $.support.transition && this.$element.hasClass('fade') ? 860 this.$backdrop 861 .one('bsTransitionEnd', callbackRemove) 862 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : 863 callbackRemove() 864 865 } else if (callback) { 866 callback() 867 } 868 } 869 870 // these following methods are used to handle overflowing modals 871 872 Modal.prototype.handleUpdate = function () { 873 this.adjustDialog() 874 } 875 876 Modal.prototype.adjustDialog = function () { 877 var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight 878 879 this.$element.css({ 880 paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', 881 paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' 882 }) 883 } 884 885 Modal.prototype.resetAdjustments = function () { 886 this.$element.css({ 887 paddingLeft: '', 888 paddingRight: '' 889 }) 890 } 891 892 Modal.prototype.checkScrollbar = function () { 893 var fullWindowWidth = window.innerWidth 894 if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 895 var documentElementRect = document.documentElement.getBoundingClientRect() 896 fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) 897 } 898 this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth 899 this.scrollbarWidth = this.measureScrollbar() 900 } 901 902 Modal.prototype.setScrollbar = function () { 903 var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) 904 this.originalBodyPad = document.body.style.paddingRight || '' 905 if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) 906 } 907 908 Modal.prototype.resetScrollbar = function () { 909 this.$body.css('padding-right', this.originalBodyPad) 910 } 911 912 Modal.prototype.measureScrollbar = function () { // thx walsh 913 var scrollDiv = document.createElement('div') 914 scrollDiv.className = 'modal-scrollbar-measure' 915 this.$body.append(scrollDiv) 916 var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth 917 this.$body[0].removeChild(scrollDiv) 918 return scrollbarWidth 919 } 920 921 922 // MODAL PLUGIN DEFINITION 923 // ======================= 924 925 function Plugin(option, _relatedTarget) { 926 return this.each(function () { 927 var $this = $(this) 928 var data = $this.data('bs.modal') 929 var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) 930 931 if (!data) $this.data('bs.modal', (data = new Modal(this, options))) 932 if (typeof option == 'string') data[option](_relatedTarget) 933 else if (options.show) data.show(_relatedTarget) 934 }) 935 } 936 937 var old = $.fn.modal 938 939 $.fn.modal = Plugin 940 $.fn.modal.Constructor = Modal 941 942 943 // MODAL NO CONFLICT 944 // ================= 945 946 $.fn.modal.noConflict = function () { 947 $.fn.modal = old 948 return this 949 } 950 951 952 // MODAL DATA-API 953 // ============== 954 955 $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { 956 var $this = $(this) 957 var href = $this.attr('href') 958 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 959 var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) 960 961 if ($this.is('a')) e.preventDefault() 962 963 $target.one('show.bs.modal', function (showEvent) { 964 if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown 965 $target.one('hidden.bs.modal', function () { 966 $this.is(':visible') && $this.trigger('focus') 967 }) 968 }) 969 Plugin.call($target, option, this) 970 }) 971 972}(jQuery); 973 974/* ======================================================================== 975 * Bootstrap: tooltip.js v3.3.2 976 * http://getbootstrap.com/javascript/#tooltip 977 * Inspired by the original jQuery.tipsy by Jason Frame 978 * ======================================================================== 979 * Copyright 2011-2015 Twitter, Inc. 980 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 981 * ======================================================================== */ 982 983 984+function ($) { 985 'use strict'; 986 987 // TOOLTIP PUBLIC CLASS DEFINITION 988 // =============================== 989 990 var Tooltip = function (element, options) { 991 this.type = null 992 this.options = null 993 this.enabled = null 994 this.timeout = null 995 this.hoverState = null 996 this.$element = null 997 998 this.init('tooltip', element, options) 999 } 1000 1001 Tooltip.VERSION = '3.3.2' 1002 1003 Tooltip.TRANSITION_DURATION = 150 1004 1005 Tooltip.DEFAULTS = { 1006 animation: true, 1007 placement: 'top', 1008 selector: false, 1009 template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', 1010 trigger: 'hover focus', 1011 title: '', 1012 delay: 0, 1013 html: false, 1014 container: false, 1015 viewport: { 1016 selector: 'body', 1017 padding: 0 1018 } 1019 } 1020 1021 Tooltip.prototype.init = function (type, element, options) { 1022 this.enabled = true 1023 this.type = type 1024 this.$element = $(element) 1025 this.options = this.getOptions(options) 1026 this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport) 1027 1028 if (this.$element[0] instanceof document.constructor && !this.options.selector) { 1029 throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') 1030 } 1031 1032 var triggers = this.options.trigger.split(' ') 1033 1034 for (var i = triggers.length; i--;) { 1035 var trigger = triggers[i] 1036 1037 if (trigger == 'click') { 1038 this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) 1039 } else if (trigger != 'manual') { 1040 var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' 1041 var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' 1042 1043 this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) 1044 this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) 1045 } 1046 } 1047 1048 this.options.selector ? 1049 (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : 1050 this.fixTitle() 1051 } 1052 1053 Tooltip.prototype.getDefaults = function () { 1054 return Tooltip.DEFAULTS 1055 } 1056 1057 Tooltip.prototype.getOptions = function (options) { 1058 options = $.extend({}, this.getDefaults(), this.$element.data(), options) 1059 1060 if (options.delay && typeof options.delay == 'number') { 1061 options.delay = { 1062 show: options.delay, 1063 hide: options.delay 1064 } 1065 } 1066 1067 return options 1068 } 1069 1070 Tooltip.prototype.getDelegateOptions = function () { 1071 var options = {} 1072 var defaults = this.getDefaults() 1073 1074 this._options && $.each(this._options, function (key, value) { 1075 if (defaults[key] != value) options[key] = value 1076 }) 1077 1078 return options 1079 } 1080 1081 Tooltip.prototype.enter = function (obj) { 1082 var self = obj instanceof this.constructor ? 1083 obj : $(obj.currentTarget).data('bs.' + this.type) 1084 1085 if (self && self.$tip && self.$tip.is(':visible')) { 1086 self.hoverState = 'in' 1087 return 1088 } 1089 1090 if (!self) { 1091 self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) 1092 $(obj.currentTarget).data('bs.' + this.type, self) 1093 } 1094 1095 clearTimeout(self.timeout) 1096 1097 self.hoverState = 'in' 1098 1099 if (!self.options.delay || !self.options.delay.show) return self.show() 1100 1101 self.timeout = setTimeout(function () { 1102 if (self.hoverState == 'in') self.show() 1103 }, self.options.delay.show) 1104 } 1105 1106 Tooltip.prototype.leave = function (obj) { 1107 var self = obj instanceof this.constructor ? 1108 obj : $(obj.currentTarget).data('bs.' + this.type) 1109 1110 if (!self) { 1111 self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) 1112 $(obj.currentTarget).data('bs.' + this.type, self) 1113 } 1114 1115 clearTimeout(self.timeout) 1116 1117 self.hoverState = 'out' 1118 1119 if (!self.options.delay || !self.options.delay.hide) return self.hide() 1120 1121 self.timeout = setTimeout(function () { 1122 if (self.hoverState == 'out') self.hide() 1123 }, self.options.delay.hide) 1124 } 1125 1126 Tooltip.prototype.show = function () { 1127 var e = $.Event('show.bs.' + this.type) 1128 1129 if (this.hasContent() && this.enabled) { 1130 this.$element.trigger(e) 1131 1132 var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) 1133 if (e.isDefaultPrevented() || !inDom) return 1134 var that = this 1135 1136 var $tip = this.tip() 1137 1138 var tipId = this.getUID(this.type) 1139 1140 this.setContent() 1141 $tip.attr('id', tipId) 1142 this.$element.attr('aria-describedby', tipId) 1143 1144 if (this.options.animation) $tip.addClass('fade') 1145 1146 var placement = typeof this.options.placement == 'function' ? 1147 this.options.placement.call(this, $tip[0], this.$element[0]) : 1148 this.options.placement 1149 1150 var autoToken = /\s?auto?\s?/i 1151 var autoPlace = autoToken.test(placement) 1152 if (autoPlace) placement = placement.replace(autoToken, '') || 'top' 1153 1154 $tip 1155 .detach() 1156 .css({ top: 0, left: 0, display: 'block' }) 1157 .addClass(placement) 1158 .data('bs.' + this.type, this) 1159 1160 this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) 1161 1162 var pos = this.getPosition() 1163 var actualWidth = $tip[0].offsetWidth 1164 var actualHeight = $tip[0].offsetHeight 1165 1166 if (autoPlace) { 1167 var orgPlacement = placement 1168 var $container = this.options.container ? $(this.options.container) : this.$element.parent() 1169 var containerDim = this.getPosition($container) 1170 1171 placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' : 1172 placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' : 1173 placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' : 1174 placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' : 1175 placement 1176 1177 $tip 1178 .removeClass(orgPlacement) 1179 .addClass(placement) 1180 } 1181 1182 var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) 1183 1184 this.applyPlacement(calculatedOffset, placement) 1185 1186 var complete = function () { 1187 var prevHoverState = that.hoverState 1188 that.$element.trigger('shown.bs.' + that.type) 1189 that.hoverState = null 1190 1191 if (prevHoverState == 'out') that.leave(that) 1192 } 1193 1194 $.support.transition && this.$tip.hasClass('fade') ? 1195 $tip 1196 .one('bsTransitionEnd', complete) 1197 .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : 1198 complete() 1199 } 1200 } 1201 1202 Tooltip.prototype.applyPlacement = function (offset, placement) { 1203 var $tip = this.tip() 1204 var width = $tip[0].offsetWidth 1205 var height = $tip[0].offsetHeight 1206 1207 // manually read margins because getBoundingClientRect includes difference 1208 var marginTop = parseInt($tip.css('margin-top'), 10) 1209 var marginLeft = parseInt($tip.css('margin-left'), 10) 1210 1211 // we must check for NaN for ie 8/9 1212 if (isNaN(marginTop)) marginTop = 0 1213 if (isNaN(marginLeft)) marginLeft = 0 1214 1215 offset.top = offset.top + marginTop 1216 offset.left = offset.left + marginLeft 1217 1218 // $.fn.offset doesn't round pixel values 1219 // so we use setOffset directly with our own function B-0 1220 $.offset.setOffset($tip[0], $.extend({ 1221 using: function (props) { 1222 $tip.css({ 1223 top: Math.round(props.top), 1224 left: Math.round(props.left) 1225 }) 1226 } 1227 }, offset), 0) 1228 1229 $tip.addClass('in') 1230 1231 // check to see if placing tip in new offset caused the tip to resize itself 1232 var actualWidth = $tip[0].offsetWidth 1233 var actualHeight = $tip[0].offsetHeight 1234 1235 if (placement == 'top' && actualHeight != height) { 1236 offset.top = offset.top + height - actualHeight 1237 } 1238 1239 var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) 1240 1241 if (delta.left) offset.left += delta.left 1242 else offset.top += delta.top 1243 1244 var isVertical = /top|bottom/.test(placement) 1245 var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight 1246 var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' 1247 1248 $tip.offset(offset) 1249 this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) 1250 } 1251 1252 Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { 1253 this.arrow() 1254 .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') 1255 .css(isVertical ? 'top' : 'left', '') 1256 } 1257 1258 Tooltip.prototype.setContent = function () { 1259 var $tip = this.tip() 1260 var title = this.getTitle() 1261 1262 $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) 1263 $tip.removeClass('fade in top bottom left right') 1264 } 1265 1266 Tooltip.prototype.hide = function (callback) { 1267 var that = this 1268 var $tip = $(this.$tip) 1269 var e = $.Event('hide.bs.' + this.type) 1270 1271 function complete() { 1272 if (that.hoverState != 'in') $tip.detach() 1273 that.$element 1274 .removeAttr('aria-describedby') 1275 .trigger('hidden.bs.' + that.type) 1276 callback && callback() 1277 } 1278 1279 this.$element.trigger(e) 1280 1281 if (e.isDefaultPrevented()) return 1282 1283 $tip.removeClass('in') 1284 1285 $.support.transition && $tip.hasClass('fade') ? 1286 $tip 1287 .one('bsTransitionEnd', complete) 1288 .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : 1289 complete() 1290 1291 this.hoverState = null 1292 1293 return this 1294 } 1295 1296 Tooltip.prototype.fixTitle = function () { 1297 var $e = this.$element 1298 if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') { 1299 $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') 1300 } 1301 } 1302 1303 Tooltip.prototype.hasContent = function () { 1304 return this.getTitle() 1305 } 1306 1307 Tooltip.prototype.getPosition = function ($element) { 1308 $element = $element || this.$element 1309 1310 var el = $element[0] 1311 var isBody = el.tagName == 'BODY' 1312 1313 var elRect = el.getBoundingClientRect() 1314 if (elRect.width == null) { 1315 // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 1316 elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) 1317 } 1318 var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() 1319 var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } 1320 var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null 1321 1322 return $.extend({}, elRect, scroll, outerDims, elOffset) 1323 } 1324 1325 Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { 1326 return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : 1327 placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : 1328 placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : 1329 /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } 1330 1331 } 1332 1333 Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { 1334 var delta = { top: 0, left: 0 } 1335 if (!this.$viewport) return delta 1336 1337 var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 1338 var viewportDimensions = this.getPosition(this.$viewport) 1339 1340 if (/right|left/.test(placement)) { 1341 var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll 1342 var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight 1343 if (topEdgeOffset < viewportDimensions.top) { // top overflow 1344 delta.top = viewportDimensions.top - topEdgeOffset 1345 } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow 1346 delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset 1347 } 1348 } else { 1349 var leftEdgeOffset = pos.left - viewportPadding 1350 var rightEdgeOffset = pos.left + viewportPadding + actualWidth 1351 if (leftEdgeOffset < viewportDimensions.left) { // left overflow 1352 delta.left = viewportDimensions.left - leftEdgeOffset 1353 } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow 1354 delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset 1355 } 1356 } 1357 1358 return delta 1359 } 1360 1361 Tooltip.prototype.getTitle = function () { 1362 var title 1363 var $e = this.$element 1364 var o = this.options 1365 1366 title = $e.attr('data-original-title') 1367 || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) 1368 1369 return title 1370 } 1371 1372 Tooltip.prototype.getUID = function (prefix) { 1373 do prefix += ~~(Math.random() * 1000000) 1374 while (document.getElementById(prefix)) 1375 return prefix 1376 } 1377 1378 Tooltip.prototype.tip = function () { 1379 return (this.$tip = this.$tip || $(this.options.template)) 1380 } 1381 1382 Tooltip.prototype.arrow = function () { 1383 return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) 1384 } 1385 1386 Tooltip.prototype.enable = function () { 1387 this.enabled = true 1388 } 1389 1390 Tooltip.prototype.disable = function () { 1391 this.enabled = false 1392 } 1393 1394 Tooltip.prototype.toggleEnabled = function () { 1395 this.enabled = !this.enabled 1396 } 1397 1398 Tooltip.prototype.toggle = function (e) { 1399 var self = this 1400 if (e) { 1401 self = $(e.currentTarget).data('bs.' + this.type) 1402 if (!self) { 1403 self = new this.constructor(e.currentTarget, this.getDelegateOptions()) 1404 $(e.currentTarget).data('bs.' + this.type, self) 1405 } 1406 } 1407 1408 self.tip().hasClass('in') ? self.leave(self) : self.enter(self) 1409 } 1410 1411 Tooltip.prototype.destroy = function () { 1412 var that = this 1413 clearTimeout(this.timeout) 1414 this.hide(function () { 1415 that.$element.off('.' + that.type).removeData('bs.' + that.type) 1416 }) 1417 } 1418 1419 1420 // TOOLTIP PLUGIN DEFINITION 1421 // ========================= 1422 1423 function Plugin(option) { 1424 return this.each(function () { 1425 var $this = $(this) 1426 var data = $this.data('bs.tooltip') 1427 var options = typeof option == 'object' && option 1428 1429 if (!data && /destroy|hide/.test(option)) return 1430 if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) 1431 if (typeof option == 'string') data[option]() 1432 }) 1433 } 1434 1435 var old = $.fn.tooltip 1436 1437 $.fn.tooltip = Plugin 1438 $.fn.tooltip.Constructor = Tooltip 1439 1440 1441 // TOOLTIP NO CONFLICT 1442 // =================== 1443 1444 $.fn.tooltip.noConflict = function () { 1445 $.fn.tooltip = old 1446 return this 1447 } 1448 1449}(jQuery); 1450 1451/* ======================================================================== 1452 * Bootstrap: popover.js v3.3.2 1453 * http://getbootstrap.com/javascript/#popovers 1454 * ======================================================================== 1455 * Copyright 2011-2015 Twitter, Inc. 1456 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1457 * ======================================================================== */ 1458 1459 1460+function ($) { 1461 'use strict'; 1462 1463 // POPOVER PUBLIC CLASS DEFINITION 1464 // =============================== 1465 1466 var Popover = function (element, options) { 1467 this.init('popover', element, options) 1468 } 1469 1470 if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') 1471 1472 Popover.VERSION = '3.3.2' 1473 1474 Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { 1475 placement: 'right', 1476 trigger: 'click', 1477 content: '', 1478 template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' 1479 }) 1480 1481 1482 // NOTE: POPOVER EXTENDS tooltip.js 1483 // ================================ 1484 1485 Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) 1486 1487 Popover.prototype.constructor = Popover 1488 1489 Popover.prototype.getDefaults = function () { 1490 return Popover.DEFAULTS 1491 } 1492 1493 Popover.prototype.setContent = function () { 1494 var $tip = this.tip() 1495 var title = this.getTitle() 1496 var content = this.getContent() 1497 1498 $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) 1499 $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events 1500 this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' 1501 ](content) 1502 1503 $tip.removeClass('fade top bottom left right in') 1504 1505 // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do 1506 // this manually by checking the contents. 1507 if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() 1508 } 1509 1510 Popover.prototype.hasContent = function () { 1511 return this.getTitle() || this.getContent() 1512 } 1513 1514 Popover.prototype.getContent = function () { 1515 var $e = this.$element 1516 var o = this.options 1517 1518 return $e.attr('data-content') 1519 || (typeof o.content == 'function' ? 1520 o.content.call($e[0]) : 1521 o.content) 1522 } 1523 1524 Popover.prototype.arrow = function () { 1525 return (this.$arrow = this.$arrow || this.tip().find('.arrow')) 1526 } 1527 1528 1529 // POPOVER PLUGIN DEFINITION 1530 // ========================= 1531 1532 function Plugin(option) { 1533 return this.each(function () { 1534 var $this = $(this) 1535 var data = $this.data('bs.popover') 1536 var options = typeof option == 'object' && option 1537 1538 if (!data && /destroy|hide/.test(option)) return 1539 if (!data) $this.data('bs.popover', (data = new Popover(this, options))) 1540 if (typeof option == 'string') data[option]() 1541 }) 1542 } 1543 1544 var old = $.fn.popover 1545 1546 $.fn.popover = Plugin 1547 $.fn.popover.Constructor = Popover 1548 1549 1550 // POPOVER NO CONFLICT 1551 // =================== 1552 1553 $.fn.popover.noConflict = function () { 1554 $.fn.popover = old 1555 return this 1556 } 1557 1558}(jQuery); 1559 1560/* ======================================================================== 1561 * Bootstrap: tab.js v3.3.2 1562 * http://getbootstrap.com/javascript/#tabs 1563 * ======================================================================== 1564 * Copyright 2011-2015 Twitter, Inc. 1565 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1566 * ======================================================================== */ 1567 1568 1569+function ($) { 1570 'use strict'; 1571 1572 // TAB CLASS DEFINITION 1573 // ==================== 1574 1575 var Tab = function (element) { 1576 this.element = $(element) 1577 } 1578 1579 Tab.VERSION = '3.3.2' 1580 1581 Tab.TRANSITION_DURATION = 150 1582 1583 Tab.prototype.show = function () { 1584 var $this = this.element 1585 var $ul = $this.closest('ul:not(.dropdown-menu)') 1586 var selector = $this.data('target') 1587 1588 if (!selector) { 1589 selector = $this.attr('href') 1590 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 1591 } 1592 1593 if ($this.parent('li').hasClass('active')) return 1594 1595 var $previous = $ul.find('.active:last a') 1596 var hideEvent = $.Event('hide.bs.tab', { 1597 relatedTarget: $this[0] 1598 }) 1599 var showEvent = $.Event('show.bs.tab', { 1600 relatedTarget: $previous[0] 1601 }) 1602 1603 $previous.trigger(hideEvent) 1604 $this.trigger(showEvent) 1605 1606 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return 1607 1608 var $target = $(selector) 1609 1610 this.activate($this.closest('li'), $ul) 1611 this.activate($target, $target.parent(), function () { 1612 $previous.trigger({ 1613 type: 'hidden.bs.tab', 1614 relatedTarget: $this[0] 1615 }) 1616 $this.trigger({ 1617 type: 'shown.bs.tab', 1618 relatedTarget: $previous[0] 1619 }) 1620 }) 1621 } 1622 1623 Tab.prototype.activate = function (element, container, callback) { 1624 var $active = container.find('> .active') 1625 var transition = callback 1626 && $.support.transition 1627 && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length) 1628 1629 function next() { 1630 $active 1631 .removeClass('active') 1632 .find('> .dropdown-menu > .active') 1633 .removeClass('active') 1634 .end() 1635 .find('[data-toggle="tab"]') 1636 .attr('aria-expanded', false) 1637 1638 element 1639 .addClass('active') 1640 .find('[data-toggle="tab"]') 1641 .attr('aria-expanded', true) 1642 1643 if (transition) { 1644 element[0].offsetWidth // reflow for transition 1645 element.addClass('in') 1646 } else { 1647 element.removeClass('fade') 1648 } 1649 1650 if (element.parent('.dropdown-menu').length) { 1651 element 1652 .closest('li.dropdown') 1653 .addClass('active') 1654 .end() 1655 .find('[data-toggle="tab"]') 1656 .attr('aria-expanded', true) 1657 } 1658 1659 callback && callback() 1660 } 1661 1662 $active.length && transition ? 1663 $active 1664 .one('bsTransitionEnd', next) 1665 .emulateTransitionEnd(Tab.TRANSITION_DURATION) : 1666 next() 1667 1668 $active.removeClass('in') 1669 } 1670 1671 1672 // TAB PLUGIN DEFINITION 1673 // ===================== 1674 1675 function Plugin(option) { 1676 return this.each(function () { 1677 var $this = $(this) 1678 var data = $this.data('bs.tab') 1679 1680 if (!data) $this.data('bs.tab', (data = new Tab(this))) 1681 if (typeof option == 'string') data[option]() 1682 }) 1683 } 1684 1685 var old = $.fn.tab 1686 1687 $.fn.tab = Plugin 1688 $.fn.tab.Constructor = Tab 1689 1690 1691 // TAB NO CONFLICT 1692 // =============== 1693 1694 $.fn.tab.noConflict = function () { 1695 $.fn.tab = old 1696 return this 1697 } 1698 1699 1700 // TAB DATA-API 1701 // ============ 1702 1703 var clickHandler = function (e) { 1704 e.preventDefault() 1705 Plugin.call($(this), 'show') 1706 } 1707 1708 $(document) 1709 .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) 1710 .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) 1711 1712}(jQuery); 1713 1714/* ======================================================================== 1715 * Bootstrap: affix.js v3.3.2 1716 * http://getbootstrap.com/javascript/#affix 1717 * ======================================================================== 1718 * Copyright 2011-2015 Twitter, Inc. 1719 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1720 * ======================================================================== */ 1721 1722 1723+function ($) { 1724 'use strict'; 1725 1726 // AFFIX CLASS DEFINITION 1727 // ====================== 1728 1729 var Affix = function (element, options) { 1730 this.options = $.extend({}, Affix.DEFAULTS, options) 1731 1732 this.$target = $(this.options.target) 1733 .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) 1734 .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) 1735 1736 this.$element = $(element) 1737 this.affixed = null 1738 this.unpin = null 1739 this.pinnedOffset = null 1740 1741 this.checkPosition() 1742 } 1743 1744 Affix.VERSION = '3.3.2' 1745 1746 Affix.RESET = 'affix affix-top affix-bottom' 1747 1748 Affix.DEFAULTS = { 1749 offset: 0, 1750 target: window 1751 } 1752 1753 Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { 1754 var scrollTop = this.$target.scrollTop() 1755 var position = this.$element.offset() 1756 var targetHeight = this.$target.height() 1757 1758 if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false 1759 1760 if (this.affixed == 'bottom') { 1761 if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' 1762 return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' 1763 } 1764 1765 var initializing = this.affixed == null 1766 var colliderTop = initializing ? scrollTop : position.top 1767 var colliderHeight = initializing ? targetHeight : height 1768 1769 if (offsetTop != null && scrollTop <= offsetTop) return 'top' 1770 if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' 1771 1772 return false 1773 } 1774 1775 Affix.prototype.getPinnedOffset = function () { 1776 if (this.pinnedOffset) return this.pinnedOffset 1777 this.$element.removeClass(Affix.RESET).addClass('affix') 1778 var scrollTop = this.$target.scrollTop() 1779 var position = this.$element.offset() 1780 return (this.pinnedOffset = position.top - scrollTop) 1781 } 1782 1783 Affix.prototype.checkPositionWithEventLoop = function () { 1784 setTimeout($.proxy(this.checkPosition, this), 1) 1785 } 1786 1787 Affix.prototype.checkPosition = function () { 1788 if (!this.$element.is(':visible')) return 1789 1790 var height = this.$element.height() 1791 var offset = this.options.offset 1792 var offsetTop = offset.top 1793 var offsetBottom = offset.bottom 1794 var scrollHeight = $(document.body).height() 1795 1796 if (typeof offset != 'object') offsetBottom = offsetTop = offset 1797 if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) 1798 if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) 1799 1800 var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) 1801 1802 if (this.affixed != affix) { 1803 if (this.unpin != null) this.$element.css('top', '') 1804 1805 var affixType = 'affix' + (affix ? '-' + affix : '') 1806 var e = $.Event(affixType + '.bs.affix') 1807 1808 this.$element.trigger(e) 1809 1810 if (e.isDefaultPrevented()) return 1811 1812 this.affixed = affix 1813 this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null 1814 1815 this.$element 1816 .removeClass(Affix.RESET) 1817 .addClass(affixType) 1818 .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') 1819 } 1820 1821 if (affix == 'bottom') { 1822 this.$element.offset({ 1823 top: scrollHeight - height - offsetBottom 1824 }) 1825 } 1826 } 1827 1828 1829 // AFFIX PLUGIN DEFINITION 1830 // ======================= 1831 1832 function Plugin(option) { 1833 return this.each(function () { 1834 var $this = $(this) 1835 var data = $this.data('bs.affix') 1836 var options = typeof option == 'object' && option 1837 1838 if (!data) $this.data('bs.affix', (data = new Affix(this, options))) 1839 if (typeof option == 'string') data[option]() 1840 }) 1841 } 1842 1843 var old = $.fn.affix 1844 1845 $.fn.affix = Plugin 1846 $.fn.affix.Constructor = Affix 1847 1848 1849 // AFFIX NO CONFLICT 1850 // ================= 1851 1852 $.fn.affix.noConflict = function () { 1853 $.fn.affix = old 1854 return this 1855 } 1856 1857 1858 // AFFIX DATA-API 1859 // ============== 1860 1861 $(window).on('load', function () { 1862 $('[data-spy="affix"]').each(function () { 1863 var $spy = $(this) 1864 var data = $spy.data() 1865 1866 data.offset = data.offset || {} 1867 1868 if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom 1869 if (data.offsetTop != null) data.offset.top = data.offsetTop 1870 1871 Plugin.call($spy, data) 1872 }) 1873 }) 1874 1875}(jQuery); 1876 1877/* ======================================================================== 1878 * Bootstrap: collapse.js v3.3.2 1879 * http://getbootstrap.com/javascript/#collapse 1880 * ======================================================================== 1881 * Copyright 2011-2015 Twitter, Inc. 1882 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1883 * ======================================================================== */ 1884 1885 1886+function ($) { 1887 'use strict'; 1888 1889 // COLLAPSE PUBLIC CLASS DEFINITION 1890 // ================================ 1891 1892 var Collapse = function (element, options) { 1893 this.$element = $(element) 1894 this.options = $.extend({}, Collapse.DEFAULTS, options) 1895 this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + 1896 '[data-toggle="collapse"][data-target="#' + element.id + '"]') 1897 this.transitioning = null 1898 1899 if (this.options.parent) { 1900 this.$parent = this.getParent() 1901 } else { 1902 this.addAriaAndCollapsedClass(this.$element, this.$trigger) 1903 } 1904 1905 if (this.options.toggle) this.toggle() 1906 } 1907 1908 Collapse.VERSION = '3.3.2' 1909 1910 Collapse.TRANSITION_DURATION = 350 1911 1912 Collapse.DEFAULTS = { 1913 toggle: true 1914 } 1915 1916 Collapse.prototype.dimension = function () { 1917 var hasWidth = this.$element.hasClass('width') 1918 return hasWidth ? 'width' : 'height' 1919 } 1920 1921 Collapse.prototype.show = function () { 1922 if (this.transitioning || this.$element.hasClass('in')) return 1923 1924 var activesData 1925 var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') 1926 1927 if (actives && actives.length) { 1928 activesData = actives.data('bs.collapse') 1929 if (activesData && activesData.transitioning) return 1930 } 1931 1932 var startEvent = $.Event('show.bs.collapse') 1933 this.$element.trigger(startEvent) 1934 if (startEvent.isDefaultPrevented()) return 1935 1936 if (actives && actives.length) { 1937 Plugin.call(actives, 'hide') 1938 activesData || actives.data('bs.collapse', null) 1939 } 1940 1941 var dimension = this.dimension() 1942 1943 this.$element 1944 .removeClass('collapse') 1945 .addClass('collapsing')[dimension](0) 1946 .attr('aria-expanded', true) 1947 1948 this.$trigger 1949 .removeClass('collapsed') 1950 .attr('aria-expanded', true) 1951 1952 this.transitioning = 1 1953 1954 var complete = function () { 1955 this.$element 1956 .removeClass('collapsing') 1957 .addClass('collapse in')[dimension]('') 1958 this.transitioning = 0 1959 this.$element 1960 .trigger('shown.bs.collapse') 1961 } 1962 1963 if (!$.support.transition) return complete.call(this) 1964 1965 var scrollSize = $.camelCase(['scroll', dimension].join('-')) 1966 1967 this.$element 1968 .one('bsTransitionEnd', $.proxy(complete, this)) 1969 .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) 1970 } 1971 1972 Collapse.prototype.hide = function () { 1973 if (this.transitioning || !this.$element.hasClass('in')) return 1974 1975 var startEvent = $.Event('hide.bs.collapse') 1976 this.$element.trigger(startEvent) 1977 if (startEvent.isDefaultPrevented()) return 1978 1979 var dimension = this.dimension() 1980 1981 this.$element[dimension](this.$element[dimension]())[0].offsetHeight 1982 1983 this.$element 1984 .addClass('collapsing') 1985 .removeClass('collapse in') 1986 .attr('aria-expanded', false) 1987 1988 this.$trigger 1989 .addClass('collapsed') 1990 .attr('aria-expanded', false) 1991 1992 this.transitioning = 1 1993 1994 var complete = function () { 1995 this.transitioning = 0 1996 this.$element 1997 .removeClass('collapsing') 1998 .addClass('collapse') 1999 .trigger('hidden.bs.collapse') 2000 } 2001 2002 if (!$.support.transition) return complete.call(this) 2003 2004 this.$element 2005 [dimension](0) 2006 .one('bsTransitionEnd', $.proxy(complete, this)) 2007 .emulateTransitionEnd(Collapse.TRANSITION_DURATION) 2008 } 2009 2010 Collapse.prototype.toggle = function () { 2011 this[this.$element.hasClass('in') ? 'hide' : 'show']() 2012 } 2013 2014 Collapse.prototype.getParent = function () { 2015 return $(this.options.parent) 2016 .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') 2017 .each($.proxy(function (i, element) { 2018 var $element = $(element) 2019 this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) 2020 }, this)) 2021 .end() 2022 } 2023 2024 Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { 2025 var isOpen = $element.hasClass('in') 2026 2027 $element.attr('aria-expanded', isOpen) 2028 $trigger 2029 .toggleClass('collapsed', !isOpen) 2030 .attr('aria-expanded', isOpen) 2031 } 2032 2033 function getTargetFromTrigger($trigger) { 2034 var href 2035 var target = $trigger.attr('data-target') 2036 || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 2037 2038 return $(target) 2039 } 2040 2041 2042 // COLLAPSE PLUGIN DEFINITION 2043 // ========================== 2044 2045 function Plugin(option) { 2046 return this.each(function () { 2047 var $this = $(this) 2048 var data = $this.data('bs.collapse') 2049 var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) 2050 2051 if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false 2052 if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) 2053 if (typeof option == 'string') data[option]() 2054 }) 2055 } 2056 2057 var old = $.fn.collapse 2058 2059 $.fn.collapse = Plugin 2060 $.fn.collapse.Constructor = Collapse 2061 2062 2063 // COLLAPSE NO CONFLICT 2064 // ==================== 2065 2066 $.fn.collapse.noConflict = function () { 2067 $.fn.collapse = old 2068 return this 2069 } 2070 2071 2072 // COLLAPSE DATA-API 2073 // ================= 2074 2075 $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { 2076 var $this = $(this) 2077 2078 if (!$this.attr('data-target')) e.preventDefault() 2079 2080 var $target = getTargetFromTrigger($this) 2081 var data = $target.data('bs.collapse') 2082 var option = data ? 'toggle' : $this.data() 2083 2084 Plugin.call($target, option) 2085 }) 2086 2087}(jQuery); 2088 2089/* ======================================================================== 2090 * Bootstrap: scrollspy.js v3.3.2 2091 * http://getbootstrap.com/javascript/#scrollspy 2092 * ======================================================================== 2093 * Copyright 2011-2015 Twitter, Inc. 2094 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2095 * ======================================================================== */ 2096 2097 2098+function ($) { 2099 'use strict'; 2100 2101 // SCROLLSPY CLASS DEFINITION 2102 // ========================== 2103 2104 function ScrollSpy(element, options) { 2105 this.$body = $(document.body) 2106 this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) 2107 this.options = $.extend({}, ScrollSpy.DEFAULTS, options) 2108 this.selector = (this.options.target || '') + ' .nav li > a' 2109 this.offsets = [] 2110 this.targets = [] 2111 this.activeTarget = null 2112 this.scrollHeight = 0 2113 2114 this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) 2115 this.refresh() 2116 this.process() 2117 } 2118 2119 ScrollSpy.VERSION = '3.3.2' 2120 2121 ScrollSpy.DEFAULTS = { 2122 offset: 10 2123 } 2124 2125 ScrollSpy.prototype.getScrollHeight = function () { 2126 return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) 2127 } 2128 2129 ScrollSpy.prototype.refresh = function () { 2130 var that = this 2131 var offsetMethod = 'offset' 2132 var offsetBase = 0 2133 2134 this.offsets = [] 2135 this.targets = [] 2136 this.scrollHeight = this.getScrollHeight() 2137 2138 if (!$.isWindow(this.$scrollElement[0])) { 2139 offsetMethod = 'position' 2140 offsetBase = this.$scrollElement.scrollTop() 2141 } 2142 2143 this.$body 2144 .find(this.selector) 2145 .map(function () { 2146 var $el = $(this) 2147 var href = $el.data('target') || $el.attr('href') 2148 var $href = /^#./.test(href) && $(href) 2149 2150 return ($href 2151 && $href.length 2152 && $href.is(':visible') 2153 && [[$href[offsetMethod]().top + offsetBase, href]]) || null 2154 }) 2155 .sort(function (a, b) { return a[0] - b[0] }) 2156 .each(function () { 2157 that.offsets.push(this[0]) 2158 that.targets.push(this[1]) 2159 }) 2160 } 2161 2162 ScrollSpy.prototype.process = function () { 2163 var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 2164 var scrollHeight = this.getScrollHeight() 2165 var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() 2166 var offsets = this.offsets 2167 var targets = this.targets 2168 var activeTarget = this.activeTarget 2169 var i 2170 2171 if (this.scrollHeight != scrollHeight) { 2172 this.refresh() 2173 } 2174 2175 if (scrollTop >= maxScroll) { 2176 return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) 2177 } 2178 2179 if (activeTarget && scrollTop < offsets[0]) { 2180 this.activeTarget = null 2181 return this.clear() 2182 } 2183 2184 for (i = offsets.length; i--;) { 2185 activeTarget != targets[i] 2186 && scrollTop >= offsets[i] 2187 && (offsets[i + 1] === undefined || scrollTop <= offsets[i + 1]) 2188 && this.activate(targets[i]) 2189 } 2190 } 2191 2192 ScrollSpy.prototype.activate = function (target) { 2193 this.activeTarget = target 2194 2195 this.clear() 2196 2197 var selector = this.selector + 2198 '[data-target="' + target + '"],' + 2199 this.selector + '[href="' + target + '"]' 2200 2201 var active = $(selector) 2202 .parents('li') 2203 .addClass('active') 2204 2205 if (active.parent('.dropdown-menu').length) { 2206 active = active 2207 .closest('li.dropdown') 2208 .addClass('active') 2209 } 2210 2211 active.trigger('activate.bs.scrollspy') 2212 } 2213 2214 ScrollSpy.prototype.clear = function () { 2215 $(this.selector) 2216 .parentsUntil(this.options.target, '.active') 2217 .removeClass('active') 2218 } 2219 2220 2221 // SCROLLSPY PLUGIN DEFINITION 2222 // =========================== 2223 2224 function Plugin(option) { 2225 return this.each(function () { 2226 var $this = $(this) 2227 var data = $this.data('bs.scrollspy') 2228 var options = typeof option == 'object' && option 2229 2230 if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) 2231 if (typeof option == 'string') data[option]() 2232 }) 2233 } 2234 2235 var old = $.fn.scrollspy 2236 2237 $.fn.scrollspy = Plugin 2238 $.fn.scrollspy.Constructor = ScrollSpy 2239 2240 2241 // SCROLLSPY NO CONFLICT 2242 // ===================== 2243 2244 $.fn.scrollspy.noConflict = function () { 2245 $.fn.scrollspy = old 2246 return this 2247 } 2248 2249 2250 // SCROLLSPY DATA-API 2251 // ================== 2252 2253 $(window).on('load.bs.scrollspy.data-api', function () { 2254 $('[data-spy="scroll"]').each(function () { 2255 var $spy = $(this) 2256 Plugin.call($spy, $spy.data()) 2257 }) 2258 }) 2259 2260}(jQuery); 2261 2262/* ======================================================================== 2263 * Bootstrap: transition.js v3.3.2 2264 * http://getbootstrap.com/javascript/#transitions 2265 * ======================================================================== 2266 * Copyright 2011-2015 Twitter, Inc. 2267 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2268 * ======================================================================== */ 2269 2270 2271+function ($) { 2272 'use strict'; 2273 2274 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 2275 // ============================================================ 2276 2277 function transitionEnd() { 2278 var el = document.createElement('bootstrap') 2279 2280 var transEndEventNames = { 2281 WebkitTransition : 'webkitTransitionEnd', 2282 MozTransition : 'transitionend', 2283 OTransition : 'oTransitionEnd otransitionend', 2284 transition : 'transitionend' 2285 } 2286 2287 for (var name in transEndEventNames) { 2288 if (el.style[name] !== undefined) { 2289 return { end: transEndEventNames[name] } 2290 } 2291 } 2292 2293 return false // explicit for ie8 ( ._.) 2294 } 2295 2296 // http://blog.alexmaccaw.com/css-transitions 2297 $.fn.emulateTransitionEnd = function (duration) { 2298 var called = false 2299 var $el = this 2300 $(this).one('bsTransitionEnd', function () { called = true }) 2301 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 2302 setTimeout(callback, duration) 2303 return this 2304 } 2305 2306 $(function () { 2307 $.support.transition = transitionEnd() 2308 2309 if (!$.support.transition) return 2310 2311 $.event.special.bsTransitionEnd = { 2312 bindType: $.support.transition.end, 2313 delegateType: $.support.transition.end, 2314 handle: function (e) { 2315 if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 2316 } 2317 } 2318 }) 2319 2320}(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.