タブバーの表示位置を上下にした時もタブバーを自動で隠せるようにした
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1999 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
504d780ca0
commit
e6bf59705d
@ -68,7 +68,7 @@ function onChangeTabbarPosition(aOnChange)
|
|||||||
|
|
||||||
var indentCheck = document.getElementById('extensions.treestyletab.enableSubtreeIndent-check');
|
var indentCheck = document.getElementById('extensions.treestyletab.enableSubtreeIndent-check');
|
||||||
var collapseCheck = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand-check');
|
var collapseCheck = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand-check');
|
||||||
var autoHideCheck = document.getElementById('extensions.treestyletab.tabbar.autoHide.enabled-check');
|
// var autoHideCheck = document.getElementById('extensions.treestyletab.tabbar.autoHide.enabled-check');
|
||||||
var hideAllTabsCheck = document.getElementById('extensions.treestyletab.tabbar.hideAlltabsButton-check');
|
var hideAllTabsCheck = document.getElementById('extensions.treestyletab.tabbar.hideAlltabsButton-check');
|
||||||
|
|
||||||
if (aOnChange) {
|
if (aOnChange) {
|
||||||
@ -77,12 +77,12 @@ function onChangeTabbarPosition(aOnChange)
|
|||||||
}
|
}
|
||||||
if (pos == 'left' || pos == 'right') {
|
if (pos == 'left' || pos == 'right') {
|
||||||
indentCheck.setAttribute('collapsed', true);
|
indentCheck.setAttribute('collapsed', true);
|
||||||
autoHideCheck.removeAttribute('collapsed');
|
// autoHideCheck.removeAttribute('collapsed');
|
||||||
hideAllTabsCheck.removeAttribute('collapsed');
|
hideAllTabsCheck.removeAttribute('collapsed');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
indentCheck.removeAttribute('collapsed');
|
indentCheck.removeAttribute('collapsed');
|
||||||
autoHideCheck.setAttribute('collapsed', true);
|
// autoHideCheck.setAttribute('collapsed', true);
|
||||||
hideAllTabsCheck.setAttribute('collapsed', true);
|
hideAllTabsCheck.setAttribute('collapsed', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,12 +99,12 @@
|
|||||||
label="&config.allowSubtreeCollapseExpand;"/>
|
label="&config.allowSubtreeCollapseExpand;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
<checkbox id="extensions.treestyletab.enableSubtreeIndent-check"
|
|
||||||
preference="extensions.treestyletab.enableSubtreeIndent"
|
|
||||||
label="&config.enableSubtreeIndent;"/>
|
|
||||||
<checkbox id="extensions.treestyletab.tabbar.autoHide.enabled-check"
|
<checkbox id="extensions.treestyletab.tabbar.autoHide.enabled-check"
|
||||||
preference="extensions.treestyletab.tabbar.autoHide.enabled"
|
preference="extensions.treestyletab.tabbar.autoHide.enabled"
|
||||||
label="&config.tabbar.autoHide.enabled;"/>
|
label="&config.tabbar.autoHide.enabled;"/>
|
||||||
|
<checkbox id="extensions.treestyletab.enableSubtreeIndent-check"
|
||||||
|
preference="extensions.treestyletab.enableSubtreeIndent"
|
||||||
|
label="&config.enableSubtreeIndent;"/>
|
||||||
<checkbox id="extensions.treestyletab.tabbar.hideAlltabsButton-check"
|
<checkbox id="extensions.treestyletab.tabbar.hideAlltabsButton-check"
|
||||||
preference="extensions.treestyletab.tabbar.hideAlltabsButton"
|
preference="extensions.treestyletab.tabbar.hideAlltabsButton"
|
||||||
label="&config.tabbar.hideAlltabsButton;"/>
|
label="&config.tabbar.hideAlltabsButton;"/>
|
||||||
|
@ -776,9 +776,9 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
switch (aData)
|
switch (aData)
|
||||||
{
|
{
|
||||||
case 'extensions.treestyletab.tabbar.position':
|
case 'extensions.treestyletab.tabbar.position':
|
||||||
if (value != 'left' && value != 'right') {
|
// if (value != 'left' && value != 'right') {
|
||||||
this.endAutoHide();
|
// this.endAutoHide();
|
||||||
}
|
// }
|
||||||
this.initTabbar();
|
this.initTabbar();
|
||||||
tabs.forEach(function(aTab) {
|
tabs.forEach(function(aTab) {
|
||||||
self.initTabAttributes(aTab);
|
self.initTabAttributes(aTab);
|
||||||
@ -851,7 +851,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
case 'extensions.treestyletab.tabbar.autoHide.enabled':
|
case 'extensions.treestyletab.tabbar.autoHide.enabled':
|
||||||
var pos = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION);
|
var pos = this.mTabBrowser.getAttribute(this.kTABBAR_POSITION);
|
||||||
if (value && (pos == 'left' || pos == 'right'))
|
if (value/* && (pos == 'left' || pos == 'right')*/)
|
||||||
this.startAutoHide();
|
this.startAutoHide();
|
||||||
else
|
else
|
||||||
this.endAutoHide();
|
this.endAutoHide();
|
||||||
@ -1555,8 +1555,8 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
XPathResult.FIRST_ORDERED_NODE_TYPE
|
XPathResult.FIRST_ORDERED_NODE_TYPE
|
||||||
).singleNodeValue;
|
).singleNodeValue;
|
||||||
var pos = b.getAttribute(this.kTABBAR_POSITION);
|
var pos = b.getAttribute(this.kTABBAR_POSITION);
|
||||||
if (this.getTreePref('show.'+this.kMENUITEM_AUTOHIDE) &&
|
if (this.getTreePref('show.'+this.kMENUITEM_AUTOHIDE)/* &&
|
||||||
(pos == 'left' || pos == 'right')) {
|
(pos == 'left' || pos == 'right')*/) {
|
||||||
autohide.removeAttribute('hidden');
|
autohide.removeAttribute('hidden');
|
||||||
if (this.getTreePref('tabbar.autoHide.enabled'))
|
if (this.getTreePref('tabbar.autoHide.enabled'))
|
||||||
autohide.setAttribute('checked', true);
|
autohide.setAttribute('checked', true);
|
||||||
|
Loading…
Reference in New Issue
Block a user