mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-25 06:21:26 +02:00
Merge branch 'master' into 3.0.0-wip
Conflicts: docs/assets/css/bootstrap.css docs/assets/js/bootstrap.js docs/css.html docs/templates/pages/base-css.mustache docs/templates/pages/components.mustache docs/templates/pages/javascript.mustache less/breadcrumbs.less less/tables.less less/tests/css-tests.html
This commit is contained in:
39
docs/assets/css/bootstrap.css
vendored
39
docs/assets/css/bootstrap.css
vendored
@@ -700,6 +700,8 @@ pre.prettyprint {
|
||||
pre code {
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
@@ -1684,6 +1686,10 @@ table {
|
||||
border-top: 2px solid #dddddd;
|
||||
}
|
||||
|
||||
.table .table {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.table-condensed th,
|
||||
.table-condensed td {
|
||||
padding: 4px 5px;
|
||||
@@ -1713,33 +1719,33 @@ table {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.table-bordered thead:first-child tr:first-child th:first-child,
|
||||
.table-bordered tbody:first-child tr:first-child td:first-child {
|
||||
.table-bordered thead:first-child tr:first-child > th:first-child,
|
||||
.table-bordered tbody:first-child tr:first-child > td:first-child {
|
||||
border-top-left-radius: 4px;
|
||||
}
|
||||
|
||||
.table-bordered thead:first-child tr:first-child th:last-child,
|
||||
.table-bordered tbody:first-child tr:first-child td:last-child {
|
||||
.table-bordered thead:first-child tr:first-child > th:last-child,
|
||||
.table-bordered tbody:first-child tr:first-child > td:last-child {
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
.table-bordered thead:last-child tr:last-child th:first-child,
|
||||
.table-bordered tbody:last-child tr:last-child td:first-child,
|
||||
.table-bordered tfoot:last-child tr:last-child td:first-child {
|
||||
.table-bordered thead:last-child tr:last-child > th:first-child,
|
||||
.table-bordered tbody:last-child tr:last-child > td:first-child,
|
||||
.table-bordered tfoot:last-child tr:last-child > td:first-child {
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
.table-bordered thead:last-child tr:last-child th:last-child,
|
||||
.table-bordered tbody:last-child tr:last-child td:last-child,
|
||||
.table-bordered tfoot:last-child tr:last-child td:last-child {
|
||||
.table-bordered thead:last-child tr:last-child > th:last-child,
|
||||
.table-bordered tbody:last-child tr:last-child > td:last-child,
|
||||
.table-bordered tfoot:last-child tr:last-child > td:last-child {
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
.table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
|
||||
.table-bordered tfoot + tbody:last-child tr:last-child > td:first-child {
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
|
||||
.table-bordered tfoot + tbody:last-child tr:last-child > td:last-child {
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
@@ -1757,8 +1763,8 @@ table {
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
.table-striped tbody tr:nth-child(odd) td,
|
||||
.table-striped tbody tr:nth-child(odd) th {
|
||||
.table-striped tbody > tr:nth-child(odd) > td,
|
||||
.table-striped tbody > tr:nth-child(odd) > th {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
@@ -2827,6 +2833,11 @@ button.close {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.btn-mini [class^="icon-"],
|
||||
.btn-mini [class*=" icon-"] {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.btn-mini {
|
||||
padding: 0 6px;
|
||||
font-size: 10.5px;
|
||||
|
11
docs/assets/js/bootstrap-affix.js
vendored
11
docs/assets/js/bootstrap-affix.js
vendored
@@ -68,6 +68,8 @@
|
||||
/* AFFIX PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.affix
|
||||
|
||||
$.fn.affix = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -85,6 +87,15 @@
|
||||
}
|
||||
|
||||
|
||||
/* AFFIX NO CONFLICT
|
||||
* ================= */
|
||||
|
||||
$.fn.affix.noConflict = function () {
|
||||
$.fn.affix = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* AFFIX DATA-API
|
||||
* ============== */
|
||||
|
||||
|
11
docs/assets/js/bootstrap-alert.js
vendored
11
docs/assets/js/bootstrap-alert.js
vendored
@@ -68,6 +68,8 @@
|
||||
/* ALERT PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.alert
|
||||
|
||||
$.fn.alert = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -80,6 +82,15 @@
|
||||
$.fn.alert.Constructor = Alert
|
||||
|
||||
|
||||
/* ALERT NO CONFLICT
|
||||
* ================= */
|
||||
|
||||
$.fn.alert.noConflict = function () {
|
||||
$.fn.alert = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* ALERT DATA-API
|
||||
* ============== */
|
||||
|
||||
|
11
docs/assets/js/bootstrap-button.js
vendored
11
docs/assets/js/bootstrap-button.js
vendored
@@ -64,6 +64,8 @@
|
||||
/* BUTTON PLUGIN DEFINITION
|
||||
* ======================== */
|
||||
|
||||
var old = $.fn.button
|
||||
|
||||
$.fn.button = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -82,6 +84,15 @@
|
||||
$.fn.button.Constructor = Button
|
||||
|
||||
|
||||
/* BUTTON NO CONFLICT
|
||||
* ================== */
|
||||
|
||||
$.fn.button.noConflict = function () {
|
||||
$.fn.button = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* BUTTON DATA-API
|
||||
* =============== */
|
||||
|
||||
|
11
docs/assets/js/bootstrap-carousel.js
vendored
11
docs/assets/js/bootstrap-carousel.js
vendored
@@ -29,7 +29,6 @@
|
||||
var Carousel = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = options
|
||||
this.options.slide && this.slide(this.options.slide)
|
||||
this.options.pause == 'hover' && this.$element
|
||||
.on('mouseenter', $.proxy(this.pause, this))
|
||||
.on('mouseleave', $.proxy(this.cycle, this))
|
||||
@@ -141,6 +140,8 @@
|
||||
/* CAROUSEL PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var old = $.fn.carousel
|
||||
|
||||
$.fn.carousel = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -162,6 +163,14 @@
|
||||
$.fn.carousel.Constructor = Carousel
|
||||
|
||||
|
||||
/* CAROUSEL NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$.fn.carousel.noConflict = function () {
|
||||
$.fn.carousel = old
|
||||
return this
|
||||
}
|
||||
|
||||
/* CAROUSEL DATA-API
|
||||
* ================= */
|
||||
|
||||
|
17
docs/assets/js/bootstrap-collapse.js
vendored
17
docs/assets/js/bootstrap-collapse.js
vendored
@@ -120,8 +120,10 @@
|
||||
}
|
||||
|
||||
|
||||
/* COLLAPSIBLE PLUGIN DEFINITION
|
||||
* ============================== */
|
||||
/* COLLAPSE PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var old = $.fn.collapse
|
||||
|
||||
$.fn.collapse = function (option) {
|
||||
return this.each(function () {
|
||||
@@ -140,9 +142,18 @@
|
||||
$.fn.collapse.Constructor = Collapse
|
||||
|
||||
|
||||
/* COLLAPSIBLE DATA-API
|
||||
/* COLLAPSE NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$.fn.collapse.noConflict = function () {
|
||||
$.fn.collapse = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* COLLAPSE DATA-API
|
||||
* ================= */
|
||||
|
||||
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
||||
var $this = $(this), href
|
||||
, target = $this.attr('data-target')
|
||||
|
16
docs/assets/js/bootstrap-dropdown.js
vendored
16
docs/assets/js/bootstrap-dropdown.js
vendored
@@ -53,9 +53,10 @@
|
||||
|
||||
if (!isActive) {
|
||||
$parent.toggleClass('open')
|
||||
$this.focus()
|
||||
}
|
||||
|
||||
$this.focus()
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -82,7 +83,7 @@
|
||||
|
||||
if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
|
||||
|
||||
$items = $('[role=menu] li:not(.divider) a', $parent)
|
||||
$items = $('[role=menu] li:not(.divider):visible a', $parent)
|
||||
|
||||
if (!$items.length) return
|
||||
|
||||
@@ -124,6 +125,8 @@
|
||||
/* DROPDOWN PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var old = $.fn.dropdown
|
||||
|
||||
$.fn.dropdown = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -136,6 +139,15 @@
|
||||
$.fn.dropdown.Constructor = Dropdown
|
||||
|
||||
|
||||
/* DROPDOWN NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$.fn.dropdown.noConflict = function () {
|
||||
$.fn.dropdown = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
||||
* =================================== */
|
||||
|
||||
|
11
docs/assets/js/bootstrap-modal.js
vendored
11
docs/assets/js/bootstrap-modal.js
vendored
@@ -193,6 +193,8 @@
|
||||
/* MODAL PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.modal
|
||||
|
||||
$.fn.modal = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -213,6 +215,15 @@
|
||||
$.fn.modal.Constructor = Modal
|
||||
|
||||
|
||||
/* MODAL NO CONFLICT
|
||||
* ================= */
|
||||
|
||||
$.fn.modal.noConflict = function () {
|
||||
$.fn.modal = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* MODAL DATA-API
|
||||
* ============== */
|
||||
|
||||
|
11
docs/assets/js/bootstrap-popover.js
vendored
11
docs/assets/js/bootstrap-popover.js
vendored
@@ -81,6 +81,8 @@
|
||||
/* POPOVER PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.popover
|
||||
|
||||
$.fn.popover = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -100,4 +102,13 @@
|
||||
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
|
||||
})
|
||||
|
||||
|
||||
/* POPOVER NO CONFLICT
|
||||
* =================== */
|
||||
|
||||
$.fn.popover.noConflict = function () {
|
||||
$.fn.popover = old
|
||||
return this
|
||||
}
|
||||
|
||||
}(window.jQuery);
|
||||
|
13
docs/assets/js/bootstrap-scrollspy.js
vendored
13
docs/assets/js/bootstrap-scrollspy.js
vendored
@@ -59,7 +59,7 @@
|
||||
, $href = /^#\w/.test(href) && $(href)
|
||||
return ( $href
|
||||
&& $href.length
|
||||
&& [[ $href.position().top, href ]] ) || null
|
||||
&& [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
|
||||
})
|
||||
.sort(function (a, b) { return a[0] - b[0] })
|
||||
.each(function () {
|
||||
@@ -121,6 +121,8 @@
|
||||
/* SCROLLSPY PLUGIN DEFINITION
|
||||
* =========================== */
|
||||
|
||||
var old = $.fn.scrollspy
|
||||
|
||||
$.fn.scrollspy = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -138,6 +140,15 @@
|
||||
}
|
||||
|
||||
|
||||
/* SCROLLSPY NO CONFLICT
|
||||
* ===================== */
|
||||
|
||||
$.fn.scrollspy.noConflict = function () {
|
||||
$.fn.scrollspy = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* SCROLLSPY DATA-API
|
||||
* ================== */
|
||||
|
||||
|
11
docs/assets/js/bootstrap-tab.js
vendored
11
docs/assets/js/bootstrap-tab.js
vendored
@@ -110,6 +110,8 @@
|
||||
/* TAB PLUGIN DEFINITION
|
||||
* ===================== */
|
||||
|
||||
var old = $.fn.tab
|
||||
|
||||
$.fn.tab = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -122,6 +124,15 @@
|
||||
$.fn.tab.Constructor = Tab
|
||||
|
||||
|
||||
/* TAB NO CONFLICT
|
||||
* =============== */
|
||||
|
||||
$.fn.tab.noConflict = function () {
|
||||
$.fn.tab = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* TAB DATA-API
|
||||
* ============ */
|
||||
|
||||
|
11
docs/assets/js/bootstrap-tooltip.js
vendored
11
docs/assets/js/bootstrap-tooltip.js
vendored
@@ -250,6 +250,8 @@
|
||||
/* TOOLTIP PLUGIN DEFINITION
|
||||
* ========================= */
|
||||
|
||||
var old = $.fn.tooltip
|
||||
|
||||
$.fn.tooltip = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -273,4 +275,13 @@
|
||||
, html: false
|
||||
}
|
||||
|
||||
|
||||
/* TOOLTIP NO CONFLICT
|
||||
* =================== */
|
||||
|
||||
$.fn.tooltip.noConflict = function () {
|
||||
$.fn.tooltip = old
|
||||
return this
|
||||
}
|
||||
|
||||
}(window.jQuery);
|
31
docs/assets/js/bootstrap-typeahead.js
vendored
31
docs/assets/js/bootstrap-typeahead.js
vendored
@@ -33,8 +33,8 @@
|
||||
this.sorter = this.options.sorter || this.sorter
|
||||
this.highlighter = this.options.highlighter || this.highlighter
|
||||
this.updater = this.options.updater || this.updater
|
||||
this.$menu = $(this.options.menu).appendTo('body')
|
||||
this.source = this.options.source
|
||||
this.$menu = $(this.options.menu)
|
||||
this.shown = false
|
||||
this.listen()
|
||||
}
|
||||
@@ -56,16 +56,18 @@
|
||||
}
|
||||
|
||||
, show: function () {
|
||||
var pos = $.extend({}, this.$element.offset(), {
|
||||
var pos = $.extend({}, this.$element.position(), {
|
||||
height: this.$element[0].offsetHeight
|
||||
})
|
||||
|
||||
this.$menu.css({
|
||||
top: pos.top + pos.height
|
||||
, left: pos.left
|
||||
})
|
||||
this.$menu
|
||||
.insertAfter(this.$element)
|
||||
.css({
|
||||
top: pos.top + pos.height
|
||||
, left: pos.left
|
||||
})
|
||||
.show()
|
||||
|
||||
this.$menu.show()
|
||||
this.shown = true
|
||||
return this
|
||||
}
|
||||
@@ -217,7 +219,7 @@
|
||||
}
|
||||
|
||||
, keydown: function (e) {
|
||||
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
|
||||
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
|
||||
this.move(e)
|
||||
}
|
||||
|
||||
@@ -276,6 +278,8 @@
|
||||
/* TYPEAHEAD PLUGIN DEFINITION
|
||||
* =========================== */
|
||||
|
||||
var old = $.fn.typeahead
|
||||
|
||||
$.fn.typeahead = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -297,7 +301,16 @@
|
||||
$.fn.typeahead.Constructor = Typeahead
|
||||
|
||||
|
||||
/* TYPEAHEAD DATA-API
|
||||
/* TYPEAHEAD NO CONFLICT
|
||||
* =================== */
|
||||
|
||||
$.fn.typeahead.noConflict = function () {
|
||||
$.fn.typeahead = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* TYPEAHEAD DATA-API
|
||||
* ================== */
|
||||
|
||||
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
||||
|
165
docs/assets/js/bootstrap.js
vendored
165
docs/assets/js/bootstrap.js
vendored
@@ -127,6 +127,8 @@
|
||||
/* ALERT PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.alert
|
||||
|
||||
$.fn.alert = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -139,6 +141,15 @@
|
||||
$.fn.alert.Constructor = Alert
|
||||
|
||||
|
||||
/* ALERT NO CONFLICT
|
||||
* ================= */
|
||||
|
||||
$.fn.alert.noConflict = function () {
|
||||
$.fn.alert = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* ALERT DATA-API
|
||||
* ============== */
|
||||
|
||||
@@ -210,6 +221,8 @@
|
||||
/* BUTTON PLUGIN DEFINITION
|
||||
* ======================== */
|
||||
|
||||
var old = $.fn.button
|
||||
|
||||
$.fn.button = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -228,6 +241,15 @@
|
||||
$.fn.button.Constructor = Button
|
||||
|
||||
|
||||
/* BUTTON NO CONFLICT
|
||||
* ================== */
|
||||
|
||||
$.fn.button.noConflict = function () {
|
||||
$.fn.button = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* BUTTON DATA-API
|
||||
* =============== */
|
||||
|
||||
@@ -268,7 +290,6 @@
|
||||
var Carousel = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = options
|
||||
this.options.slide && this.slide(this.options.slide)
|
||||
this.options.pause == 'hover' && this.$element
|
||||
.on('mouseenter', $.proxy(this.pause, this))
|
||||
.on('mouseleave', $.proxy(this.cycle, this))
|
||||
@@ -380,6 +401,8 @@
|
||||
/* CAROUSEL PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var old = $.fn.carousel
|
||||
|
||||
$.fn.carousel = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -401,6 +424,14 @@
|
||||
$.fn.carousel.Constructor = Carousel
|
||||
|
||||
|
||||
/* CAROUSEL NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$.fn.carousel.noConflict = function () {
|
||||
$.fn.carousel = old
|
||||
return this
|
||||
}
|
||||
|
||||
/* CAROUSEL DATA-API
|
||||
* ================= */
|
||||
|
||||
@@ -534,8 +565,10 @@
|
||||
}
|
||||
|
||||
|
||||
/* COLLAPSIBLE PLUGIN DEFINITION
|
||||
* ============================== */
|
||||
/* COLLAPSE PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var old = $.fn.collapse
|
||||
|
||||
$.fn.collapse = function (option) {
|
||||
return this.each(function () {
|
||||
@@ -554,9 +587,18 @@
|
||||
$.fn.collapse.Constructor = Collapse
|
||||
|
||||
|
||||
/* COLLAPSIBLE DATA-API
|
||||
/* COLLAPSE NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$.fn.collapse.noConflict = function () {
|
||||
$.fn.collapse = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* COLLAPSE DATA-API
|
||||
* ================= */
|
||||
|
||||
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
||||
var $this = $(this), href
|
||||
, target = $this.attr('data-target')
|
||||
@@ -622,9 +664,10 @@
|
||||
|
||||
if (!isActive) {
|
||||
$parent.toggleClass('open')
|
||||
$this.focus()
|
||||
}
|
||||
|
||||
$this.focus()
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -651,7 +694,7 @@
|
||||
|
||||
if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
|
||||
|
||||
$items = $('[role=menu] li:not(.divider) a', $parent)
|
||||
$items = $('[role=menu] li:not(.divider):visible a', $parent)
|
||||
|
||||
if (!$items.length) return
|
||||
|
||||
@@ -693,6 +736,8 @@
|
||||
/* DROPDOWN PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var old = $.fn.dropdown
|
||||
|
||||
$.fn.dropdown = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -705,6 +750,15 @@
|
||||
$.fn.dropdown.Constructor = Dropdown
|
||||
|
||||
|
||||
/* DROPDOWN NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$.fn.dropdown.noConflict = function () {
|
||||
$.fn.dropdown = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
||||
* =================================== */
|
||||
|
||||
@@ -910,6 +964,8 @@
|
||||
/* MODAL PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.modal
|
||||
|
||||
$.fn.modal = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -930,6 +986,15 @@
|
||||
$.fn.modal.Constructor = Modal
|
||||
|
||||
|
||||
/* MODAL NO CONFLICT
|
||||
* ================= */
|
||||
|
||||
$.fn.modal.noConflict = function () {
|
||||
$.fn.modal = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* MODAL DATA-API
|
||||
* ============== */
|
||||
|
||||
@@ -1201,6 +1266,8 @@
|
||||
/* TOOLTIP PLUGIN DEFINITION
|
||||
* ========================= */
|
||||
|
||||
var old = $.fn.tooltip
|
||||
|
||||
$.fn.tooltip = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -1224,6 +1291,15 @@
|
||||
, html: false
|
||||
}
|
||||
|
||||
|
||||
/* TOOLTIP NO CONFLICT
|
||||
* =================== */
|
||||
|
||||
$.fn.tooltip.noConflict = function () {
|
||||
$.fn.tooltip = old
|
||||
return this
|
||||
}
|
||||
|
||||
}(window.jQuery);/* ===========================================================
|
||||
* bootstrap-popover.js v3.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
||||
@@ -1307,6 +1383,8 @@
|
||||
/* POPOVER PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.popover
|
||||
|
||||
$.fn.popover = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -1326,6 +1404,15 @@
|
||||
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
|
||||
})
|
||||
|
||||
|
||||
/* POPOVER NO CONFLICT
|
||||
* =================== */
|
||||
|
||||
$.fn.popover.noConflict = function () {
|
||||
$.fn.popover = old
|
||||
return this
|
||||
}
|
||||
|
||||
}(window.jQuery);
|
||||
/* =============================================================
|
||||
* bootstrap-scrollspy.js v3.0.0
|
||||
@@ -1388,7 +1475,7 @@
|
||||
, $href = /^#\w/.test(href) && $(href)
|
||||
return ( $href
|
||||
&& $href.length
|
||||
&& [[ $href.position().top, href ]] ) || null
|
||||
&& [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
|
||||
})
|
||||
.sort(function (a, b) { return a[0] - b[0] })
|
||||
.each(function () {
|
||||
@@ -1450,6 +1537,8 @@
|
||||
/* SCROLLSPY PLUGIN DEFINITION
|
||||
* =========================== */
|
||||
|
||||
var old = $.fn.scrollspy
|
||||
|
||||
$.fn.scrollspy = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -1467,6 +1556,15 @@
|
||||
}
|
||||
|
||||
|
||||
/* SCROLLSPY NO CONFLICT
|
||||
* ===================== */
|
||||
|
||||
$.fn.scrollspy.noConflict = function () {
|
||||
$.fn.scrollspy = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* SCROLLSPY DATA-API
|
||||
* ================== */
|
||||
|
||||
@@ -1589,6 +1687,8 @@
|
||||
/* TAB PLUGIN DEFINITION
|
||||
* ===================== */
|
||||
|
||||
var old = $.fn.tab
|
||||
|
||||
$.fn.tab = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -1601,6 +1701,15 @@
|
||||
$.fn.tab.Constructor = Tab
|
||||
|
||||
|
||||
/* TAB NO CONFLICT
|
||||
* =============== */
|
||||
|
||||
$.fn.tab.noConflict = function () {
|
||||
$.fn.tab = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* TAB DATA-API
|
||||
* ============ */
|
||||
|
||||
@@ -1644,8 +1753,8 @@
|
||||
this.sorter = this.options.sorter || this.sorter
|
||||
this.highlighter = this.options.highlighter || this.highlighter
|
||||
this.updater = this.options.updater || this.updater
|
||||
this.$menu = $(this.options.menu).appendTo('body')
|
||||
this.source = this.options.source
|
||||
this.$menu = $(this.options.menu)
|
||||
this.shown = false
|
||||
this.listen()
|
||||
}
|
||||
@@ -1667,16 +1776,18 @@
|
||||
}
|
||||
|
||||
, show: function () {
|
||||
var pos = $.extend({}, this.$element.offset(), {
|
||||
var pos = $.extend({}, this.$element.position(), {
|
||||
height: this.$element[0].offsetHeight
|
||||
})
|
||||
|
||||
this.$menu.css({
|
||||
top: pos.top + pos.height
|
||||
, left: pos.left
|
||||
})
|
||||
this.$menu
|
||||
.insertAfter(this.$element)
|
||||
.css({
|
||||
top: pos.top + pos.height
|
||||
, left: pos.left
|
||||
})
|
||||
.show()
|
||||
|
||||
this.$menu.show()
|
||||
this.shown = true
|
||||
return this
|
||||
}
|
||||
@@ -1828,7 +1939,7 @@
|
||||
}
|
||||
|
||||
, keydown: function (e) {
|
||||
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
|
||||
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
|
||||
this.move(e)
|
||||
}
|
||||
|
||||
@@ -1887,6 +1998,8 @@
|
||||
/* TYPEAHEAD PLUGIN DEFINITION
|
||||
* =========================== */
|
||||
|
||||
var old = $.fn.typeahead
|
||||
|
||||
$.fn.typeahead = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -1908,7 +2021,16 @@
|
||||
$.fn.typeahead.Constructor = Typeahead
|
||||
|
||||
|
||||
/* TYPEAHEAD DATA-API
|
||||
/* TYPEAHEAD NO CONFLICT
|
||||
* =================== */
|
||||
|
||||
$.fn.typeahead.noConflict = function () {
|
||||
$.fn.typeahead = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* TYPEAHEAD DATA-API
|
||||
* ================== */
|
||||
|
||||
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
||||
@@ -1989,6 +2111,8 @@
|
||||
/* AFFIX PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.affix
|
||||
|
||||
$.fn.affix = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
@@ -2006,6 +2130,15 @@
|
||||
}
|
||||
|
||||
|
||||
/* AFFIX NO CONFLICT
|
||||
* ================= */
|
||||
|
||||
$.fn.affix.noConflict = function () {
|
||||
$.fn.affix = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* AFFIX DATA-API
|
||||
* ============== */
|
||||
|
||||
|
2
docs/assets/js/bootstrap.min.js
vendored
2
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1823,16 +1823,16 @@
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<div class="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<button type="button" class="close" data-dismiss="alert">&times;</button>
|
||||
<strong>Warning!</strong> Best check yo self, you're not looking too good.
|
||||
</div>
|
||||
</pre>
|
||||
|
||||
<h3>Dismiss buttons</h3>
|
||||
<p>Mobile Safari and Mobile Opera browsers, in addition to the <code>data-dismiss="alert"</code> attribute, require an <code>href="#"</code> for the dismissal of alerts when using an <code><a></code> tag.</p>
|
||||
<pre class="prettyprint linenums"><a href="#" class="close" data-dismiss="alert">×</a></pre>
|
||||
<pre class="prettyprint linenums"><a href="#" class="close" data-dismiss="alert">&times;</a></pre>
|
||||
<p>Alternatively, you may use a <code><button></code> element with the data attribute, which we have opted to do for our docs. When using <code><button></code>, you must include <code>type="button"</code> or your forms may not submit.</p>
|
||||
<pre class="prettyprint linenums"><button type="button" class="close" data-dismiss="alert">×</button></pre>
|
||||
<pre class="prettyprint linenums"><button type="button" class="close" data-dismiss="alert">&times;</button></pre>
|
||||
|
||||
<h3>Dismiss alerts via JavaScript</h3>
|
||||
<p>Use the <a href="./javascript.html#alerts">alerts jQuery plugin</a> for quick and easy dismissal of alerts.</p>
|
||||
@@ -1852,7 +1852,7 @@
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<div class="alert alert-block">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<button type="button" class="close" data-dismiss="alert">&times;</button>
|
||||
<h4>Warning!</h4>
|
||||
Best check yo self, you're not...
|
||||
</div>
|
||||
|
@@ -131,9 +131,17 @@ $("#myModal").modal('show') // initializes and invokes show immed
|
||||
</pre>
|
||||
<p>Each plugin also exposes its raw constructor on a `Constructor` property: <code>$.fn.popover.Constructor</code>. If you'd like to get a particular plugin instance, retrieve it directly from an element: <code>$('[rel=popover]').data('popover')</code>.</p>
|
||||
|
||||
<h3>No conflict</h3>
|
||||
<p>Sometimes it's neccessary to use bootstrap plugins with other ui frameworks. In these circumstances, occasionally namespace collisions can occur. If this happens, you may call <code>.noCoflict</code> on the plugin you wish to revert the value of.</p>
|
||||
|
||||
<pre class="prettyprint linenums">
|
||||
var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
|
||||
$.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the bootstrap functionality
|
||||
</pre>
|
||||
|
||||
<h3>Events</h3>
|
||||
<p>Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. <code>show</code>) is triggered at the start of an event, and its past participle form (ex. <code>shown</code>) is trigger on the completion of an action.</p>
|
||||
<p>All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.</p>
|
||||
<p>All infinitive events provide <code>preventDefault</code> functionality. This provides the ability to stop the execution of an action before it starts.</p>
|
||||
<pre class="prettyprint linenums">
|
||||
$('#myModal').on('show', function (e) {
|
||||
if (!data) return e.preventDefault() // stops modal from being shown
|
||||
@@ -1122,7 +1130,7 @@ $('#my-alert').bind('closed', function () {
|
||||
<p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
|
||||
|
||||
<h4>Stateful</h4>
|
||||
<p>Add data-loading-text="Loading..." to use a loading state on a button.</p>
|
||||
<p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<button type="button" id="fat-btn" data-loading-text="loading..." class="btn btn-primary">
|
||||
Loading state
|
||||
@@ -1131,14 +1139,14 @@ $('#my-alert').bind('closed', function () {
|
||||
<pre class="prettyprint linenums"><button type="button" class="btn btn-primary" data-loading-text="Loading...">Loading state</button></pre>
|
||||
|
||||
<h4>Single toggle</h4>
|
||||
<p>Add data-toggle="button" to activate toggling on a single button.</p>
|
||||
<p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>
|
||||
</div>
|
||||
<pre class="prettyprint linenums"><button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button></pre>
|
||||
|
||||
<h4>Checkbox</h4>
|
||||
<p>Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group.</p>
|
||||
<p>Add <code>data-toggle="buttons-checkbox"</code> for checkbox style toggling on btn-group.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<div class="btn-group" data-toggle="buttons-checkbox">
|
||||
<button type="button" class="btn btn-primary">Left</button>
|
||||
@@ -1155,7 +1163,7 @@ $('#my-alert').bind('closed', function () {
|
||||
</pre>
|
||||
|
||||
<h4>Radio</h4>
|
||||
<p>Add data-toggle="buttons-radio" for radio style toggling on btn-group.</p>
|
||||
<p>Add <code>data-toggle="buttons-radio"</code> for radio style toggling on btn-group.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<div class="btn-group" data-toggle="buttons-radio">
|
||||
<button type="button" class="btn btn-primary">Left</button>
|
||||
|
8
docs/templates/pages/components.mustache
vendored
8
docs/templates/pages/components.mustache
vendored
@@ -1755,16 +1755,16 @@
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<div class="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<button type="button" class="close" data-dismiss="alert">&times;</button>
|
||||
<strong>Warning!</strong> Best check yo self, you're not looking too good.
|
||||
</div>
|
||||
</pre>
|
||||
|
||||
<h3>Dismiss buttons</h3>
|
||||
<p>Mobile Safari and Mobile Opera browsers, in addition to the <code>data-dismiss="alert"</code> attribute, require an <code>href="#"</code> for the dismissal of alerts when using an <code><a></code> tag.</p>
|
||||
<pre class="prettyprint linenums"><a href="#" class="close" data-dismiss="alert">×</a></pre>
|
||||
<pre class="prettyprint linenums"><a href="#" class="close" data-dismiss="alert">&times;</a></pre>
|
||||
<p>Alternatively, you may use a <code><button></code> element with the data attribute, which we have opted to do for our docs. When using <code><button></code>, you must include <code>type="button"</code> or your forms may not submit.</p>
|
||||
<pre class="prettyprint linenums"><button type="button" class="close" data-dismiss="alert">×</button></pre>
|
||||
<pre class="prettyprint linenums"><button type="button" class="close" data-dismiss="alert">&times;</button></pre>
|
||||
|
||||
<h3>Dismiss alerts via JavaScript</h3>
|
||||
<p>Use the <a href="./javascript.html#alerts">alerts jQuery plugin</a> for quick and easy dismissal of alerts.</p>
|
||||
@@ -1784,7 +1784,7 @@
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<div class="alert alert-block">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<button type="button" class="close" data-dismiss="alert">&times;</button>
|
||||
<h4>Warning!</h4>
|
||||
Best check yo self, you're not...
|
||||
</div>
|
||||
|
18
docs/templates/pages/javascript.mustache
vendored
18
docs/templates/pages/javascript.mustache
vendored
@@ -63,9 +63,17 @@ $("#myModal").modal('show') // initializes and invokes show immed
|
||||
</pre>
|
||||
<p>Each plugin also exposes its raw constructor on a `Constructor` property: <code>$.fn.popover.Constructor</code>. If you'd like to get a particular plugin instance, retrieve it directly from an element: <code>$('[rel=popover]').data('popover')</code>.</p>
|
||||
|
||||
<h3>No conflict</h3>
|
||||
<p>Sometimes it's neccessary to use bootstrap plugins with other ui frameworks. In these circumstances, occasionally namespace collisions can occur. If this happens, you may call <code>.noCoflict</code> on the plugin you wish to revert the value of.</p>
|
||||
|
||||
<pre class="prettyprint linenums">
|
||||
var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
|
||||
$.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the bootstrap functionality
|
||||
</pre>
|
||||
|
||||
<h3>Events</h3>
|
||||
<p>Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. <code>show</code>) is triggered at the start of an event, and its past participle form (ex. <code>shown</code>) is trigger on the completion of an action.</p>
|
||||
<p>All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.</p>
|
||||
<p>All infinitive events provide <code>preventDefault</code> functionality. This provides the ability to stop the execution of an action before it starts.</p>
|
||||
<pre class="prettyprint linenums">
|
||||
$('#myModal').on('show', function (e) {
|
||||
if (!data) return e.preventDefault() // stops modal from being shown
|
||||
@@ -1055,7 +1063,7 @@ $('#my-alert').bind('closed', function () {
|
||||
<p>Do more with buttons. Control button states or create groups of buttons for more components like toolbars.</p>
|
||||
|
||||
<h4>Stateful</h4>
|
||||
<p>Add data-loading-text="Loading..." to use a loading state on a button.</p>
|
||||
<p>Add <code>data-loading-text="Loading..."</code> to use a loading state on a button.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<button type="button" id="fat-btn" data-loading-text="loading..." class="btn btn-primary">
|
||||
Loading state
|
||||
@@ -1064,14 +1072,14 @@ $('#my-alert').bind('closed', function () {
|
||||
<pre class="prettyprint linenums"><button type="button" class="btn btn-primary" data-loading-text="Loading...">Loading state</button></pre>
|
||||
|
||||
<h4>Single toggle</h4>
|
||||
<p>Add data-toggle="button" to activate toggling on a single button.</p>
|
||||
<p>Add <code>data-toggle="button"</code> to activate toggling on a single button.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button>
|
||||
</div>{{! /example }}
|
||||
<pre class="prettyprint linenums"><button type="button" class="btn btn-primary" data-toggle="button">Single Toggle</button></pre>
|
||||
|
||||
<h4>Checkbox</h4>
|
||||
<p>Add data-toggle="buttons-checkbox" for checkbox style toggling on btn-group.</p>
|
||||
<p>Add <code>data-toggle="buttons-checkbox"</code> for checkbox style toggling on btn-group.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<div class="btn-group" data-toggle="buttons-checkbox">
|
||||
<button type="button" class="btn btn-primary">Left</button>
|
||||
@@ -1088,7 +1096,7 @@ $('#my-alert').bind('closed', function () {
|
||||
</pre>
|
||||
|
||||
<h4>Radio</h4>
|
||||
<p>Add data-toggle="buttons-radio" for radio style toggling on btn-group.</p>
|
||||
<p>Add <code>data-toggle="buttons-radio"</code> for radio style toggling on btn-group.</p>
|
||||
<div class="bs-docs-example" style="padding-bottom: 24px;">
|
||||
<div class="btn-group" data-toggle="buttons-radio">
|
||||
<button type="button" class="btn btn-primary">Left</button>
|
||||
|
Reference in New Issue
Block a user