mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
some tweaks/polish for profile manager
This commit is contained in:
parent
b4c322b221
commit
13b739c446
@ -23,7 +23,7 @@
|
||||
|
||||
<box class="box-header" id="header" value="&profileWizard.title;"/>
|
||||
<box id="contentarea" flex="1">
|
||||
<html:iframe src="about:blank" style="width: 40em; overflow: auto;" name="content" id="content" flex="1"/>
|
||||
<html:iframe src="about:blank" style="width: 40em; height: 17em; overflow: auto;" name="content" id="content" flex="1"/>
|
||||
</box>
|
||||
<box id="wizardButtons"/>
|
||||
<box class="box-status" id="status" value="&window.title.label;" progress=""/>
|
||||
|
@ -37,7 +37,10 @@ function CreateProfileWizard()
|
||||
function CreateProfile( aProfName, aProfDir )
|
||||
{
|
||||
var profile = new Profile( aProfName, aProfDir, "yes" );
|
||||
AddItem( "profilekids", profile );
|
||||
var item = AddItem( "profilekids", profile );
|
||||
var profileTree = document.getElementById( "profiles" );
|
||||
if( item )
|
||||
profileTree.selectItem( item );
|
||||
}
|
||||
|
||||
// rename the selected profile
|
||||
@ -142,6 +145,7 @@ 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 );
|
||||
@ -152,6 +156,8 @@ function DeleteProfile( deleteFiles )
|
||||
lString = lString.replace(/\s*<html:br\/>/g,"\n");
|
||||
alert( lString );
|
||||
}
|
||||
if( firstAdjacent )
|
||||
profileTree.selectCell( firstAdjacent );
|
||||
// set the button state
|
||||
DoEnabling();
|
||||
}
|
||||
|
@ -58,7 +58,8 @@ function highlightCurrentProfile()
|
||||
return;
|
||||
var currentProfileItem = document.getElementById( ( "profileName_" + currentProfile ) );
|
||||
var profileList = document.getElementById( "profiles" );
|
||||
profileList.selectItem( currentProfileItem );
|
||||
if( currentProfileItem )
|
||||
profileList.selectItem( currentProfileItem );
|
||||
}
|
||||
catch(e) {
|
||||
dump("*** failed to select current profile in list\n");
|
||||
@ -85,6 +86,7 @@ function AddItem( aChildren, aProfileObject )
|
||||
// var roaming = document.getElementById("roamingitem");
|
||||
// kids.insertBefore(item,roaming);
|
||||
kids.appendChild(item);
|
||||
return item;
|
||||
}
|
||||
|
||||
function Profile ( aName, aDir, aMigrated )
|
||||
|
Loading…
Reference in New Issue
Block a user