|
|
|
@ -44,8 +44,13 @@ Ext.define('Rambox.Application', {
|
|
|
|
|
var tabPanel = Ext.cq1('app-main'); |
|
|
|
|
var activeIndex = tabPanel.items.indexOf(tabPanel.getActiveTab()); |
|
|
|
|
var i = activeIndex + 1; |
|
|
|
|
if ( i >= tabPanel.items.items.length - 1 ) i = 0; |
|
|
|
|
|
|
|
|
|
// "cycle" (go to the start) when the end is reached or the end is the spacer "tbfill"
|
|
|
|
|
if (i === tabPanel.items.items.length || i === tabPanel.items.items.length - 1 && tabPanel.items.items[i].id === 'tbfill') i = 0; |
|
|
|
|
|
|
|
|
|
// skip spacer
|
|
|
|
|
while (tabPanel.items.items[i].id === 'tbfill') i++; |
|
|
|
|
|
|
|
|
|
tabPanel.setActiveTab(i); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|