Bug 192447: correctly disable the Advanced button when js is disabled.

original patch by norority.
This commit is contained in:
chanial%noos.fr 2003-02-27 18:53:51 +00:00
Родитель 407f5b970f
Коммит 9c3b9e0612
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -51,6 +51,7 @@ function Startup()
var imagesEnabled = document.getElementById("enableImages").checked;
var imageBroadcaster = document.getElementById("imageBroadcaster");
imageBroadcaster.setAttribute("disabled", !imagesEnabled);
javascriptEnabledChange()
}
function viewImages()
@ -65,10 +66,11 @@ function advancedJavaScript()
"chrome,modal");
}
function javascriptEnabledChange(aEnable){
var label = document.getElementById("allowScripts");
function javascriptEnabledChange()
{
var isEnabled = document.getElementById("enableJavaScript").checked;
var advancedButton = document.getElementById("advancedJavascript");
advancedButton.disabled = aEnable;
advancedButton.disabled = !isEnabled;
}
function togglePermissionEnabling()

Просмотреть файл

@ -89,7 +89,7 @@
<hbox>
<checkbox id="enableJavaScript" label="&enableJavaScript.label;" accesskey="&enableJavaScript.accesskey;"
prefstring="javascript.enabled"
oncommand="javascriptEnabledChange(!this.checked);"/>
oncommand="javascriptEnabledChange();"/>
<spring flex="1"/>
<checkbox id="allowWindowMoveResize" prefstring="dom.disable_window_move_resize" hidden="true"/>