Skip to content

Commit

Permalink
rake update[v4-dev]
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Nov 17, 2015
1 parent c00bd69 commit 289d93f
Show file tree
Hide file tree
Showing 25 changed files with 146 additions and 317 deletions.
30 changes: 15 additions & 15 deletions assets/javascripts/bootstrap.js
Expand Up @@ -10,8 +10,8 @@ if (typeof jQuery === 'undefined') {

+function ($) {
var version = $.fn.jquery.split(' ')[0].split('.')
if (version[0] !== '2') {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 2.x.x')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 3)) {
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v3.0.0')
}
}(jQuery);

Expand Down Expand Up @@ -1786,7 +1786,7 @@ var Modal = (function ($) {
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
$(_this7._element).one(Event.MOUSEUP_DISMISS, function (event) {
if ($(event.target).is(_this7._element)) {
that._ignoreBackdropClick = true;
_this7._ignoreBackdropClick = true;
}
});
});
Expand Down Expand Up @@ -2753,6 +2753,8 @@ var Tab = (function ($) {
return Tab;
})(jQuery);

/* global Tether */

/**
* --------------------------------------------------------------------------
* Bootstrap (v4.0.0): tooltip.js
Expand All @@ -2762,6 +2764,14 @@ var Tab = (function ($) {

var Tooltip = (function ($) {

/**
* Check for Tether dependency
* Tether - http://github.hubspot.com/tether/
*/
if (window.Tether === undefined) {
throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)');
}

/**
* ------------------------------------------------------------------------
* Constants
Expand Down Expand Up @@ -2997,7 +3007,8 @@ var Tooltip = (function ($) {
classes: TetherClass,
classPrefix: CLASS_PREFIX,
offset: this.config.offset,
constraints: this.config.constraints
constraints: this.config.constraints,
addTargetClasses: false
});

Util.reflow(tip);
Expand Down Expand Up @@ -3119,12 +3130,6 @@ var Tooltip = (function ($) {
value: function cleanupTether() {
if (this._tether) {
this._tether.destroy();

// clean up after tether's junk classes
// remove after they fix issue
// (https://github.com/HubSpot/tether/issues/36)
$(this.element).removeClass(this._removeTetherClasses);
$(this.tip).removeClass(this._removeTetherClasses);
}
}

Expand Down Expand Up @@ -3162,11 +3167,6 @@ var Tooltip = (function ($) {
this._fixTitle();
}
}
}, {
key: '_removeTetherClasses',
value: function _removeTetherClasses(i, css) {
return ((css.baseVal || css).match(new RegExp('(^|\\s)' + CLASS_PREFIX + '-\\S+', 'g')) || []).join(' ');
}
}, {
key: '_fixTitle',
value: function _fixTitle() {
Expand Down
217 changes: 2 additions & 215 deletions assets/javascripts/bootstrap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/javascripts/bootstrap/modal.js
Expand Up @@ -138,7 +138,7 @@ var Modal = (function ($) {
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
if ($(event.target).is(_this._element)) {
that._ignoreBackdropClick = true;
_this._ignoreBackdropClick = true;
}
});
});
Expand Down
24 changes: 12 additions & 12 deletions assets/javascripts/bootstrap/tooltip.js
@@ -1,3 +1,5 @@
/* global Tether */

'use strict';

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
Expand All @@ -13,6 +15,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons

