0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-21 18:54:30 +01:00

grunt dist

This commit is contained in:
Mark Otto 2014-04-30 19:35:47 -07:00
parent 9f80cab096
commit b217357252
11 changed files with 96 additions and 66 deletions

View File

@ -1394,7 +1394,7 @@ p {
.lead { .lead {
margin-bottom: 20px; margin-bottom: 20px;
font-size: 16px; font-size: 16px;
font-weight: 200; font-weight: 300;
line-height: 1.4; line-height: 1.4;
} }

File diff suppressed because one or more lines are too long

View File

@ -1103,7 +1103,7 @@ p {
.lead { .lead {
margin-bottom: 20px; margin-bottom: 20px;
font-size: 16px; font-size: 16px;
font-weight: 200; font-weight: 300;
line-height: 1.4; line-height: 1.4;
} }
@media (min-width: 768px) { @media (min-width: 768px) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

138
dist/js/bootstrap.js vendored
View File

@ -113,9 +113,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// ALERT PLUGIN DEFINITION // ALERT PLUGIN DEFINITION
// ======================= // =======================
var old = $.fn.alert function Plugin(option) {
$.fn.alert = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.alert') var data = $this.data('bs.alert')
@ -125,6 +123,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.alert
$.fn.alert = Plugin
$.fn.alert.Constructor = Alert $.fn.alert.Constructor = Alert
@ -213,9 +214,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// BUTTON PLUGIN DEFINITION // BUTTON PLUGIN DEFINITION
// ======================== // ========================
var old = $.fn.button function Plugin(option) {
$.fn.button = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.button') var data = $this.data('bs.button')
@ -228,6 +227,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.button
$.fn.button = Plugin
$.fn.button.Constructor = Button $.fn.button.Constructor = Button
@ -246,7 +248,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
var $btn = $(e.target) var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle') Plugin.call($btn, 'toggle')
e.preventDefault() e.preventDefault()
}) })
@ -313,7 +315,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (pos > (this.$items.length - 1) || pos < 0) return if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid". not a typo. past tense of "to slide". if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
if (activeIndex == pos) return this.pause().cycle() if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@ -357,9 +359,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if ($next.hasClass('active')) return this.sliding = false if ($next.hasClass('active')) return this.sliding = false
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) var relatedTarget = $next[0]
this.$element.trigger(e) var slideEvent = $.Event('slide.bs.carousel', { relatedTarget: relatedTarget, direction: direction })
if (e.isDefaultPrevented()) return this.$element.trigger(slideEvent)
if (slideEvent.isDefaultPrevented()) return
this.sliding = true this.sliding = true
@ -367,12 +370,13 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (this.$indicators.length) { if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active') this.$indicators.find('.active').removeClass('active')
this.$element.one('slid.bs.carousel', function () { // yes, "slid". not a typo. past tense of "to slide". this.$element.one('slid.bs.carousel', function () { // yes, "slid"
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active') $nextIndicator && $nextIndicator.addClass('active')
}) })
} }
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
if ($.support.transition && this.$element.hasClass('slide')) { if ($.support.transition && this.$element.hasClass('slide')) {
$next.addClass(type) $next.addClass(type)
$next[0].offsetWidth // force reflow $next[0].offsetWidth // force reflow
@ -383,14 +387,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$next.removeClass([type, direction].join(' ')).addClass('active') $next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' ')) $active.removeClass(['active', direction].join(' '))
that.sliding = false that.sliding = false
setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) // yes, "slid". not a typo. past tense of "to slide". setTimeout(function () { that.$element.trigger(slidEvent) }, 0)
}) })
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
} else { } else {
$active.removeClass('active') $active.removeClass('active')
$next.addClass('active') $next.addClass('active')
this.sliding = false this.sliding = false
this.$element.trigger('slid.bs.carousel') // yes, "slid". not a typo. past tense of "to slide". this.$element.trigger(slidEvent)
} }
isCycling && this.cycle() isCycling && this.cycle()
@ -402,9 +406,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// CAROUSEL PLUGIN DEFINITION // CAROUSEL PLUGIN DEFINITION
// ========================== // ==========================
var old = $.fn.carousel function Plugin(option) {
$.fn.carousel = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.carousel') var data = $this.data('bs.carousel')
@ -418,6 +420,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.carousel
$.fn.carousel = Plugin
$.fn.carousel.Constructor = Carousel $.fn.carousel.Constructor = Carousel
@ -440,7 +445,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
var slideIndex = $this.attr('data-slide-to') var slideIndex = $this.attr('data-slide-to')
if (slideIndex) options.interval = false if (slideIndex) options.interval = false
$target.carousel(options) Plugin.call($target, options)
if (slideIndex = $this.attr('data-slide-to')) { if (slideIndex = $this.attr('data-slide-to')) {
$target.data('bs.carousel').to(slideIndex) $target.data('bs.carousel').to(slideIndex)
@ -452,7 +457,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$(window).on('load', function () { $(window).on('load', function () {
$('[data-ride="carousel"]').each(function () { $('[data-ride="carousel"]').each(function () {
var $carousel = $(this) var $carousel = $(this)
$carousel.carousel($carousel.data()) Plugin.call($carousel, $carousel.data())
}) })
}) })
@ -503,7 +508,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (actives && actives.length) { if (actives && actives.length) {
var hasData = actives.data('bs.collapse') var hasData = actives.data('bs.collapse')
if (hasData && hasData.transitioning) return if (hasData && hasData.transitioning) return
actives.collapse('hide') Plugin.call(actives, 'hide')
hasData || actives.data('bs.collapse', null) hasData || actives.data('bs.collapse', null)
} }
@ -586,9 +591,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// COLLAPSE PLUGIN DEFINITION // COLLAPSE PLUGIN DEFINITION
// ========================== // ==========================
var old = $.fn.collapse function Plugin(option) {
$.fn.collapse = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.collapse') var data = $this.data('bs.collapse')
@ -600,6 +603,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.collapse
$.fn.collapse = Plugin
$.fn.collapse.Constructor = Collapse $.fn.collapse.Constructor = Collapse
@ -631,7 +637,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
} }
$target.collapse(option) Plugin.call($target, option)
}) })
}(jQuery); }(jQuery);
@ -750,9 +756,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// DROPDOWN PLUGIN DEFINITION // DROPDOWN PLUGIN DEFINITION
// ========================== // ==========================
var old = $.fn.dropdown function Plugin(option) {
$.fn.dropdown = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.dropdown') var data = $this.data('bs.dropdown')
@ -762,6 +766,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.dropdown
$.fn.dropdown = Plugin
$.fn.dropdown.Constructor = Dropdown $.fn.dropdown.Constructor = Dropdown
@ -1015,9 +1022,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// MODAL PLUGIN DEFINITION // MODAL PLUGIN DEFINITION
// ======================= // =======================
var old = $.fn.modal function Plugin(option, _relatedTarget) {
$.fn.modal = function (option, _relatedTarget) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.modal') var data = $this.data('bs.modal')
@ -1029,6 +1034,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.modal
$.fn.modal = Plugin
$.fn.modal.Constructor = Modal $.fn.modal.Constructor = Modal
@ -1052,9 +1060,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if ($this.is('a')) e.preventDefault() if ($this.is('a')) e.preventDefault()
$target Plugin.call($target, option, this)
.modal(option, this) $target.one('hide', function () {
.one('hide', function () {
$this.is(':visible') && $this.trigger('focus') $this.is(':visible') && $this.trigger('focus')
}) })
}) })
@ -1162,7 +1169,12 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Tooltip.prototype.enter = function (obj) { Tooltip.prototype.enter = function (obj) {
var self = obj instanceof this.constructor ? var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) obj : $(obj.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
clearTimeout(self.timeout) clearTimeout(self.timeout)
@ -1177,7 +1189,12 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Tooltip.prototype.leave = function (obj) { Tooltip.prototype.leave = function (obj) {
var self = obj instanceof this.constructor ? var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) obj : $(obj.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
clearTimeout(self.timeout) clearTimeout(self.timeout)
@ -1444,7 +1461,15 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
} }
Tooltip.prototype.toggle = function (e) { Tooltip.prototype.toggle = function (e) {
var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this var self = this
if (e) {
self = $(e.currentTarget).data('bs.' + this.type)
if (!self) {
self = new this.constructor(e.currentTarget, this.getDelegateOptions())
$(e.currentTarget).data('bs.' + this.type, self)
}
}
self.tip().hasClass('in') ? self.leave(self) : self.enter(self) self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
} }
@ -1457,9 +1482,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// TOOLTIP PLUGIN DEFINITION // TOOLTIP PLUGIN DEFINITION
// ========================= // =========================
var old = $.fn.tooltip function Plugin(option) {
$.fn.tooltip = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.tooltip') var data = $this.data('bs.tooltip')
@ -1471,6 +1494,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.tooltip
$.fn.tooltip = Plugin
$.fn.tooltip.Constructor = Tooltip $.fn.tooltip.Constructor = Tooltip
@ -1568,9 +1594,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// POPOVER PLUGIN DEFINITION // POPOVER PLUGIN DEFINITION
// ========================= // =========================
var old = $.fn.popover function Plugin(option) {
$.fn.popover = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.popover') var data = $this.data('bs.popover')
@ -1582,6 +1606,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.popover
$.fn.popover = Plugin
$.fn.popover.Constructor = Popover $.fn.popover.Constructor = Popover
@ -1713,9 +1740,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// SCROLLSPY PLUGIN DEFINITION // SCROLLSPY PLUGIN DEFINITION
// =========================== // ===========================
var old = $.fn.scrollspy function Plugin(option) {
$.fn.scrollspy = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.scrollspy') var data = $this.data('bs.scrollspy')
@ -1726,6 +1751,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.scrollspy
$.fn.scrollspy = Plugin
$.fn.scrollspy.Constructor = ScrollSpy $.fn.scrollspy.Constructor = ScrollSpy
@ -1744,7 +1772,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$(window).on('load.bs.scrollspy.data-api', function () { $(window).on('load.bs.scrollspy.data-api', function () {
$('[data-spy="scroll"]').each(function () { $('[data-spy="scroll"]').each(function () {
var $spy = $(this) var $spy = $(this)
$spy.scrollspy($spy.data()) Plugin.call($spy, $spy.data())
}) })
}) })
@ -1842,9 +1870,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// TAB PLUGIN DEFINITION // TAB PLUGIN DEFINITION
// ===================== // =====================
var old = $.fn.tab function Plugin( option ) {
$.fn.tab = function ( option ) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.tab') var data = $this.data('bs.tab')
@ -1854,6 +1880,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.tab
$.fn.tab = Plugin
$.fn.tab.Constructor = Tab $.fn.tab.Constructor = Tab
@ -1871,7 +1900,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault() e.preventDefault()
$(this).tab('show') Plugin.call($(this), 'show')
}) })
}(jQuery); }(jQuery);
@ -1968,9 +1997,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
// AFFIX PLUGIN DEFINITION // AFFIX PLUGIN DEFINITION
// ======================= // =======================
var old = $.fn.affix function Plugin(option) {
$.fn.affix = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.affix') var data = $this.data('bs.affix')
@ -1981,6 +2008,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
}) })
} }
var old = $.fn.affix
$.fn.affix = Plugin
$.fn.affix.Constructor = Affix $.fn.affix.Constructor = Affix
@ -2006,7 +2036,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (data.offsetBottom) data.offset.bottom = data.offsetBottom if (data.offsetBottom) data.offset.bottom = data.offsetBottom
if (data.offsetTop) data.offset.top = data.offsetTop if (data.offsetTop) data.offset.top = data.offsetTop
$spy.affix(data) Plugin.call($spy, data)
}) })
}) })

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long