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;
|
||||
}
|
||||
|
||||
function onSyncMaxTreeLevelUIToPref(aTarget)
|
||||
function onSyncMaxTreeLevelUIToPref(aTarget, aSetPrefValue)
|
||||
{
|
||||
aTarget = document.getElementById(aTarget);
|
||||
if (aTarget.sync)
|
||||
@ -243,6 +243,9 @@ function onSyncMaxTreeLevelUIToPref(aTarget)
|
||||
var textbox = aTarget.parentNode.getElementsByTagName('textbox')[0];
|
||||
var prefValue = aTarget.checked ? textbox.value : 0 ;
|
||||
|
||||
if (aSetPrefValue)
|
||||
document.getElementById(aTarget.getAttribute('preference')).value = prefValue;
|
||||
|
||||
aTarget.sync = false;
|
||||
return prefValue;
|
||||
}
|
||||
|
@ -143,8 +143,8 @@
|
||||
<textbox id="maxTreeLevel-textbox-horizontal"
|
||||
type="number"
|
||||
min="1" increment="1" size="4"
|
||||
value="999"
|
||||
oninput="document.getElementById(this.previousSibling.previousSibling.getAttribute('preference')).value = this.value;"/>
|
||||
oninput="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-horizontal', true);"
|
||||
onchange="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-horizontal', true);"/>
|
||||
<label control="maxTreeLevel-textbox-horizontal"
|
||||
value="&config.maxTreeLevel.after;"/>
|
||||
</hbox>
|
||||
@ -160,8 +160,8 @@
|
||||
<textbox id="maxTreeLevel-textbox-vertical"
|
||||
type="number"
|
||||
min="1" increment="1" size="4"
|
||||
value="999"
|
||||
oninput="document.getElementById(this.previousSibling.previousSibling.getAttribute('preference')).value = this.value;"/>
|
||||
oninput="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-vertical', true);"
|
||||
onchange="onSyncMaxTreeLevelUIToPref('maxTreeLevel-checkbox-vertical', true);"/>
|
||||
<label control="maxTreeLevel-textbox-vertical"
|
||||
value="&config.maxTreeLevel.after;"/>
|
||||
</hbox>
|
||||
|
Loading…
Reference in New Issue
Block a user