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