зеркало из https://github.com/mozilla/pjs.git
fix bug 51588 'Edit' and 'Remove' buttons should appear disabled in Helper apps window when no app is chosen
patches by ksosez@softhome.net, bzbarsky@mit.edu r=bz,timeless sr=alecf
This commit is contained in:
Родитель
9edfcd7fd6
Коммит
d83167880e
|
@ -61,6 +61,10 @@ function Startup()
|
|||
gEditButton = document.getElementById("editButton");
|
||||
gRemoveButton = document.getElementById("removeButton");
|
||||
|
||||
// Disable the Edit & Remove buttons until we click on something
|
||||
gEditButton.disabled=true;
|
||||
gRemoveButton.disabled=true;
|
||||
|
||||
const mimeTypes = "UMimTyp";
|
||||
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService();
|
||||
if (fileLocator)
|
||||
|
@ -95,14 +99,14 @@ function selectApplication()
|
|||
gHandlerField.setAttribute("value", handlerOverride.appDisplayName);
|
||||
|
||||
if (handlerOverride.isEditable == "false") {
|
||||
gEditButton.setAttribute("disabled", "true");
|
||||
gRemoveButton.setAttribute("disabled", "true");
|
||||
gEditButton.disabled=true;
|
||||
gRemoveButton.disabled=true;
|
||||
}
|
||||
else {
|
||||
gEditButton.removeAttribute("disabled");
|
||||
gRemoveButton.removeAttribute("disabled");
|
||||
gEditButton.disabled=false;
|
||||
gRemoveButton.disabled=false;
|
||||
}
|
||||
|
||||
|
||||
delete handlerOverride;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче