Fix for Bug 182642: Title of the "Available Profiles" listbox can be

deleted with the "Delete Profile" button
r=jag, sr=alecf
This commit is contained in:
Stefan.Borggraefe%gmx.de 2004-04-29 14:34:55 +00:00
Родитель 9e13ed7b74
Коммит 844f914326
1 изменённых файлов: 16 добавлений и 12 удалений

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

@ -201,21 +201,25 @@ function DeleteProfile( deleteFiles )
var profileList = document.getElementById("profiles");
if (profileList.selectedItems && profileList.selectedItems.length) {
var selected = profileList.selectedItems[0];
var firstAdjacent = selected.previousSibling;
var name = selected.getAttribute("rowName");
var previous = profileList.getPreviousItem(selected, 1);
try {
profile.deleteProfile(name, deleteFiles);
profileList.removeChild(selected);
if (previous) {
profileList.selectItem(previous);
profileList.ensureElementIsVisible(previous);
}
catch (ex) {
}
if( firstAdjacent ) {
profileList.selectItem( firstAdjacent );
profileList.ensureElementIsVisible( firstAdjacent );
}
// set the button state
DoEnabling();
}
catch (ex) {
dump("Exception during profile deletion.\n");
}
}
}
function ConfirmMigrateAll()