mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 21:49:09 +01:00
Merge branch '3.0.0-wip' of github.com:twbs/bootstrap into 3.0.0-wip
This commit is contained in:
commit
e46708f7ce
6
dist/css/bootstrap.css
vendored
6
dist/css/bootstrap.css
vendored
@ -3830,9 +3830,9 @@ button.close {
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
background-clip: padding-box;
|
||||
-webkit-bg-clip: padding-box;
|
||||
-moz-bg-clip: padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.popover.top {
|
||||
|
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
6
dist/js/bootstrap.js
vendored
6
dist/js/bootstrap.js
vendored
@ -656,7 +656,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
|
||||
var $parent = parent && $(parent)
|
||||
|
||||
if (!data || !data.transitioning) {
|
||||
if ($parent) $parent.find('[data-toggle=collapse][data-parent=' + parent + ']').not($this).addClass('collapsed')
|
||||
if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
||||
}
|
||||
|
||||
@ -1245,7 +1245,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
|
||||
.addClass(placement)
|
||||
}
|
||||
|
||||
var calculatedOffset = this.getCalcuatedOffset(placement, pos, actualWidth, actualHeight)
|
||||
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
|
||||
|
||||
this.applyPlacement(calculatedOffset, placement)
|
||||
this.$element.trigger('shown.bs.' + this.type)
|
||||
@ -1358,7 +1358,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
|
||||
}, this.$element.offset())
|
||||
}
|
||||
|
||||
Tooltip.prototype.getCalcuatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
|
||||
|
2
dist/js/bootstrap.min.js
vendored
2
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -169,7 +169,7 @@
|
||||
var $parent = parent && $(parent)
|
||||
|
||||
if (!data || !data.transitioning) {
|
||||
if ($parent) $parent.find('[data-toggle=collapse][data-parent=' + parent + ']').not($this).addClass('collapsed')
|
||||
if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
||||
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
||||
}
|
||||
|
||||
|
@ -126,4 +126,39 @@ $(function () {
|
||||
target3.click()
|
||||
})
|
||||
|
||||
test("should allow dots in data-parent", function () {
|
||||
$.support.transition = false
|
||||
stop()
|
||||
|
||||
var accordion = $('<div class="accordion"><div class="accordion-group"></div><div class="accordion-group"></div><div class="accordion-group"></div></div>')
|
||||
.appendTo($('#qunit-fixture'))
|
||||
|
||||
var target1 = $('<a data-toggle="collapse" href="#body1" data-parent=".accordion"></a>')
|
||||
.appendTo(accordion.find('.accordion-group').eq(0))
|
||||
|
||||
var collapsible1 = $('<div id="body1" class="in"></div>')
|
||||
.appendTo(accordion.find('.accordion-group').eq(0))
|
||||
|
||||
var target2 = $('<a class="collapsed" data-toggle="collapse" href="#body2" data-parent=".accordion"></a>')
|
||||
.appendTo(accordion.find('.accordion-group').eq(1))
|
||||
|
||||
var collapsible2 = $('<div id="body2"></div>')
|
||||
.appendTo(accordion.find('.accordion-group').eq(1))
|
||||
|
||||
var target3 = $('<a class="collapsed" data-toggle="collapse" href="#body3" data-parent=".accordion"></a>')
|
||||
.appendTo(accordion.find('.accordion-group').eq(2))
|
||||
|
||||
var collapsible3 = $('<div id="body3"></div>')
|
||||
.appendTo(accordion.find('.accordion-group').eq(2))
|
||||
.on('show.bs.collapse', function () {
|
||||
ok(target1.hasClass('collapsed'))
|
||||
ok(target2.hasClass('collapsed'))
|
||||
ok(!target3.hasClass('collapsed'))
|
||||
|
||||
start()
|
||||
})
|
||||
|
||||
target3.click()
|
||||
})
|
||||
|
||||
})
|
||||
|
@ -179,7 +179,7 @@
|
||||
.addClass(placement)
|
||||
}
|
||||
|
||||
var calculatedOffset = this.getCalcuatedOffset(placement, pos, actualWidth, actualHeight)
|
||||
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
|
||||
|
||||
this.applyPlacement(calculatedOffset, placement)
|
||||
this.$element.trigger('shown.bs.' + this.type)
|
||||
@ -292,7 +292,7 @@
|
||||
}, this.$element.offset())
|
||||
}
|
||||
|
||||
Tooltip.prototype.getCalcuatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
|
||||
|
@ -13,8 +13,8 @@
|
||||
padding: 1px;
|
||||
text-align: left; // Reset given new insertion method
|
||||
background-color: @popover-bg;
|
||||
-webkit-bg-clip: padding-box;
|
||||
-moz-bg-clip: padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid @popover-fallback-border-color;
|
||||
border: 1px solid @popover-border-color;
|
||||
|
Loading…
x
Reference in New Issue
Block a user