mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 11:45:37 +00:00
fix for #63992. fix based on patch from hwaara@chello.se. sr=bienvenu. also fix a js warning.
This commit is contained in:
parent
c184a0d7b9
commit
6bbf4a5161
@ -30,6 +30,8 @@ function onPreInit(account, accountValues)
|
||||
var type = parent.getAccountValue(account, accountValues, "server", "type");
|
||||
|
||||
hideShowControls(type);
|
||||
|
||||
enableBiffUI();
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +71,7 @@ function hideShowControls(serverType)
|
||||
// adding support for hiding multiple server types using hideFor="server1,server2"
|
||||
var hideForBool = false;
|
||||
var hideForTokens = hideFor.split(",");
|
||||
for (j = 0; j < hideForTokens.length; j++) {
|
||||
for (var j = 0; j < hideForTokens.length; j++) {
|
||||
if (hideForTokens[j] == serverType) {
|
||||
hideForBool = true;
|
||||
break;
|
||||
@ -171,3 +173,19 @@ function secureSelect() {
|
||||
else
|
||||
document.getElementById("server.port").value = protocolInfo.getDefaultServerPort(false);
|
||||
}
|
||||
|
||||
function enableBiffUI()
|
||||
{
|
||||
var parentCheckBox = document.getElementById('server.doBiff');
|
||||
var checkBox = document.getElementById('server.downloadOnBiff');
|
||||
var textField = document.getElementById('server.biffMinutes');
|
||||
|
||||
if (parentCheckBox.getAttribute("checked")) {
|
||||
checkBox.setAttribute("disabled", "true");
|
||||
textField.setAttribute("disabled", "true");
|
||||
}
|
||||
else {
|
||||
checkBox.setAttribute("disabled", "false");
|
||||
textField.setAttribute("disabled", "false");
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,8 @@
|
||||
value="&savePassword.label;"/>
|
||||
-->
|
||||
<box orient="horizontal" autostretch="never">
|
||||
<checkbox wsm_persist="true" id="server.doBiff" value="&biffStart.label;"/>
|
||||
<checkbox wsm_persist="true" id="server.doBiff" value="&biffStart.label;"
|
||||
oncommand="enableBiffUI()"/>
|
||||
<textfield wsm_persist="true" id="server.biffMinutes" size="3"/>
|
||||
<text class="label" for="server.biffMinutes" value="&biffEnd.label;"/>
|
||||
</box>
|
||||
|
Loading…
Reference in New Issue
Block a user