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:
timeless%mac.com 2001-03-02 02:18:02 +00:00
Родитель 9edfcd7fd6
Коммит d83167880e
1 изменённых файлов: 9 добавлений и 5 удалений

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

@ -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;
}
}