var Tooltip = (function ($) {

/**
* Check for Tether dependency
* Tether - http://github.hubspot.com/tether/
*/
if (window.Tether === undefined) {
throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)');
}

/**
* ------------------------------------------------------------------------
* Constants
Expand Down Expand Up @@ -248,7 +258,8 @@ var Tooltip = (function ($) {
classes: TetherClass,
classPrefix: CLASS_PREFIX,
offset: this.config.offset,
constraints: this.config.constraints
constraints: this.config.constraints,
addTargetClasses: false
});

Util.reflow(tip);
Expand Down Expand Up @@ -370,12 +381,6 @@ var Tooltip = (function ($) {
value: function cleanupTether() {
if (this._tether) {
this._tether.destroy();

// clean up after tether's junk classes
// remove after they fix issue
// (https://github.com/HubSpot/tether/issues/36)
$(this.element).removeClass(this._removeTetherClasses);
$(this.tip).removeClass(this._removeTetherClasses);
}
}

Expand Down Expand Up @@ -413,11 +418,6 @@ var Tooltip = (function ($) {
this._fixTitle();
}
}
}, {
key: '_removeTetherClasses',
value: function _removeTetherClasses(i, css) {
return ((css.baseVal || css).match(new RegExp('(^|\\s)' + CLASS_PREFIX + '-\\S+', 'g')) || []).join(' ');
}
}, {
key: '_fixTitle',
value: function _fixTitle() {
Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/bootstrap/_alert.scss
Expand Up @@ -5,7 +5,7 @@
.alert {
padding: $alert-padding;
margin-bottom: $spacer-y;
border: 1px solid transparent;
border: $alert-border-width solid transparent;
@include border-radius($alert-border-radius);

// Improve alignment and spacing of inner content
Expand Down
1 change: 0 additions & 1 deletion assets/stylesheets/bootstrap/_buttons.scss
Expand Up @@ -8,7 +8,6 @@
text-align: center;
white-space: nowrap;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
user-select: none;
border: $border-width solid transparent;
Expand Down
11 changes: 8 additions & 3 deletions assets/stylesheets/bootstrap/_card.scss
Expand Up @@ -4,6 +4,7 @@

.card {
position: relative;
display: block;
margin-bottom: $card-spacer-y;
background-color: $card-bg;
border: $card-border-width solid $card-border-color;
Expand Down Expand Up @@ -135,7 +136,7 @@
}
.card-link {
@include hover-focus {
color: #fff;
color: $card-link-hover-color;
}
}
}
Expand Down Expand Up @@ -169,10 +170,10 @@

// Card image caps
.card-img-top {
@include border-radius(.25rem .25rem 0 0);
@include border-radius($card-border-radius-inner $card-border-radius-inner 0 0);
}
.card-img-bottom {
@include border-radius(0 0 .25rem .25rem);
@include border-radius(0 0 $card-border-radius-inner $card-border-radius-inner);
}


Expand Down Expand Up @@ -246,6 +247,8 @@
// Handle rounded corners
@if $enable-rounded {
&:first-child {
@include border-right-radius(0);

.card-img-top {
border-top-right-radius: 0;
}
Expand All @@ -254,6 +257,8 @@
}
}
&:last-child {
@include border-left-radius(0);

.card-img-top {
border-top-left-radius: 0;
}
Expand Down
6 changes: 3 additions & 3 deletions assets/stylesheets/bootstrap/_carousel.scss
Expand Up @@ -178,9 +178,9 @@
cursor: pointer;
// IE9 hack for event handling
//
// Internet Explorer 9 does not support clicks on elements without a set
// `background-color`. We cannot use `filter` since that's not viewed as a
// background color by the browser. Thus, a hack is needed.
// Internet Explorer 9 does not properly handle clicks on elements with a `background-color` of `transparent`,
// so we use `rgba(0,0,0,0)` instead since it's a non-buggy equivalent.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
background-color: rgba(0,0,0,0); // IE9
border: 1px solid $carousel-indicator-border-color;
border-radius: 10px;
Expand Down
4 changes: 3 additions & 1 deletion assets/stylesheets/bootstrap/_dropdown.scss
Expand Up @@ -10,6 +10,7 @@
display: inline-block;
width: 0;
height: 0;
margin-right: .25rem;
margin-left: .25rem;
vertical-align: middle;
content: "";
Expand Down Expand Up @@ -45,6 +46,7 @@
padding: 5px 0;
margin: 2px 0 0; // override default ul
font-size: $font-size-base;
color: $body-color;
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
list-style: none;
background-color: $dropdown-bg;
Expand Down Expand Up @@ -170,7 +172,7 @@

// Allow for dropdowns to go bottom up (aka, dropup-menu)
//
// Just add .dropup after the standard .dropdown class and you're set, bro.
// Just add .dropup after the standard .dropdown class and you're set.
// TODO: abstract this so that the navbar fixed styles are not placed here?

.dropup,
Expand Down
10 changes: 5 additions & 5 deletions assets/stylesheets/bootstrap/_forms.scss
Expand Up @@ -261,7 +261,7 @@ input[type="checkbox"] {

.form-control-success,
.form-control-warning,
.form-control-error {
.form-control-danger {
padding-right: ($input-padding-x * 3);
background-repeat: no-repeat;
background-position: center right ($input-height * .25);
Expand All @@ -285,11 +285,11 @@ input[type="checkbox"] {
}
}

.has-error {
.has-danger {
@include form-control-validation($brand-danger);

.form-control-error {
background-image: url($form-icon-error);
.form-control-danger {
background-image: url($form-icon-danger);
}
}

Expand Down Expand Up @@ -354,7 +354,7 @@ input[type="checkbox"] {
// .has-warning {
// @include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
// }
// .has-error {
// .has-danger {
// @include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
// }
//
Expand Down
25 changes: 25 additions & 0 deletions assets/stylesheets/bootstrap/_images.scss
@@ -1,4 +1,10 @@
// Responsive images (ensure images don't scale beyond their parents)
//
// This is purposefully opt-in via an explicit class rather than being the default for all `<img>`s.
// We previously tried the "images are responsive by default" approach in Bootstrap v2,
// and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps)
// which weren't expecting the images within themselves to be involuntarily resized.
// See also https://github.com/twbs/bootstrap/issues/18178
.img-fluid {
@include img-fluid();
}
Expand Down Expand Up @@ -26,3 +32,22 @@
.img-circle {
border-radius: 50%;
}

//
// Figures
//

.figure {
// Ensures the caption's text aligns with the image.
display: inline-block;
}

.figure-img {
margin-bottom: ($spacer-y / 2);
line-height: 1;
}

.figure-caption {
font-size: 90%;
color: $gray-light;
}
4 changes: 3 additions & 1 deletion assets/stylesheets/bootstrap/_labels.scss
Expand Up @@ -43,7 +43,9 @@ a.label {
.label-pill {
padding-right: .6em;
padding-left: .6em;
@include border-radius(1rem);
// Use a higher than normal value to ensure completely rounded edges when
// customizing padding or font-size on labels.
@include border-radius(10rem);
}

// Colors
Expand Down
2 changes: 2 additions & 0 deletions assets/stylesheets/bootstrap/_nav.scss
Expand Up @@ -91,6 +91,8 @@
//

.nav-pills {
@include clearfix();

.nav-item {
float: left;

Expand Down
29 changes: 29 additions & 0 deletions assets/stylesheets/bootstrap/_reboot.scss
Expand Up @@ -191,6 +191,8 @@ img {
// By default, `<img>`s are `inline-block`. This assumes that, and vertically
// centers them. This won't apply should you reset them to `block` level.
vertical-align: middle;
// Note: `<img>`s are deliberately not made responsive by default.
// For the rationale behind this, see the comments on the `.img-fluid` class.
}


Expand All @@ -205,6 +207,28 @@ img {
}


// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
//
// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11
// DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present.
// However, they DO support removing the click delay via `touch-action: manipulation`.
// See:
// * http://v4-alpha.getbootstrap.com/content/reboot/#click-delay-optimization-for-touch
// * http://caniuse.com/#feat=css-touch-action
// * http://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay

a,
area,
button,
[role="button"],
input,
label,
select,
summary,
textarea {
touch-action: manipulation;
}

//
// Tables
//
Expand Down Expand Up @@ -296,3 +320,8 @@ output {
// line-height: $line-height;
// color: $input-color;
}

// Always hide an element with the `hidden` HTML attribute (from PureCSS).
[hidden] {
display: none !important;
}
3 changes: 0 additions & 3 deletions assets/stylesheets/bootstrap/_responsive-embed.scss
Expand Up @@ -22,17 +22,14 @@
}
}

// Modifier class for 21:9 aspect ratio
.embed-responsive-21by9 {
padding-bottom: percentage(9 / 21);
}

// Modifier class for 16:9 aspect ratio
.embed-responsive-16by9 {
padding-bottom: percentage(9 / 16);
}

// Modifier class for 4:3 aspect ratio
.embed-responsive-4by3 {
padding-bottom: percentage(3 / 4);
}

0 comments on commit 289d93f

Please sign in to comment.