Tab Panoramasでタブをグループ分けしている時、「タブの一覧」が正常に機能していなかった
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7199 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
594aba34c0
commit
8427b2f595
@ -1020,7 +1020,7 @@ var TreeStyleTabUtils = {
|
|||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
||||||
return this.evaluateXPath(
|
return this.evaluateXPath(
|
||||||
'descendant::xul:tab',
|
'descendant::xul:tab[not(@hidden="true")]',
|
||||||
b.mTabContainer
|
b.mTabContainer
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -1028,13 +1028,14 @@ var TreeStyleTabUtils = {
|
|||||||
getTabsArray : function TSTUtils_getTabsArray(aTabBrowserChild)
|
getTabsArray : function TSTUtils_getTabsArray(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
||||||
return Array.slice(b.mTabContainer.childNodes);
|
return b.visibleTabs || Array.slice(b.mTabContainer.childNodes) ;
|
||||||
},
|
},
|
||||||
|
|
||||||
getFirstTab : function TSTUtils_getFirstTab(aTabBrowserChild)
|
getFirstTab : function TSTUtils_getFirstTab(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
||||||
return b.mTabContainer.firstChild;
|
var tabs = b.visibleTabs;
|
||||||
|
return tabs ? tabs[0] : b.mTabContainer.firstChild;
|
||||||
},
|
},
|
||||||
|
|
||||||
getFirstNormalTab : function TSTUtils_getFirstNormalTab(aTabBrowserChild)
|
getFirstNormalTab : function TSTUtils_getFirstNormalTab(aTabBrowserChild)
|
||||||
@ -1050,12 +1051,20 @@ var TreeStyleTabUtils = {
|
|||||||
getLastTab : function TSTUtils_getLastTab(aTabBrowserChild)
|
getLastTab : function TSTUtils_getLastTab(aTabBrowserChild)
|
||||||
{
|
{
|
||||||
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
var b = this.getTabBrowserFromChild(aTabBrowserChild);
|
||||||
return b.mTabContainer.lastChild;
|
var tabs = b.visibleTabs;
|
||||||
|
return tabs ? tabs[tabs.length-1] : b.mTabContainer.lastChild ;
|
||||||
},
|
},
|
||||||
|
|
||||||
getNextTab : function TSTUtils_getNextTab(aTab)
|
getNextTab : function TSTUtils_getNextTab(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
var b = this.getTabBrowserFromChild(aTab);
|
||||||
|
var tabs = b.visibleTabs;
|
||||||
|
if (tabs) {
|
||||||
|
let index = tabs.indexOf(aTab);
|
||||||
|
if (index > -1)
|
||||||
|
return tabs.length > index ? tabs[index+1] : null
|
||||||
|
}
|
||||||
var tab = aTab.nextSibling;
|
var tab = aTab.nextSibling;
|
||||||
return (tab && tab.localName == 'tab') ? tab : null ;
|
return (tab && tab.localName == 'tab') ? tab : null ;
|
||||||
},
|
},
|
||||||
@ -1063,6 +1072,13 @@ var TreeStyleTabUtils = {
|
|||||||
getPreviousTab : function TSTUtils_getPreviousTab(aTab)
|
getPreviousTab : function TSTUtils_getPreviousTab(aTab)
|
||||||
{
|
{
|
||||||
if (!aTab) return null;
|
if (!aTab) return null;
|
||||||
|
var b = this.getTabBrowserFromChild(aTab);
|
||||||
|
var tabs = b.visibleTabs;
|
||||||
|
if (tabs) {
|
||||||
|
let index = tabs.indexOf(aTab);
|
||||||
|
if (index > -1)
|
||||||
|
return 0 < index ? tabs[index-1] : null
|
||||||
|
}
|
||||||
var tab = aTab.previousSibling;
|
var tab = aTab.previousSibling;
|
||||||
return (tab && tab.localName == 'tab') ? tab : null ;
|
return (tab && tab.localName == 'tab') ? tab : null ;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user