зеркало из https://github.com/mozilla/pjs.git
Bug 367879 - spam dropdown should be disabled when checkbox isn't checked, r/sr=dmose
This commit is contained in:
Родитель
dcc75922ea
Коммит
f785e91cbb
|
@ -85,6 +85,10 @@ function onInit(aPageId, aServerId)
|
|||
serverFilterList.selectedIndex = 0;
|
||||
|
||||
updateMoveTargetMode(document.getElementById('server.moveOnSpam').checked);
|
||||
|
||||
// enable or disable the useServerFilter checkbox
|
||||
var checked = document.getElementById("server.useServerFilter").checked;
|
||||
onServerFilterToggle(checked);
|
||||
}
|
||||
|
||||
function onPreInit(account, accountValues)
|
||||
|
@ -129,6 +133,17 @@ function onServerFilterListChange()
|
|||
document.getElementById("useServerFilterList").value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when someone checks or unchecks the server-filter checkbox. We need
|
||||
* to enable or disable the menulist accordingly
|
||||
*
|
||||
* @param the boolean value of the checkbox
|
||||
*/
|
||||
function onServerFilterToggle(aValue)
|
||||
{
|
||||
document.getElementById("useServerFilterList").disabled = !aValue;
|
||||
}
|
||||
|
||||
function onSave()
|
||||
{
|
||||
onSaveWhiteList();
|
||||
|
|
|
@ -108,6 +108,7 @@
|
|||
<checkbox id="server.useServerFilter" label="&ispHeaders.label;"
|
||||
accesskey="&ispHeaders.accesskey;"
|
||||
genericattr="true" pref="true" wsm_persist="true" preftype="bool"
|
||||
oncommand="onServerFilterToggle(this.checked);"
|
||||
prefstring="mail.server.%serverkey%.useServerFilter"/>
|
||||
<menulist id="useServerFilterList" oncommand="onServerFilterListChange();"/>
|
||||
</hbox>
|
||||
|
|
Загрузка…
Ссылка в новой задаче