update configuration UI
This commit is contained in:
parent
9b2b99674f
commit
00c5f4b04f
@ -195,7 +195,7 @@ function onSyncGroupBookmarkPrefToUI()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function onChangeTabbarPosition(aOnChange)
|
function onChangeTabbarPosition()
|
||||||
{
|
{
|
||||||
var pos = document.getElementById('extensions.treestyletab.tabbar.position-radiogroup').value;
|
var pos = document.getElementById('extensions.treestyletab.tabbar.position-radiogroup').value;
|
||||||
var invertTab = document.getElementById('extensions.treestyletab.tabbar.invertTab-check');
|
var invertTab = document.getElementById('extensions.treestyletab.tabbar.invertTab-check');
|
||||||
@ -216,24 +216,24 @@ function onChangeTabbarPosition(aOnChange)
|
|||||||
else
|
else
|
||||||
invertClosebox.setAttribute('collapsed', true);
|
invertClosebox.setAttribute('collapsed', true);
|
||||||
|
|
||||||
var indentCheckH = document.getElementById('extensions.treestyletab.enableSubtreeIndent.horizontal-check');
|
var maxTreeLevelH = document.getElementById('maxTreeLevel-groupbox-horizontal');
|
||||||
var indentCheckV = document.getElementById('extensions.treestyletab.enableSubtreeIndent.vertical-check');
|
var maxTreeLevelV = document.getElementById('maxTreeLevel-groupbox-vertical');
|
||||||
var collapseCheckH = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand.horizontal-check');
|
var collapseCheckH = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand.horizontal-check');
|
||||||
var collapseCheckV = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand.vertical-check');
|
var collapseCheckV = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand.vertical-check');
|
||||||
var hideAllTabsCheckH = document.getElementById('extensions.treestyletab.tabbar.hideAlltabsButton.horizontal-check');
|
var hideAllTabsCheckH = document.getElementById('extensions.treestyletab.tabbar.hideAlltabsButton.horizontal-check');
|
||||||
var hideAllTabsCheckV = document.getElementById('extensions.treestyletab.tabbar.hideAlltabsButton.vertical-check');
|
var hideAllTabsCheckV = document.getElementById('extensions.treestyletab.tabbar.hideAlltabsButton.vertical-check');
|
||||||
|
|
||||||
if (pos == 'left' || pos == 'right') {
|
if (pos == 'left' || pos == 'right') {
|
||||||
indentCheckH.setAttribute('collapsed', true);
|
maxTreeLevelH.setAttribute('collapsed', true);
|
||||||
indentCheckV.removeAttribute('collapsed');
|
maxTreeLevelV.removeAttribute('collapsed');
|
||||||
collapseCheckH.setAttribute('collapsed', true);
|
collapseCheckH.setAttribute('collapsed', true);
|
||||||
collapseCheckV.removeAttribute('collapsed');
|
collapseCheckV.removeAttribute('collapsed');
|
||||||
hideAllTabsCheckH.setAttribute('collapsed', true);
|
hideAllTabsCheckH.setAttribute('collapsed', true);
|
||||||
hideAllTabsCheckV.removeAttribute('collapsed');
|
hideAllTabsCheckV.removeAttribute('collapsed');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
indentCheckH.removeAttribute('collapsed');
|
maxTreeLevelH.removeAttribute('collapsed');
|
||||||
indentCheckV.setAttribute('collapsed', true);
|
maxTreeLevelV.setAttribute('collapsed', true);
|
||||||
collapseCheckH.removeAttribute('collapsed');
|
collapseCheckH.removeAttribute('collapsed');
|
||||||
collapseCheckV.setAttribute('collapsed', true);
|
collapseCheckV.setAttribute('collapsed', true);
|
||||||
hideAllTabsCheckH.removeAttribute('collapsed');
|
hideAllTabsCheckH.removeAttribute('collapsed');
|
||||||
@ -243,6 +243,52 @@ function onChangeTabbarPosition(aOnChange)
|
|||||||
gTabbarPlacePositionInitialized = true;
|
gTabbarPlacePositionInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onSyncMaxTreeLevelUIToPref(aTarget)
|
||||||
|
{
|
||||||
|
var isHorizontal = aTarget.indexOf('horizontal') != -1;
|
||||||
|
aTarget = document.getElementById(aTarget);
|
||||||
|
if (aTarget.sync)
|
||||||
|
return;
|
||||||
|
aTarget.sync = true;
|
||||||
|
|
||||||
|
var UIValue = parseInt(aTarget.value);
|
||||||
|
var prefValue = UIValue;
|
||||||
|
Array.slice(aTarget.getElementsByTagName('textbox')).forEach(function(aNode) {
|
||||||
|
if (aNode.getAttribute('max-tree-level-radio') == UIValue) {
|
||||||
|
aNode.removeAttribute('disabled');
|
||||||
|
prefValue = parseInt(aNode.value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
aNode.setAttribute('disabled', true);
|
||||||
|
});
|
||||||
|
aTarget.sync = false;
|
||||||
|
return prefValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSyncMaxTreeLevelPrefToUI(aTarget)
|
||||||
|
{
|
||||||
|
var isHorizontal = aTarget.indexOf('horizontal') != -1;
|
||||||
|
aTarget = document.getElementById(aTarget);
|
||||||
|
if (aTarget.sync)
|
||||||
|
return;
|
||||||
|
aTarget.sync = true;
|
||||||
|
|
||||||
|
var pref = document.getElementById(aTarget.getAttribute('preference'));
|
||||||
|
var value = pref.value;
|
||||||
|
|
||||||
|
var UIValue = Math.max(-1, Math.min(1, value));
|
||||||
|
Array.slice(aTarget.getElementsByTagName('textbox')).forEach(function(aNode) {
|
||||||
|
if (aNode.getAttribute('max-tree-level-radio') == UIValue) {
|
||||||
|
aNode.removeAttribute('disabled');
|
||||||
|
aNode.value = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
aNode.setAttribute('disabled', true);
|
||||||
|
});
|
||||||
|
aTarget.sync = false;
|
||||||
|
return UIValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var gAutoHideModeRadio,
|
var gAutoHideModeRadio,
|
||||||
gAutoHideModeToggle,
|
gAutoHideModeToggle,
|
||||||
|
@ -24,12 +24,12 @@
|
|||||||
<preference id="extensions.treestyletab.tabbar.syncRelatedPrefsForDynamicPosition"
|
<preference id="extensions.treestyletab.tabbar.syncRelatedPrefsForDynamicPosition"
|
||||||
name="extensions.treestyletab.tabbar.syncRelatedPrefsForDynamicPosition"
|
name="extensions.treestyletab.tabbar.syncRelatedPrefsForDynamicPosition"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
<preference id="extensions.treestyletab.enableSubtreeIndent.horizontal"
|
<preference id="extensions.treestyletab.maxTreeLevel.horizontal"
|
||||||
name="extensions.treestyletab.enableSubtreeIndent.horizontal"
|
name="extensions.treestyletab.maxTreeLevel.horizontal"
|
||||||
type="bool"/>
|
type="int"/>
|
||||||
<preference id="extensions.treestyletab.enableSubtreeIndent.vertical"
|
<preference id="extensions.treestyletab.maxTreeLevel.vertical"
|
||||||
name="extensions.treestyletab.enableSubtreeIndent.vertical"
|
name="extensions.treestyletab.maxTreeLevel.vertical"
|
||||||
type="bool"/>
|
type="int"/>
|
||||||
<preference id="extensions.treestyletab.allowSubtreeCollapseExpand.horizontal"
|
<preference id="extensions.treestyletab.allowSubtreeCollapseExpand.horizontal"
|
||||||
name="extensions.treestyletab.allowSubtreeCollapseExpand.horizontal"
|
name="extensions.treestyletab.allowSubtreeCollapseExpand.horizontal"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
@ -121,26 +121,68 @@
|
|||||||
<checkbox id="extensions.treestyletab.allowSubtreeCollapseExpand.vertical-check"
|
<checkbox id="extensions.treestyletab.allowSubtreeCollapseExpand.vertical-check"
|
||||||
preference="extensions.treestyletab.allowSubtreeCollapseExpand.vertical"
|
preference="extensions.treestyletab.allowSubtreeCollapseExpand.vertical"
|
||||||
label="&config.allowSubtreeCollapseExpand;"/>
|
label="&config.allowSubtreeCollapseExpand;"/>
|
||||||
<checkbox id="extensions.treestyletab.enableSubtreeIndent.horizontal-check"
|
<hbox align="center" id="hideAlltabsButton-box">
|
||||||
preference="extensions.treestyletab.enableSubtreeIndent.horizontal"
|
<checkbox id="extensions.treestyletab.tabbar.hideAlltabsButton.horizontal-check"
|
||||||
label="&config.enableSubtreeIndent;"
|
preference="extensions.treestyletab.tabbar.hideAlltabsButton.horizontal"
|
||||||
oncommand="
|
label="&config.tabbar.hideAlltabsButton;"
|
||||||
if (document.getElementById('extensions.treestyletab.tabbar.syncRelatedPrefsForDynamicPosition').value)
|
collapsed="true"/>
|
||||||
document.getElementById('extensions.treestyletab.tabbar.fixed.horizontal').value = !this.checked;
|
<checkbox id="extensions.treestyletab.tabbar.hideAlltabsButton.vertical-check"
|
||||||
"/>
|
preference="extensions.treestyletab.tabbar.hideAlltabsButton.vertical"
|
||||||
<checkbox id="extensions.treestyletab.enableSubtreeIndent.vertical-check"
|
label="&config.tabbar.hideAlltabsButton;"/>
|
||||||
preference="extensions.treestyletab.enableSubtreeIndent.vertical"
|
</hbox>
|
||||||
label="&config.enableSubtreeIndent;"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox align="center" id="hideAlltabsButton-box">
|
|
||||||
<checkbox id="extensions.treestyletab.tabbar.hideAlltabsButton.horizontal-check"
|
|
||||||
preference="extensions.treestyletab.tabbar.hideAlltabsButton.horizontal"
|
|
||||||
label="&config.tabbar.hideAlltabsButton;"
|
|
||||||
collapsed="true"/>
|
|
||||||
<checkbox id="extensions.treestyletab.tabbar.hideAlltabsButton.vertical-check"
|
|
||||||
preference="extensions.treestyletab.tabbar.hideAlltabsButton.vertical"
|
|
||||||
label="&config.tabbar.hideAlltabsButton;"/>
|
|
||||||
</hbox>
|
</hbox>
|
||||||
|
<groupbox id="maxTreeLevel-groupbox-vertical">
|
||||||
|
<caption label="&config.maxTreeLevel.caption;"/>
|
||||||
|
<radiogroup id="maxTreeLevel-radiogroup-vertical"
|
||||||
|
orient="vertical"
|
||||||
|
preference="extensions.treestyletab.maxTreeLevel.vertical"
|
||||||
|
onsynctopreference="return onSyncMaxTreeLevelUIToPref('maxTreeLevel-radiogroup-vertical');"
|
||||||
|
onsyncfrompreference="return onSyncMaxTreeLevelPrefToUI('maxTreeLevel-radiogroup-vertical');">
|
||||||
|
<radio value="0" label="&config.maxTreeLevel.0;"
|
||||||
|
max-tree-level-radio="0"/>
|
||||||
|
<radio value="-1" label="&config.maxTreeLevel.-1;"
|
||||||
|
max-tree-level-radio="-1"/>
|
||||||
|
<hbox align="center">
|
||||||
|
<radio value="1" id="maxTreeLevel-radio1-vertical"
|
||||||
|
max-tree-level-radio="1"
|
||||||
|
label="&config.maxTreeLevel.1;"/>
|
||||||
|
<textbox id="maxTreeLevel-radio1-textbox-vertical"
|
||||||
|
max-tree-level-radio="1"
|
||||||
|
type="number"
|
||||||
|
min="1" increment="1" size="2"
|
||||||
|
oninput="document.getElementById(this.parentNode.parentNode.getAttribute('preference')).value = this.value;"/>
|
||||||
|
<label max-tree-level-radio="1"
|
||||||
|
control="maxTreeLevel-radio1-vertical"
|
||||||
|
value="&config.maxTreeLevel.1.after;"/>
|
||||||
|
</hbox>
|
||||||
|
</radiogroup>
|
||||||
|
</groupbox>
|
||||||
|
<groupbox id="maxTreeLevel-groupbox-horizontal" collapsed="true">
|
||||||
|
<caption label="&config.maxTreeLevel.caption;"/>
|
||||||
|
<radiogroup id="maxTreeLevel-radiogroup-horizontal"
|
||||||
|
orient="vertical"
|
||||||
|
preference="extensions.treestyletab.maxTreeLevel.horizontal"
|
||||||
|
onsynctopreference="return onSyncMaxTreeLevelUIToPref('maxTreeLevel-radiogroup-horizontal');"
|
||||||
|
onsyncfrompreference="return onSyncMaxTreeLevelPrefToUI('maxTreeLevel-radiogroup-horizontal');">
|
||||||
|
<radio value="0" label="&config.maxTreeLevel.0;"
|
||||||
|
max-tree-level-radio="0"/>
|
||||||
|
<radio value="-1" label="&config.maxTreeLevel.-1;"
|
||||||
|
max-tree-level-radio="-1"/>
|
||||||
|
<hbox align="center">
|
||||||
|
<radio value="1" id="maxTreeLevel-radio1-horizontal"
|
||||||
|
max-tree-level-radio="1"
|
||||||
|
label="&config.maxTreeLevel.1;"/>
|
||||||
|
<textbox id="maxTreeLevel-radio1-textbox-horizontal"
|
||||||
|
max-tree-level-radio="1"
|
||||||
|
type="number"
|
||||||
|
min="1" increment="1" size="2"
|
||||||
|
oninput="document.getElementById(this.parentNode.parentNode.getAttribute('preference')).value = this.value;"/>
|
||||||
|
<label max-tree-level-radio="1"
|
||||||
|
control="maxTreeLevel-radio1-horizontal"
|
||||||
|
value="&config.maxTreeLevel.1.after;"/>
|
||||||
|
</hbox>
|
||||||
|
</radiogroup>
|
||||||
|
</groupbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
@ -236,6 +278,9 @@
|
|||||||
<preference id="extensions.treestyletab.show.context-item-bookmarkTabSubtree"
|
<preference id="extensions.treestyletab.show.context-item-bookmarkTabSubtree"
|
||||||
name="extensions.treestyletab.show.context-item-bookmarkTabSubtree"
|
name="extensions.treestyletab.show.context-item-bookmarkTabSubtree"
|
||||||
type="bool"/>
|
type="bool"/>
|
||||||
|
<preference id="extensions.treestyletab.preferences.newTab-tabbox.selectedIndex"
|
||||||
|
name="extensions.treestyletab.preferences.newTab-tabbox.selectedIndex"
|
||||||
|
type="int"/>
|
||||||
</preferences>
|
</preferences>
|
||||||
|
|
||||||
<vbox>
|
<vbox>
|
||||||
|
@ -15,7 +15,11 @@
|
|||||||
<!ENTITY config.tabbar.invertClosebox.right "Show closebox at rightside in each tab">
|
<!ENTITY config.tabbar.invertClosebox.right "Show closebox at rightside in each tab">
|
||||||
<!ENTITY config.tabbar.invertTab "Invert tab appearance">
|
<!ENTITY config.tabbar.invertTab "Invert tab appearance">
|
||||||
<!ENTITY config.tabbar.invertTabContents "Invert tab contents">
|
<!ENTITY config.tabbar.invertTabContents "Invert tab contents">
|
||||||
<!ENTITY config.enableSubtreeIndent "Indent tabs">
|
<!ENTITY config.maxTreeLevel.caption "Visualization of nested trees">
|
||||||
|
<!ENTITY config.maxTreeLevel.0 "Nothing (no indentation)">
|
||||||
|
<!ENTITY config.maxTreeLevel.-1 "Indent tabs">
|
||||||
|
<!ENTITY config.maxTreeLevel.1 "Indent tabs until">
|
||||||
|
<!ENTITY config.maxTreeLevel.1.after "level(s)">
|
||||||
<!ENTITY config.allowSubtreeCollapseExpand "Allow to collapse/expand tree of tabs">
|
<!ENTITY config.allowSubtreeCollapseExpand "Allow to collapse/expand tree of tabs">
|
||||||
<!ENTITY config.tabbar.hideAlltabsButton "Show "List all tabs" button">
|
<!ENTITY config.tabbar.hideAlltabsButton "Show "List all tabs" button">
|
||||||
|
|
||||||
|
@ -15,7 +15,11 @@
|
|||||||
<!ENTITY config.tabbar.invertClosebox.right "タブのクローズボックスを右に表示">
|
<!ENTITY config.tabbar.invertClosebox.right "タブのクローズボックスを右に表示">
|
||||||
<!ENTITY config.tabbar.invertTab "タブの表示を左右反転">
|
<!ENTITY config.tabbar.invertTab "タブの表示を左右反転">
|
||||||
<!ENTITY config.tabbar.invertTabContents "タブの内容を左右反転">
|
<!ENTITY config.tabbar.invertTabContents "タブの内容を左右反転">
|
||||||
<!ENTITY config.enableSubtreeIndent "タブをインデント表示する">
|
<!ENTITY config.maxTreeLevel.caption "ツリーの深さの表示">
|
||||||
|
<!ENTITY config.maxTreeLevel.0 "何もしない(インデントなし)">
|
||||||
|
<!ENTITY config.maxTreeLevel.-1 "タブをインデント表示する">
|
||||||
|
<!ENTITY config.maxTreeLevel.1 "タブをインデント表示する(">
|
||||||
|
<!ENTITY config.maxTreeLevel.1.after "階層まで)">
|
||||||
<!ENTITY config.allowSubtreeCollapseExpand "ツリーを折りたためるようにする">
|
<!ENTITY config.allowSubtreeCollapseExpand "ツリーを折りたためるようにする">
|
||||||
<!ENTITY config.tabbar.hideAlltabsButton "「タブの一覧を表示」ボタンを表示する">
|
<!ENTITY config.tabbar.hideAlltabsButton "「タブの一覧を表示」ボタンを表示する">
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user