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