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