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