getTabIdの仕様を元に戻した

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6336 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-03-03 23:40:57 +00:00
parent 992a34dc99
commit 85184ff0de

View File

@ -128,23 +128,23 @@ TreeStyleTabBrowser.prototype = {
return false;
},
getTabById : function TSTBrowser_getTabById(aId, aTabBrowserChildren)
{
if (!aId) return null;
if (!aTabBrowserChildren)
return aId in this._tabsCache ? this._tabsCache[aId] : null ;
var b = this.getTabBrowserFromChild(aTabBrowserChildren);
return b ? b.treeStyleTab.getTabById(aId) : null ;
},
// getTabById : function TSTBrowser_getTabById(aId, aTabBrowserChildren)
// {
// if (!aId) return null;
//
// if (!aTabBrowserChildren)
// return aId in this._tabsCache ? this._tabsCache[aId] : null ;
//
// var b = this.getTabBrowserFromChild(aTabBrowserChildren);
// return b ? b.treeStyleTab.getTabById(aId) : null ;
// },
getParentTab : function TSTBrowser_getParentTab(aTab) /* PUBLIC API */
{
if (!aTab) return null;
var b = this.getTabBrowserFromChild(aTab);
return b.treeStyleTab.getTabById(aTab.getAttribute(this.kPARENT));
},
// getParentTab : function TSTBrowser_getParentTab(aTab) /* PUBLIC API */
// {
// if (!aTab) return null;
// var b = this.getTabBrowserFromChild(aTab);
// return b.treeStyleTab.getTabById(aTab.getAttribute(this.kPARENT));
// },
// getParentTab : function TSTBrowser_getParentTab(aTab) /* PUBLIC API */
// {
@ -181,7 +181,7 @@ TreeStyleTabBrowser.prototype = {
var b = this.mTabBrowser;
this._tabsCache = {};
// this._tabsCache = {};
this.internallyTabMovingCount = 0;
this.subTreeMovingCount = 0;
@ -684,12 +684,12 @@ TreeStyleTabBrowser.prototype = {
window.setTimeout(function(aSelf) {
if (!aSelf.getTabValue(aTab, aSelf.kID)) {
aSelf.setTabValue(aTab, aSelf.kID, id);
if (!(id in aSelf._tabsCache))
aSelf._tabsCache[id] = aTab;
// if (!(id in aSelf._tabsCache))
// aSelf._tabsCache[id] = aTab;
}
}, 0, this);
if (!(id in this._tabsCache))
this._tabsCache[id] = aTab;
// if (!(id in this._tabsCache))
// this._tabsCache[id] = aTab;
}
aTab.__treestyletab__linkedTabBrowser = this.mTabBrowser;
@ -1254,9 +1254,9 @@ TreeStyleTabBrowser.prototype = {
destroyTab : function TSTBrowser_destroyTab(aTab)
{
var id = aTab.getAttribute(this.kID);
if (id in this._tabsCache)
delete this._tabsCache[id];
// var id = aTab.getAttribute(this.kID);
// if (id in this._tabsCache)
// delete this._tabsCache[id];
// delete aTab.__treestyletab__parentTab;
// delete aTab.__treestyletab__childTabs;
@ -2126,7 +2126,7 @@ TreeStyleTabBrowser.prototype = {
this.deleteTabValue(tab, this.kCLOSED_SET_ID);
this.setTabValue(tab, this.kID, id);
this._tabsCache[id] = tab;
// this._tabsCache[id] = tab;
if (closeSetId)
this.restoreClosedSet(closeSetId, tab);