Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2014-10-11 23:42:28 +0400
committerGleb Mazovetskiy <glex.spb@gmail.com>2014-10-11 23:42:28 +0400
commit90951edcc8933d417b44d5a07f02e2022a58fbf5 (patch)
treeabdf164c2e0d232e1a30ac44996de12b0059dc31 /assets
parenta7ac2b104eb58cfc6f3c94d633be8ddece6f252f (diff)
rake convert
Diffstat (limited to 'assets')
-rw-r--r--assets/javascripts/bootstrap.js55
-rw-r--r--assets/javascripts/bootstrap/carousel.js9
-rw-r--r--assets/javascripts/bootstrap/dropdown.js8
-rw-r--r--assets/javascripts/bootstrap/modal.js20
-rw-r--r--assets/javascripts/bootstrap/tooltip.js18
-rw-r--r--assets/stylesheets/bootstrap/_component-animations.scss7
-rw-r--r--assets/stylesheets/bootstrap/_modals.scss5
-rw-r--r--assets/stylesheets/bootstrap/_navbar.scss2
-rw-r--r--assets/stylesheets/bootstrap/_navs.scss2
-rw-r--r--assets/stylesheets/bootstrap/_normalize.scss8
-rw-r--r--assets/stylesheets/bootstrap/_panels.scss6
-rw-r--r--assets/stylesheets/bootstrap/_responsive-embed.scss3
-rw-r--r--assets/stylesheets/bootstrap/_type.scss6
-rw-r--r--assets/stylesheets/bootstrap/_variables.scss3
14 files changed, 75 insertions, 77 deletions
diff --git a/assets/javascripts/bootstrap.js b/assets/javascripts/bootstrap.js
index e7db313..59f0a03 100644
--- a/assets/javascripts/bootstrap.js
+++ b/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)
}
diff --git a/assets/javascripts/bootstrap/carousel.js b/assets/javascripts/bootstrap/carousel.js
index 65cc7b9..b688990 100644
--- a/assets/javascripts/bootstrap/carousel.js
+++ b/assets/javascripts/bootstrap/carousel.js
@@ -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) {
diff --git a/assets/javascripts/bootstrap/dropdown.js b/assets/javascripts/bootstrap/dropdown.js
index 756fc21..8fa7127 100644
--- a/assets/javascripts/bootstrap/dropdown.js
+++ b/assets/javascripts/bootstrap/dropdown.js
@@ -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')
diff --git a/assets/javascripts/bootstrap/modal.js b/assets/javascripts/bootstrap/modal.js
index d0426b0..6e2ac7e 100644
--- a/assets/javascripts/bootstrap/modal.js
+++ b/assets/javascripts/bootstrap/modal.js
@@ -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
diff --git a/assets/javascripts/bootstrap/tooltip.js b/assets/javascripts/bootstrap/tooltip.js
index 9932c0b..ff33a4f 100644
--- a/assets/javascripts/bootstrap/tooltip.js
+++ b/assets/javascripts/bootstrap/tooltip.js
@@ -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)
}
diff --git a/assets/stylesheets/bootstrap/_component-animations.scss b/assets/stylesheets/bootstrap/_component-animations.scss
index 8c3fd07..1f76b8c 100644
--- a/assets/stylesheets/bootstrap/_component-animations.scss
+++ b/assets/stylesheets/bootstrap/_component-animations.scss
@@ -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);
}
diff --git a/assets/stylesheets/bootstrap/_modals.scss b/assets/stylesheets/bootstrap/_modals.scss
index e4c1047..fea4f36 100644
--- a/assets/stylesheets/bootstrap/_modals.scss
+++ b/assets/stylesheets/bootstrap/_modals.scss
@@ -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); }
diff --git a/assets/stylesheets/bootstrap/_navbar.scss b/assets/stylesheets/bootstrap/_navbar.scss
index 61280d2..8737ad3 100644
--- a/assets/stylesheets/bootstrap/_navbar.scss
+++ b/assets/stylesheets/bootstrap/_navbar.scss
@@ -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) {
diff --git a/assets/stylesheets/bootstrap/_navs.scss b/assets/stylesheets/bootstrap/_navs.scss
index b736fb1..d61090e 100644
--- a/assets/stylesheets/bootstrap/_navs.scss
+++ b/assets/stylesheets/bootstrap/_navs.scss
@@ -223,9 +223,11 @@
.tab-content {
> .tab-pane {
display: none;
+ visibility: hidden;
}
> .active {
display: block;
+ visibility: visible;
}
}
diff --git a/assets/stylesheets/bootstrap/_normalize.scss b/assets/stylesheets/bootstrap/_normalize.scss
index ce04b6a..62a085a 100644
--- a/assets/stylesheets/bootstrap/_normalize.scss
+++ b/assets/stylesheets/bootstrap/_normalize.scss
@@ -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;
}
//
diff --git a/assets/stylesheets/bootstrap/_panels.scss b/assets/stylesheets/bootstrap/_panels.scss
index beb85bc..6c323d9 100644
--- a/assets/stylesheets/bootstrap/_panels.scss
+++ b/assets/stylesheets/bootstrap/_panels.scss
@@ -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 {
diff --git a/assets/stylesheets/bootstrap/_responsive-embed.scss b/assets/stylesheets/bootstrap/_responsive-embed.scss
index a884d49..c1fa8f8 100644
--- a/assets/stylesheets/bootstrap/_responsive-embed.scss
+++ b/assets/stylesheets/bootstrap/_responsive-embed.scss
@@ -12,7 +12,8 @@
.embed-responsive-item,
iframe,
embed,
- object {
+ object,
+ video {
position: absolute;
top: 0;
left: 0;
diff --git a/assets/stylesheets/bootstrap/_type.scss b/assets/stylesheets/bootstrap/_type.scss
index 8167db9..62d685c 100644
--- a/assets/stylesheets/bootstrap/_type.scss
+++ b/assets/stylesheets/bootstrap/_type.scss
@@ -290,12 +290,6 @@ blockquote.pull-right {
}
}
-// Quotes
-blockquote:before,
-blockquote:after {
- content: "";
-}
-
// Addresses
address {
margin-bottom: $line-height-computed;
diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss
index d2e0d4a..6dd9c82 100644
--- a/assets/stylesheets/bootstrap/_variables.scss
+++ b/assets/stylesheets/bootstrap/_variables.scss
@@ -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