Remove excess spaces from tab title hovers (#4876)

This commit is contained in:
Flynsarmy 2020-01-14 21:58:54 +10:00 committed by Ben Thomson
parent 3a28771c2c
commit 0bbc12af45
2 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@
.attr('data-toggle', 'tab') .attr('data-toggle', 'tab')
if (!$anchor.attr('title')) if (!$anchor.attr('title'))
$anchor.attr('title', $anchor.text()) $anchor.attr('title', $anchor.text().trim())
// Setup the required tabs markup if it does not exist already. // Setup the required tabs markup if it does not exist already.
if ($anchor.find('> span.title > span').length < 1) { if ($anchor.find('> span.title > span').length < 1) {
@ -422,4 +422,4 @@
$el.focus() $el.focus()
}) })
}(window.jQuery); }(window.jQuery);

View File

@ -4588,7 +4588,7 @@ Tab.prototype.initTab=function(li){var
$tabs=$('>li',this.$tabsContainer),tabIndex=$tabs.index(li),time=new Date().getTime(),targetId=this.tabId+'-tab-'+tabIndex+time,$anchor=$('a',li) $tabs=$('>li',this.$tabsContainer),tabIndex=$tabs.index(li),time=new Date().getTime(),targetId=this.tabId+'-tab-'+tabIndex+time,$anchor=$('a',li)
$anchor.data('target','#'+targetId).attr('data-target','#'+targetId).attr('data-toggle','tab') $anchor.data('target','#'+targetId).attr('data-target','#'+targetId).attr('data-toggle','tab')
if(!$anchor.attr('title')) if(!$anchor.attr('title'))
$anchor.attr('title',$anchor.text()) $anchor.attr('title',$anchor.text().trim())
if($anchor.find('> span.title > span').length<1){var html=$anchor.html() if($anchor.find('> span.title > span').length<1){var html=$anchor.html()
$anchor.html('').append($('<span class="title"></span>').append($('<span></span>').html(html)))} $anchor.html('').append($('<span class="title"></span>').append($('<span></span>').html(html)))}
var pane=$('> .tab-pane',this.$pagesContainer).eq(tabIndex).attr('id',targetId) var pane=$('> .tab-pane',this.$pagesContainer).eq(tabIndex).attr('id',targetId)