Re-introduce configuration UI to change fixed/unfixed and the size of the tab bar #940

This commit is contained in:
YUKI Hiroshi 2015-09-28 21:32:06 +09:00
parent 5913bf1f86
commit 3a9e922175
15 changed files with 113 additions and 13 deletions

View File

@ -202,22 +202,31 @@ function onChangeTabbarPosition()
else
invertClosebox.setAttribute('collapsed', true);
var maxTreeLevelH = document.getElementById('maxTreeLevel-horizontal');
var maxTreeLevelV = document.getElementById('maxTreeLevel-vertical');
var collapseCheckH = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand.horizontal-check');
var collapseCheckV = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand.vertical-check');
var horizontalElements = [
'maxTreeLevel-horizontal',
'extensions.treestyletab.allowSubtreeCollapseExpand.horizontal-check',
'fixedTabbar-horizontal'
];
var verticalElements = [
'maxTreeLevel-vertical',
'extensions.treestyletab.allowSubtreeCollapseExpand.vertical-check',
'fixedTabbar-vertical'
];
if (pos == 'left' || pos == 'right') {
maxTreeLevelH.setAttribute('collapsed', true);
maxTreeLevelV.removeAttribute('collapsed');
collapseCheckH.setAttribute('collapsed', true);
collapseCheckV.removeAttribute('collapsed');
horizontalElements.forEach(function(aId) {
document.getElementById(aId).setAttribute('collapsed', true);
});
verticalElements.forEach(function(aId) {
document.getElementById(aId).removeAttribute('collapsed');
});
}
else {
maxTreeLevelH.removeAttribute('collapsed');
maxTreeLevelV.setAttribute('collapsed', true);
collapseCheckH.removeAttribute('collapsed');
collapseCheckV.setAttribute('collapsed', true);
horizontalElements.forEach(function(aId) {
document.getElementById(aId).removeAttribute('collapsed');
});
verticalElements.forEach(function(aId) {
document.getElementById(aId).setAttribute('collapsed', true);
});
}
gTabbarPlacePositionInitialized = true;

View File

