some tweaks/polish for profile manager

This commit is contained in:
ben%netscape.com 2000-05-03 01:38:19 +00:00
parent b4c322b221
commit 13b739c446
3 changed files with 11 additions and 3 deletions

View File

@ -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=""/>

View File

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

View File

@ -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 )