From 00dab2f8a0aac953d20c8ff46ddcdf348215d4e7 Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 31 Jul 2009 07:10:30 +0000 Subject: [PATCH] =?UTF-8?q?twisty=E4=B8=8A=E3=81=AE=E3=83=84=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=83=81=E3=83=83=E3=83=97=E3=81=AF=E5=B8=B8=E3=81=AB?= =?UTF-8?q?=E3=83=84=E3=83=AA=E3=83=BC=E5=85=A8=E4=BD=93=E3=81=AE=E3=83=A9?= =?UTF-8?q?=E3=83=99=E3=83=AB=E3=82=92=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4860 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index b04b0b49..b3d1ac81 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -2217,9 +2217,8 @@ catch(e) { var label; var collapsed = aTab.getAttribute(this.kSUBTREE_COLLAPSED) == 'true'; - if (collapsed) { - let base = parseInt(aTab.getAttribute(this.kNEST) || 0); - label = [aTab].concat(this.getDescendantTabs(aTab)) + var base = parseInt(aTab.getAttribute(this.kNEST) || 0); + var tree = [aTab].concat(this.getDescendantTabs(aTab)) .map(function(aTab) { let label = '* '+aTab.getAttribute('label'); let nest = parseInt(aTab.getAttribute(this.kNEST) || 0) - base; @@ -2230,17 +2229,19 @@ catch(e) { return label; }, this) .join('\n'); - } if (aTab.getAttribute(this.kTWISTY_HOVER) == 'true') { let key = collapsed ? 'tooltip.expandSubtree' : 'tooltip.collapseSubtree' ; - label = label || aTab.getAttribute('label'); + label = tree || aTab.getAttribute('label'); label = label ? this.stringbundle.getFormattedString(key+'.labeled', [label]) : this.stringbundle.getString(key) ; } + else if (collapsed) { + label = tree; + } if (label) aEvent.target.setAttribute('label', label);