gecko-dev/profile/resources/cpw.xul

120 lines
2.4 KiB
Plaintext
Raw Normal View History

1999-05-05 04:41:20 +00:00
<?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:div flex="100%">
1999-05-05 04:41:20 +00:00
<html:script>
var profName = "";
var profDir = "";
var fullName = "";
var emailAddr = "";
var smtpVal = "";
1999-05-05 04:41:20 +00:00
var toolkitCore;
nameGlobal = new Array();
nameArray = new Array();
var count = 0;
var dataCount = 0;
1999-05-05 04:41:20 +00:00
function Startup()
{
//dump("Doing Startup...\n");
1999-05-05 04:41:20 +00:00
toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
}
function SetValue(name, value)
{
//dump("Inside SetValue\n");
1999-05-05 04:41:20 +00:00
var found = false;
for (i = 0; i !=dataCount; i++) {
1999-05-05 04:41:20 +00:00
if (nameArray[i] == name) {
//dump("Name exists: "+nameGlobal[i]+"\n");
1999-05-05 04:41:20 +00:00
nameGlobal[i] = name+"="+value+"%";
//dump("New values: "+name+" "+value+"\n");
1999-05-05 04:41:20 +00:00
found = true;
break;
}
}
if (!found) {
//dump("Name does not exist\n");
nameGlobal[dataCount] = name+"="+value+"%";
//dump("Name Value: "+name+" "+value+"\n");
1999-05-05 04:41:20 +00:00
nameArray[dataCount] = name;
dataCount++;
1999-05-05 04:41:20 +00:00
}
}
function Finish()
{
var data = "";
var i = 0;
//dump("before for loop\n");
for (i = 0; i !=dataCount; i++) {
1999-05-05 04:41:20 +00:00
data = data+nameGlobal[i];
}
dump("DATA IS: "+data+"\n");
//dump("calling javascript reflection\n");
1999-05-05 04:41:20 +00:00
var profileCore = XPAppCoresManager.Find("ProfileCore");
if (!profileCore)
{
//dump("!profileCore\n");
1999-05-05 04:41:20 +00:00
profileCore = new ProfileCore();
//dump("!profileCore\n");
1999-05-05 04:41:20 +00:00
if (profileCore) {
//dump("after ! yes profileCore in if loop\n");
1999-05-05 04:41:20 +00:00
profileCore.Init("ProfileCore");
}
else {
dump("profile not created\n");
}
}
if (profileCore) {
//dump("yes profileCore\n");
1999-05-05 04:41:20 +00:00
profileCore.CreateNewProfile(data);
profileCore.StartCommunicator(profName);
1999-05-05 04:41:20 +00:00
}
toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
if (toolkitCore) {
toolkitCore.CloseWindow(parent);
}
}
</html:script>
<html:iframe src="content1.xul" name="frame1" width="100%" height="350px"> </html:iframe>
<html:iframe src="navigationStart.xul" name="frame2" width="100%" height="100px"> </html:iframe>
1999-05-05 04:41:20 +00:00
</html:div>
</window>