From cfe8e5c830a9b8b9c6dbc59982ce7289989af051 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 30 Nov 2018 13:04:26 +0800 Subject: [PATCH] Roo/bootstrap/panel/Tabs.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/panel/Tabs.js | 9 ++++++--- roojs-bootstrap-debug.js | 9 ++++++--- roojs-bootstrap.js | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Roo/bootstrap/panel/Tabs.js b/Roo/bootstrap/panel/Tabs.js index 58f0ff21c7..7367c6c615 100644 --- a/Roo/bootstrap/panel/Tabs.js +++ b/Roo/bootstrap/panel/Tabs.js @@ -383,15 +383,18 @@ Roo.extend(Roo.bootstrap.panel.Tabs, Roo.util.Observable, { { var count = this.items.length; var vcount = count - this.hiddenCount; - if(!this.resizeTabs || count < 1 || vcount < 1 || this.updating) { - return; - } + if (vcount < 2) { this.stripEl.hide(); } else { this.stripEl.show(); } + if(!this.resizeTabs || count < 1 || vcount < 1 || this.updating) { + return; + } + + var w = Math.max(this.el.getWidth() - this.cpad, 10); var availWidth = Math.floor(w / vcount); var b = this.stripBody; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 69514bd158..a6b6f00bef 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -38240,15 +38240,18 @@ Roo.extend(Roo.bootstrap.panel.Tabs, Roo.util.Observable, { { var count = this.items.length; var vcount = count - this.hiddenCount; - if(!this.resizeTabs || count < 1 || vcount < 1 || this.updating) { - return; - } + if (vcount < 2) { this.stripEl.hide(); } else { this.stripEl.show(); } + if(!this.resizeTabs || count < 1 || vcount < 1 || this.updating) { + return; + } + + var w = Math.max(this.el.getWidth() - this.cpad, 10); var availWidth = Math.floor(w / vcount); var b = this.stripBody; diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 0747a2cca0..3ae2f49e98 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1622,7 +1622,7 @@ var C=A;while(Cw){var D=this.items;this.setTabWidth(Math.max(C,this.minTabWidth)-2);if(C