Create profile wizard from profile manager

This commit is contained in:
gayatrib%netscape.com 1999-05-19 04:21:53 +00:00
parent 24ee6fed33
commit e5c2945704

View File

@ -0,0 +1,105 @@
<?xml version="1.0"?>
<?xml-stylesheet href="common.css" type="text/css"?>
<!DOCTYPE window>
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/TR/WD-rdf-syntax#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="CreateProfile Wizard">
<html:script>
var profName = "";
var profDir = "";
var fullName = "";
var emailAddr = "";
var smtpVal = "";
var toolkitCore;
nameGlobal = new Array();
nameArray = new Array();
var count = 0;
function Startup()
{
dump("Doing Startup...\n");
toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
}
function SetValue(name, value)
{
dump("Inside SetValue\n");
var found = false;
for (i = 0; i !=count; i++) {
if (nameArray[i] == name) {
dump("Name exists: "+nameGlobal[i]+"\n");
nameGlobal[i] = name+"="+value+"%";
dump("New values: "+name+" "+value+"\n");
found = true;
break;
}
}
if (!found) {
dump("Name does not exist\n");
nameGlobal[count] = name+"="+value+"%";
dump("Name Value: "+name+" "+value+"\n");
nameArray[count] = name;
count++;
}
}
function Finish()
{
var data = "";
var i = 0;
dump("before for loop\n");
for (i = 0; i !=count; i++) {
data = data+nameGlobal[i];
}
dump("DATA IS: "+data+"\n");
dump("calling javascript reflection\n");
var profileCore = XPAppCoresManager.Find("ProfileCore");
if (!profileCore)
{
dump("!profileCore\n");
profileCore = new ProfileCore();
dump("!profileCore\n");
if (profileCore) {
dump("after ! yes profileCore in if loop\n");
profileCore.Init("ProfileCore");
}
else {
dump("profile not created\n");
}
}
if (profileCore) {
dump("yes profileCore\n");
profileCore.CreateNewProfile(data);
}
}
</html:script>
<html:iframe src="content1.xul" name="frame1" width="100%" height="350px"> </html:iframe>
<html:iframe src="navigationManagerStart.xul" name="frame2" width="100%" height="90px"> </html:iframe>
</window>