From 0bbc12af45d00020d4fd44f20f17a67f95542c47 Mon Sep 17 00:00:00 2001 From: Flynsarmy Date: Tue, 14 Jan 2020 21:58:54 +1000 Subject: [PATCH] Remove excess spaces from tab title hovers (#4876) --- modules/system/assets/ui/js/tab.js | 4 ++-- modules/system/assets/ui/storm-min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/system/assets/ui/js/tab.js b/modules/system/assets/ui/js/tab.js index 89989d4e7..be2b1848b 100644 --- a/modules/system/assets/ui/js/tab.js +++ b/modules/system/assets/ui/js/tab.js @@ -100,7 +100,7 @@ .attr('data-toggle', 'tab') 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. if ($anchor.find('> span.title > span').length < 1) { @@ -422,4 +422,4 @@ $el.focus() }) -}(window.jQuery); \ No newline at end of file +}(window.jQuery); diff --git a/modules/system/assets/ui/storm-min.js b/modules/system/assets/ui/storm-min.js index 85f6c0f77..021eec3d0 100644 --- a/modules/system/assets/ui/storm-min.js +++ b/modules/system/assets/ui/storm-min.js @@ -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) $anchor.data('target','#'+targetId).attr('data-target','#'+targetId).attr('data-toggle','tab') 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() $anchor.html('').append($('').append($('').html(html)))} var pane=$('> .tab-pane',this.$pagesContainer).eq(tabIndex).attr('id',targetId)