Commit 2aec6dae authored by Mark Otto's avatar Mark Otto
Browse files

Fixes #7730: Better hiding of empty titles in popovers

If the popover's title contains no text, hide it via JS. Previously was
done via CSS's `:empty` property, but that doesn't work in IE8, so JS
it is.

/cc @fat becaue I probably did this wrong <3
parent 2fccf927
Showing with 5 additions and 9 deletions
+5 -9
...@@ -4376,10 +4376,6 @@ button.close { ...@@ -4376,10 +4376,6 @@ button.close {
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
} }
.popover-title:empty {
display: none;
}
.popover-content { .popover-content {
padding: 9px 14px; padding: 9px 14px;
} }
......
...@@ -1420,6 +1420,8 @@ ...@@ -1420,6 +1420,8 @@
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content) $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in') $tip.removeClass('fade top bottom left right in')
$tip.find('.popover-title:empty').hide()
} }
Popover.prototype.hasContent = function () { Popover.prototype.hasContent = function () {
......
This diff is collapsed.
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content) $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in') $tip.removeClass('fade top bottom left right in')
$tip.find('.popover-title:empty').hide()
} }
Popover.prototype.hasContent = function () { Popover.prototype.hasContent = function () {
......
...@@ -40,10 +40,6 @@ ...@@ -40,10 +40,6 @@
background-color: @popover-title-bg; background-color: @popover-title-bg;
border-bottom: 1px solid darken(@popover-title-bg, 5%); border-bottom: 1px solid darken(@popover-title-bg, 5%);
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
&:empty {
display: none;
}
} }
.popover-content { .popover-content {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment