タブを追加した時の自動開閉の判断基準を変更
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1288 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
51d42afcfe
commit
bb1e18768b
@ -1746,13 +1746,15 @@ catch(e) {
|
|||||||
|
|
||||||
if (!aInfo.dontExpand) {
|
if (!aInfo.dontExpand) {
|
||||||
if (
|
if (
|
||||||
|
/*
|
||||||
(
|
(
|
||||||
aParent.getAttribute(this.kSUBTREE_COLLAPSED) == 'true' ||
|
aParent.getAttribute(this.kSUBTREE_COLLAPSED) == 'true' ||
|
||||||
children.indexOf('|') < 0 // first child
|
children.indexOf('|') > -1 // not a first child
|
||||||
) &&
|
) &&
|
||||||
|
*/
|
||||||
this.getPref('extensions.treestyletab.autoCollapseExpandSubTreeOnSelect')
|
this.getPref('extensions.treestyletab.autoCollapseExpandSubTreeOnSelect')
|
||||||
) {
|
) {
|
||||||
this.collapseExpandTreesIntelligentlyFor(aChild);
|
this.collapseExpandTreesIntelligentlyFor(aParent);
|
||||||
var p = aParent;
|
var p = aParent;
|
||||||
do {
|
do {
|
||||||
this.collapseExpandTabSubTree(p, false);
|
this.collapseExpandTabSubTree(p, false);
|
||||||
@ -2010,7 +2012,7 @@ catch(e) {
|
|||||||
var b = this.getTabBrowserFromChildren(aTab);
|
var b = this.getTabBrowserFromChildren(aTab);
|
||||||
if (b.__treestyletab__doingCollapseExpand) return;
|
if (b.__treestyletab__doingCollapseExpand) return;
|
||||||
|
|
||||||
var parent = this.getParentTab(aTab);
|
var sameParentTab = this.getParentTab(aTab);
|
||||||
var expandedParentTabs = [
|
var expandedParentTabs = [
|
||||||
aTab.getAttribute(this.kID)
|
aTab.getAttribute(this.kID)
|
||||||
];
|
];
|
||||||
@ -2035,12 +2037,15 @@ catch(e) {
|
|||||||
parentTab = this.getParentTab(collapseTab);
|
parentTab = this.getParentTab(collapseTab);
|
||||||
if (parentTab) {
|
if (parentTab) {
|
||||||
dontCollapse = true;
|
dontCollapse = true;
|
||||||
do {
|
if (parentTab.getAttribute(this.kSUBTREE_COLLAPSED) != 'true') {
|
||||||
if (parentTab != parent) continue;
|
do {
|
||||||
dontCollapse = false;
|
if (expandedParentTabs.indexOf(parentTab.getAttribute(this.kID)) < 0)
|
||||||
break;
|
continue;
|
||||||
|
dontCollapse = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
while (parentTab = this.getParentTab(parentTab));
|
||||||
}
|
}
|
||||||
while (parentTab = this.getParentTab(parentTab));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dontCollapse)
|
if (!dontCollapse)
|
||||||
|
Loading…
Reference in New Issue
Block a user