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