@ -21,6 +21,15 @@
<preference id="extensions.treestyletab.tabbar.fixed.horizontal"
name="extensions.treestyletab.tabbar.fixed.horizontal"
type="bool"/>
<preference id="extensions.treestyletab.tabbar.fixed.vertical"
name="extensions.treestyletab.tabbar.fixed.vertical"
type="bool"/>
<preference id="extensions.treestyletab.tabbar.height"
name="extensions.treestyletab.tabbar.height"
type="int"/>
<preference id="extensions.treestyletab.tabbar.width"
name="extensions.treestyletab.tabbar.width"
type="int"/>
<preference id="extensions.treestyletab.tabbar.syncRelatedPrefsForDynamicPosition"
name="extensions.treestyletab.tabbar.syncRelatedPrefsForDynamicPosition"
type="bool"/>
@ -99,6 +108,36 @@
</radiogroup>
<spacer flex="1"/>
</hbox>
<hbox id="fixedTabbar-horizontal" align="center">
<checkbox id="extensions.treestyletab.tabbar.fixed.horizontal-check"
preference="extensions.treestyletab.tabbar.fixed.horizontal"
label="&context.toggleFixed.label.horizontal;"/>
<label id="tabbarSize-before-horizontal"
control="tabbarSize-horizontal"
value="&config.tabbarSize.before-horizontal;"/>
<textbox id="tabbarSize-horizontal"
preference="extensions.treestyletab.tabbar.height"
type="number"
min="1" increment="1" style="width:6em;"/>
<label id="tabbarSize-after-horizontal"
control="tabbarSize-horizontal"
value="&config.tabbarSize.after-horizontal;"/>
</hbox>
<hbox id="fixedTabbar-vertical" align="center">
<checkbox id="extensions.treestyletab.tabbar.fixed.vertical-check"
preference="extensions.treestyletab.tabbar.fixed.vertical"
label="&context.toggleFixed.label.vertical;"/>
<label id="tabbarSize-before-vertical"
control="tabbarSize-vertical"
value="&config.tabbarSize.before-vertical;"/>
<textbox id="tabbarSize-vertical"
preference="extensions.treestyletab.tabbar.width"
type="number"
min="1" increment="1" style="width:6em;"/>
<label id="tabbarSize-after-vertical"
control="tabbarSize-vertical"
value="&config.tabbarSize.after-vertical;"/>
</hbox>
<hbox align="center">
<checkbox id="extensions.treestyletab.tabbar.invertTabContents-check"
preference="extensions.treestyletab.tabbar.invertTabContents"

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "až do">
<!ENTITY config.maxTreeLevel.after "úrovní">
<!ENTITY config.allowSubtreeCollapseExpand "Umožnit sbalení/rozbalení stromu panelů">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Styl">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "op til">
<!ENTITY config.maxTreeLevel.after "niveauer">
<!ENTITY config.allowSubtreeCollapseExpand "Tillad sammenfold/udvid fanetræ">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Udseende">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "bis">
<!ENTITY config.maxTreeLevel.after "Level">
<!ENTITY config.allowSubtreeCollapseExpand "Auf- und Einklappen von Zweigen erlauben">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Style">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "until">
<!ENTITY config.maxTreeLevel.after "level(s)">
<!ENTITY config.allowSubtreeCollapseExpand "Allow to collapse/expand tree of tabs">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Style">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "hasta">
<!ENTITY config.maxTreeLevel.after "nivel(es)">
<!ENTITY config.allowSubtreeCollapseExpand "Permitir colapsar/expandir los sub-árboles de las pestañas">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Estilo">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "jusqu'à">
<!ENTITY config.maxTreeLevel.after "niveau(x)">
<!ENTITY config.allowSubtreeCollapseExpand "Autoriser le repliage/dépliage des arborescences d'onglets">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Style">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "until">
<!ENTITY config.maxTreeLevel.after "level(s)">
<!ENTITY config.allowSubtreeCollapseExpand "Permetti di contrarre/espandere sottoalberi delle schede">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Style">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "">
<!ENTITY config.maxTreeLevel.after "階層まで)">
<!ENTITY config.allowSubtreeCollapseExpand "ツリーを折りたためるようにする">
<!ENTITY config.tabbarSize.before-horizontal "高さ:">
<!ENTITY config.tabbarSize.after-horizontal "ピクセル">
<!ENTITY config.tabbarSize.before-vertical "幅:">
<!ENTITY config.tabbarSize.after-vertical "ピクセル">
<!ENTITY config.tabs.style "スタイル">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "until">
<!ENTITY config.maxTreeLevel.after "level(s)">
<!ENTITY config.allowSubtreeCollapseExpand "Zezwalaj na zwijanie/rozwijanie drzewa kart">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Style">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "пока уровней меньше">
<!ENTITY config.maxTreeLevel.after "">
<!ENTITY config.allowSubtreeCollapseExpand "Разрешить сворачивать/разворачивать поддеревья вкладок">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Стиль">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "t.o.m. den">
<!ENTITY config.maxTreeLevel.after "nivån">
<!ENTITY config.allowSubtreeCollapseExpand "Tillåt att flikträd kan minimeras/expanderas">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "Format">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "最多">
<!ENTITY config.maxTreeLevel.after "层">
<!ENTITY config.allowSubtreeCollapseExpand "允许折叠/展开标签子树">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "样式">

View File

@ -20,6 +20,10 @@
<!ENTITY config.maxTreeLevel.before "(最多">
<!ENTITY config.maxTreeLevel.after "層)">
<!ENTITY config.allowSubtreeCollapseExpand "允許摺疊 / 展開樹狀子目錄">
<!ENTITY config.tabbarSize.before-horizontal ":">
<!ENTITY config.tabbarSize.after-horizontal "px height">
<!ENTITY config.tabbarSize.before-vertical ":">
<!ENTITY config.tabbarSize.after-vertical "px width">
<!ENTITY config.tabs.style "樣式">