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