зеркало из https://github.com/mozilla/pjs.git
fixes for b41817 (cannot delete profile), and b32808 (profile not created in selected dir), r=hyatt
This commit is contained in:
Родитель
f96d29bcff
Коммит
be83493823
|
@ -108,7 +108,7 @@ function onFinish()
|
|||
|
||||
var profName = wizardManager.WSM.PageData["newProfile1_2"].ProfileName.value;
|
||||
dump("**** profName: "+ profName + "\n");
|
||||
var profDir = wizardManager.WSM.PageData["newProfile1_2"].ProfileDir.rootFolder;
|
||||
var profDir = wizardManager.WSM.PageData["newProfile1_2"].ProfileDir.value;
|
||||
|
||||
// Get langcode
|
||||
var langcode = window.frames["content"].document.getElementById("langList").selectedItem.getAttribute("data");
|
||||
|
|
|
@ -79,6 +79,7 @@ function chooseProfileFolder( aRootFolder )
|
|||
}
|
||||
if( aRootFolder ) {
|
||||
var folderText = document.getElementById("ProfileDir");
|
||||
dump("*** setting rootFolderAttribute to " + aRootFolder + "\n");
|
||||
folderText.setAttribute( "rootFolder", aRootFolder );
|
||||
if ( aRootFolder != top.profile.defaultProfileParentDir.nativePath )
|
||||
document.getElementById( "useDefault" ).removeAttribute("disabled");
|
||||
|
|
|
@ -136,22 +136,24 @@ function DeleteProfile( deleteFiles )
|
|||
{
|
||||
var profileTree = document.getElementById( "profiles" );
|
||||
var profileKids = document.getElementById( "profilekids" )
|
||||
var selected = profileTree.selectedItems[0];
|
||||
var firstAdjacent = selected.previousSibling;
|
||||
var name = selected.getAttribute( "rowName" );
|
||||
try {
|
||||
profile.deleteProfile( name, deleteFiles );
|
||||
profileKids.removeChild( selected );
|
||||
if (profileTree.selectedItems && profileTree.selectedItems.length) {
|
||||
var selected = profileTree.selectedItems[0];
|
||||
var firstAdjacent = selected.previousSibling;
|
||||
var name = selected.getAttribute( "rowName" );
|
||||
try {
|
||||
profile.deleteProfile( name, deleteFiles );
|
||||
profileKids.removeChild( selected );
|
||||
}
|
||||
catch (ex) {
|
||||
var lString = bundle.GetStringFromName("deletefailed");
|
||||
lString = lString.replace(/\s*<html:br\/>/g,"\n");
|
||||
alert( lString );
|
||||
}
|
||||
if( firstAdjacent )
|
||||
profileTree.selectItem( firstAdjacent );
|
||||
// set the button state
|
||||
DoEnabling();
|
||||
}
|
||||
catch (ex) {
|
||||
var lString = bundle.GetStringFromName("deletefailed");
|
||||
lString = lString.replace(/\s*<html:br\/>/g,"\n");
|
||||
alert( lString );
|
||||
}
|
||||
if( firstAdjacent )
|
||||
profileTree.selectCell( firstAdjacent );
|
||||
// set the button state
|
||||
DoEnabling();
|
||||
}
|
||||
|
||||
function ConfirmMigrateAll()
|
||||
|
|
Загрузка…
Ссылка в новой задаче