зеркало из 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 imagesEnabled = document.getElementById("enableImages").checked;
|
||||||
var imageBroadcaster = document.getElementById("imageBroadcaster");
|
var imageBroadcaster = document.getElementById("imageBroadcaster");
|
||||||
imageBroadcaster.setAttribute("disabled", !imagesEnabled);
|
imageBroadcaster.setAttribute("disabled", !imagesEnabled);
|
||||||
|
javascriptEnabledChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
function viewImages()
|
function viewImages()
|
||||||
|
@ -65,10 +66,11 @@ function advancedJavaScript()
|
||||||
"chrome,modal");
|
"chrome,modal");
|
||||||
}
|
}
|
||||||
|
|
||||||
function javascriptEnabledChange(aEnable){
|
function javascriptEnabledChange()
|
||||||
var label = document.getElementById("allowScripts");
|
{
|
||||||
|
var isEnabled = document.getElementById("enableJavaScript").checked;
|
||||||
var advancedButton = document.getElementById("advancedJavascript");
|
var advancedButton = document.getElementById("advancedJavascript");
|
||||||
advancedButton.disabled = aEnable;
|
advancedButton.disabled = !isEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
function togglePermissionEnabling()
|
function togglePermissionEnabling()
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<hbox>
|
<hbox>
|
||||||
<checkbox id="enableJavaScript" label="&enableJavaScript.label;" accesskey="&enableJavaScript.accesskey;"
|
<checkbox id="enableJavaScript" label="&enableJavaScript.label;" accesskey="&enableJavaScript.accesskey;"
|
||||||
prefstring="javascript.enabled"
|
prefstring="javascript.enabled"
|
||||||
oncommand="javascriptEnabledChange(!this.checked);"/>
|
oncommand="javascriptEnabledChange();"/>
|
||||||
<spring flex="1"/>
|
<spring flex="1"/>
|
||||||
|
|
||||||
<checkbox id="allowWindowMoveResize" prefstring="dom.disable_window_move_resize" hidden="true"/>
|
<checkbox id="allowWindowMoveResize" prefstring="dom.disable_window_move_resize" hidden="true"/>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче