зеркало из https://github.com/mozilla/pjs.git
Bug 192447: correctly disable the Advanced button when js is disabled.
original patch by norority.
This commit is contained in:
Родитель
407f5b970f
Коммит
9c3b9e0612
|
@ -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"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче