複数タブを閉じる時の警告に出る、閉じるタブの個数を正しい数にした

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@3113 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2008-10-14 14:45:57 +00:00
parent 60b1d7f492
commit 9711421d3e
2 changed files with 12 additions and 2 deletions

View File

@ -1608,11 +1608,15 @@ catch(e) {
var max = tabs.length;
if (!max) return;
b.__treestyletab__closedTabsNum = max;
if (
max > 1 &&
!b.warnAboutClosingTabs(true, max)
)
!b.warnAboutClosingTabs(true)
) {
b.__treestyletab__closedTabsNum = 0;
return;
}
b.__treestyletab__closedTabsNum = 0;
for (var i = tabs.length-1; i > -1; i--)
{

View File

@ -397,6 +397,12 @@ TreeStyleTabBrowser.prototype = {
)
);
eval('b.warnAboutClosingTabs = '+
b.warnAboutClosingTabs.toSource().replace(
'var numTabs = ', 'var numTabs = this.__treestyletab__closedTabsNum || '
)
);
var tabs = b.mTabContainer.childNodes;
for (var i = 0, maxi = tabs.length; i < maxi; i++)
{