зеркало из https://github.com/mozilla/gecko-dev.git
Bug 311496 - Safe Mode UI: 'Make Changes and Restart' button should be disabled if no action is checked, r=mconnor.
This commit is contained in:
Родитель
058e40f1fd
Коммит
d25fff9774
|
@ -21,6 +21,7 @@
|
|||
#
|
||||
# Contributor(s):
|
||||
# Mike Connor <mconnor@steelgryphon.com>
|
||||
# Asaf Romano <mozilla.mano@sent.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -102,3 +103,16 @@ function onCancel() {
|
|||
.getService(Components.interfaces.nsIAppStartup);
|
||||
appStartup.quit(appStartup.eForceQuit);
|
||||
}
|
||||
|
||||
function onLoad() {
|
||||
document.getElementById("tasks")
|
||||
.addEventListener("CheckboxStateChange", UpdateOKButtonState, false);
|
||||
}
|
||||
|
||||
function UpdateOKButtonState() {
|
||||
document.documentElement.getButton("accept").disabled =
|
||||
!document.getElementById("resetUserPrefs").checked &&
|
||||
!document.getElementById("resetBookmarks").checked &&
|
||||
!document.getElementById("resetToolbars").checked &&
|
||||
!document.getElementById("disableAddons").checked;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,9 @@
|
|||
width="&window.width;"
|
||||
ondialogaccept="onOK()"
|
||||
ondialogcancel="onCancel()"
|
||||
ondialogextra1="window.close()">
|
||||
ondialogextra1="window.close()"
|
||||
onload="onLoad();"
|
||||
buttondisabledaccept="true">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://browser/content/safeMode.js"/>
|
||||
|
||||
|
@ -74,7 +76,7 @@
|
|||
<separator class="thin"/>
|
||||
|
||||
<label value="&safeModeDescription2.label;"/>
|
||||
<vbox>
|
||||
<vbox id="tasks">
|
||||
<checkbox id="disableAddons" label="&disableAddons.label;" accesskey="&disableAddons.accesskey;"/>
|
||||
<checkbox id="resetToolbars" label="&resetToolbars.label;" accesskey="&resetToolbars.accesskey;"/>
|
||||
<checkbox id="resetBookmarks" label="&resetBookmarks.label;" accesskey="&resetBookmarks.accesskey;"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче