This commit is contained in:
Gleb Mazovetskiy 2014-10-11 21:42:28 +02:00
Родитель a7ac2b104e
Коммит 90951edcc8
15 изменённых файлов: 76 добавлений и 78 удалений

55
assets/javascripts/bootstrap.js поставляемый
Просмотреть файл

@ -387,7 +387,7 @@
// =========================
var Carousel = function (element, options) {
this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.paused =
@ -396,7 +396,9 @@
this.$active =
this.$items = null
this.options.pause == 'hover' && this.$element
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
@ -408,7 +410,8 @@
Carousel.DEFAULTS = {
interval: 5000,
pause: 'hover',
wrap: true
wrap: true,
keyboard: true
}
Carousel.prototype.keydown = function (e) {
@ -836,7 +839,7 @@
}
Dropdown.prototype.keydown = function (e) {
if (!/(38|40|27)/.test(e.keyCode)) return
if (!/(38|40|27|32)/.test(e.which)) return
var $this = $(this)
@ -848,7 +851,7 @@
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}
@ -860,8 +863,8 @@
var index = $items.index($items.filter(':focus'))
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
$items.eq(index).trigger('focus')
@ -1411,9 +1414,6 @@
this.isShown = false
this.$body.removeClass('modal-open')
this.resetScrollbar()
this.escape()
$(document).off('focusin.bs.modal')
@ -1454,6 +1454,8 @@
var that = this
this.$element.hide()
this.backdrop(function () {
that.$body.removeClass('modal-open')
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
}
@ -1471,14 +1473,13 @@
var doAnimate = $.support.transition && animate
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus.call(this.$element[0])
: this.hide.call(this)
}, this))
.prependTo(this.$element)
.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus.call(this.$element[0])
: this.hide.call(this)
}, this))
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
@ -1776,13 +1777,13 @@
if (autoPlace) {
var orgPlacement = placement
var $parent = this.$element.parent()
var parentDim = this.getPosition($parent)
var $container = this.options.container ? $(this.options.container) : this.$element.parent()
var containerDim = this.getPosition($container)
placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' :
placement == 'top' && pos.top - parentDim.scroll - actualHeight < parentDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' :
placement = placement == 'bottom' && pos.top + pos.height + actualHeight - containerDim.scroll > containerDim.height ? 'top' :
placement == 'top' && pos.top - containerDim.scroll - actualHeight < containerDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
placement
$tip
@ -1917,7 +1918,6 @@
var el = $element[0]
var isBody = el.tagName == 'BODY'
var isSvg = window.SVGElement && el instanceof window.SVGElement
var elRect = el.getBoundingClientRect()
if (elRect.width == null) {
@ -1926,10 +1926,7 @@
}
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isSvg ? {} : {
width: isBody ? $(window).width() : $element.outerWidth(),
height: isBody ? $(window).height() : $element.outerHeight()
}
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
return $.extend({}, elRect, scroll, outerDims, elOffset)
}

Просмотреть файл

@ -14,7 +14,7 @@
// =========================
var Carousel = function (element, options) {
this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.paused =
@ -23,7 +23,9 @@
this.$active =
this.$items = null
this.options.pause == 'hover' && this.$element
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
@ -35,7 +37,8 @@
Carousel.DEFAULTS = {
interval: 5000,
pause: 'hover',
wrap: true
wrap: true,
keyboard: true
}
Carousel.prototype.keydown = function (e) {

Просмотреть файл

@ -55,7 +55,7 @@
}
Dropdown.prototype.keydown = function (e) {
if (!/(38|40|27)/.test(e.keyCode)) return
if (!/(38|40|27|32)/.test(e.which)) return
var $this = $(this)
@ -67,7 +67,7 @@
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}
@ -79,8 +79,8 @@
var index = $items.index($items.filter(':focus'))
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
$items.eq(index).trigger('focus')

Просмотреть файл

@ -107,9 +107,6 @@
this.isShown = false
this.$body.removeClass('modal-open')
this.resetScrollbar()
this.escape()
$(document).off('focusin.bs.modal')
@ -150,6 +147,8 @@
var that = this
this.$element.hide()
this.backdrop(function () {
that.$body.removeClass('modal-open')
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
}
@ -167,14 +166,13 @@
var doAnimate = $.support.transition && animate
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus.call(this.$element[0])
: this.hide.call(this)
}, this))
.prependTo(this.$element)
.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus.call(this.$element[0])
: this.hide.call(this)
}, this))
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow

Просмотреть файл

@ -188,13 +188,13 @@
if (autoPlace) {
var orgPlacement = placement
var $parent = this.$element.parent()
var parentDim = this.getPosition($parent)
var $container = this.options.container ? $(this.options.container) : this.$element.parent()
var containerDim = this.getPosition($container)
placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' :
placement == 'top' && pos.top - parentDim.scroll - actualHeight < parentDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' :
placement = placement == 'bottom' && pos.top + pos.height + actualHeight - containerDim.scroll > containerDim.height ? 'top' :
placement == 'top' && pos.top - containerDim.scroll - actualHeight < containerDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
placement
$tip
@ -329,7 +329,6 @@
var el = $element[0]
var isBody = el.tagName == 'BODY'
var isSvg = window.SVGElement && el instanceof window.SVGElement
var elRect = el.getBoundingClientRect()
if (elRect.width == null) {
@ -338,10 +337,7 @@
}
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isSvg ? {} : {
width: isBody ? $(window).width() : $element.outerWidth(),
height: isBody ? $(window).height() : $element.outerHeight()
}
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
return $.extend({}, elRect, scroll, outerDims, elOffset)
}

Просмотреть файл

@ -17,8 +17,9 @@
.collapse {
display: none;
visibility: hidden;
&.in { display: block; }
&.in { display: block; visibility: visible; }
// [converter] extracted tr&.in to tr.collapse.in
// [converter] extracted tbody&.in to tbody.collapse.in
}
@ -31,5 +32,7 @@ tbody.collapse.in { display: table-row-group; }
position: relative;
height: 0;
overflow: hidden;
@include transition(height .35s ease);
@include transition-property(height, visibility);
@include transition-duration(.35s);
@include transition-timing-function(ease);
}

Просмотреть файл

@ -30,10 +30,10 @@
// When fading in the modal, animate it to slide down
&.fade .modal-dialog {
@include translate3d(0, -25%, 0);
@include translate(0, -25%);
@include transition-transform(0.3s ease-out);
}
&.in .modal-dialog { @include translate3d(0, 0, 0) }
&.in .modal-dialog { @include translate(0, 0) }
}
.modal-open .modal {
overflow-x: hidden;
@ -67,7 +67,6 @@
right: 0;
bottom: 0;
left: 0;
z-index: $zindex-modal-background;
background-color: $modal-backdrop-bg;
// Fade for backdrop
&.fade { @include opacity(0); }

Просмотреть файл

@ -67,6 +67,7 @@
&.collapse {
display: block !important;
visibility: visible !important;
height: auto !important;
padding-bottom: 0; // Override default setting
overflow: visible !important;
@ -141,7 +142,6 @@
right: 0;
left: 0;
z-index: $zindex-navbar-fixed;
@include translate3d(0, 0, 0);
// Undo the rounded corners
@media (min-width: $grid-float-breakpoint) {

Просмотреть файл

@ -223,9 +223,11 @@
.tab-content {
> .tab-pane {
display: none;
visibility: hidden;
}
> .active {
display: block;
visibility: visible;
}
}

Просмотреть файл

@ -1,4 +1,4 @@
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
//
// 1. Set default font family to sans-serif.
@ -25,7 +25,8 @@ body {
//
// Correct `block` display not defined for any HTML5 element in IE 8/9.
// Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
// Correct `block` display not defined for `details` or `summary` in IE 10/11
// and Firefox.
// Correct `block` display not defined for `main` in IE 11.
//
@ -38,6 +39,7 @@ footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
@ -85,7 +87,7 @@ template {
//
a {
background: transparent;
background-color: transparent;
}
//

Просмотреть файл

@ -216,6 +216,7 @@
.panel {
margin-bottom: 0;
border-radius: $panel-border-radius;
+ .panel {
margin-top: 5px;
}
@ -223,10 +224,13 @@
.panel-heading {
border-bottom: 0;
+ .panel-collapse > .panel-body {
+ .panel-collapse > .panel-body,
+ .panel-collapse > .list-group {
border-top: 1px solid $panel-inner-border;
}
}
.panel-footer {
border-top: 0;
+ .panel-collapse .panel-body {

Просмотреть файл

@ -12,7 +12,8 @@
.embed-responsive-item,
iframe,
embed,
object {
object,
video {
position: absolute;
top: 0;
left: 0;

Просмотреть файл

@ -290,12 +290,6 @@ blockquote.pull-right {
}
}
// Quotes
blockquote:before,
blockquote:after {
content: "";
}
// Addresses
address {
margin-bottom: $line-height-computed;

Просмотреть файл

@ -268,8 +268,7 @@ $zindex-dropdown: 1000 !default;
$zindex-popover: 1060 !default;
$zindex-tooltip: 1070 !default;
$zindex-navbar-fixed: 1030 !default;
$zindex-modal-background: 1040 !default;
$zindex-modal: 1050 !default;
$zindex-modal: 1040 !default;
//== Media queries breakpoints

Просмотреть файл

@ -1,4 +1,4 @@
module Bootstrap
VERSION = '3.2.0.2'
BOOTSTRAP_SHA = 'e33922eb06387fd4ed3a090360a2bc38cf7b8d70'
BOOTSTRAP_SHA = '4a89fd02b743d5a99e06dbf6e87b8a58366c3dcb'
end