maxTreeLevel didn't saved if it is changed by spinbuttons
This commit is contained in:
parent
fabd5f546d
commit
974712c99c
@ -233,7 +233,7 @@ function onChangeTabbarPosition()
|
|||||||
gTabbarPlacePositionInitialized = true;
|
gTabbarPlacePositionInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSyncMaxTreeLevelUIToPref(aTarget)
|
function onSyncMaxTreeLevelUIToPref(aTarget, aSetPrefValue)
|
||||||
{
|
{
|
||||||
aTarget = document.getElementById(aTarget);
|
aTarget = document.getElementById(aTarget);
|
||||||
if (aTarget.sync)
|
if (aTarget.sync)
|
||||||
@ -243,6 +243,9 @@ function onSyncMaxTreeLevelUIToPref(aTarget)
|
|||||||
var textbox = aTarget.parentNode.getElementsByTagName('textbox')[0];
|
var textbox = aTarget.parentNode.getElementsByTagName('textbox')[0];
|
||||||
var prefValue = aTarget.checked ? textbox.value : 0 ;
|
var prefValue = aTarget.checked ? textbox.value : 0 ;
|
||||||
|
|
||||||
|
if (aSetPrefValue)
|
||||||
|
document.getElementById(aTarget.getAttribute('preference')).value = prefValue;
|
||||||
|
|
||||||
aTarget.sync = false;
|
aTarget.sync = false;
|
||||||
return prefValue;
|
return prefValue;
|
||||||
}
|
}
|
||||||
|
@ -143,8 +143,8 @@
|
|||||||
<textbox id="maxTreeLevel-textbox-horizontal"
|
<textbox id="maxTreeLevel-textbox-horizontal"
|
||||||
type="number"
|
type="number"
|
||||||
min="1" increment="1" size="4"
|
min="1" increment="1" size="4"
|
||||||
value="999"
|
oninput="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-horizontal', true);"
|
||||||
oninput="document.getElementById(this.previousSibling.previousSibling.getAttribute('preference')).value = this.value;"/>
|
onchange="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-horizontal', true);"/>
|
||||||
<label control="maxTreeLevel-textbox-horizontal"
|
<label control="maxTreeLevel-textbox-horizontal"
|
||||||
value="&config.maxTreeLevel.after;"/>
|
value="&config.maxTreeLevel.after;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
@ -160,8 +160,8 @@
|
|||||||
<textbox id="maxTreeLevel-textbox-vertical"
|
<textbox id="maxTreeLevel-textbox-vertical"
|
||||||
type="number"
|
type="number"
|
||||||
min="1" increment="1" size="4"
|
min="1" increment="1" size="4"
|
||||||
value="999"
|
oninput="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-vertical', true);"
|
||||||
oninput="document.getElementById(this.previousSibling.previousSibling.getAttribute('preference')).value = this.value;"/>
|
onchange="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-vertical', true);"/>
|
||||||
<label control="maxTreeLevel-textbox-vertical"
|
<label control="maxTreeLevel-textbox-vertical"
|
||||||
value="&config.maxTreeLevel.after;"/>
|
value="&config.maxTreeLevel.after;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
Loading…
Reference in New Issue
Block a user