From eb2363f82d5d0cf4ee27dff33b8b1cff4e947c5e Mon Sep 17 00:00:00 2001 From: "gayatrib%netscape.com" Date: Mon, 5 Jul 1999 00:58:00 +0000 Subject: [PATCH] Adding xul files for Netcenter PReg git-svn-id: svn://10.0.0.236/trunk@38339 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/profile/resources/cpwPreg.xul | 109 ++++++++++++++++++++ mozilla/profile/resources/navFinishPreg.xul | 73 +++++++++++++ mozilla/profile/resources/navStartPreg.xul | 63 +++++++++++ mozilla/profile/resources/preg.html | 28 +++++ 4 files changed, 273 insertions(+) create mode 100644 mozilla/profile/resources/cpwPreg.xul create mode 100644 mozilla/profile/resources/navFinishPreg.xul create mode 100644 mozilla/profile/resources/navStartPreg.xul create mode 100644 mozilla/profile/resources/preg.html diff --git a/mozilla/profile/resources/cpwPreg.xul b/mozilla/profile/resources/cpwPreg.xul new file mode 100644 index 00000000000..da1e5a70d40 --- /dev/null +++ b/mozilla/profile/resources/cpwPreg.xul @@ -0,0 +1,109 @@ + + + + + + + + + + + + + +var profName = ""; +var profDir = ""; +var fullName = ""; +var emailAddr = ""; +var smtpVal = ""; + +var toolkitCore; +nameGlobal = new Array(); +nameArray = new Array(); +var count = 0; +var dataCount = 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 !=dataCount; 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[dataCount] = name+"="+value+"%"; + //dump("Name Value: "+name+" "+value+"\n"); + + nameArray[dataCount] = name; + dataCount++; + } +} + +function Finish() +{ + var data = ""; + var i = 0; + //dump("before for loop\n"); + for (i = 0; i !=dataCount; 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); + profileCore.StartCommunicator(profName); + } + +} + + + + + + + diff --git a/mozilla/profile/resources/navFinishPreg.xul b/mozilla/profile/resources/navFinishPreg.xul new file mode 100644 index 00000000000..69a086f740b --- /dev/null +++ b/mozilla/profile/resources/navFinishPreg.xul @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + var count = parent.count; + + pages = new Object(); + pages[0] = "resource:/res/profile/content1.xul"; + pages[1] = "resource:/res/profile/content2.xul"; + + function BrowserLoadURL(func) + { + if (func == "Prev") { + if (count > 0) { + count = count - 1; + } + } + parent.frames[0].commit(); + parent.frames[0].location.replace( pages[count] ); + parent.count = count; + parent.frames[1].location.replace("resource:/res/profile/navigationStart.xul"); + } + + + function SetValue(name, value) + { + //dump("Set Value"); + //dump("name: "+name+"\n"); + //dump("value: "+value+"\n"); + } + + + function ExitWizard() + { + dump("Inside the Exit Wizard function...\n"); + parent.frames[0].commit(); + parent.Finish(); + parent.location.replace("resource://res/profile/preg.html"); + + //var toolkitCore = XPAppCoresManager.Find("toolkitCore"); + //if (!toolkitCore) { + // toolkitCore = new ToolkitCore(); + + // if (toolkitCore) { + // toolkitCore.Init("toolkitCore"); + // } + //} + + //if (toolkitCore) { + // toolkitCore.CloseWindow(parent); + //} + } + + + + + Prev + Finish + + + diff --git a/mozilla/profile/resources/navStartPreg.xul b/mozilla/profile/resources/navStartPreg.xul new file mode 100644 index 00000000000..d74dfc7cf57 --- /dev/null +++ b/mozilla/profile/resources/navStartPreg.xul @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + var count = parent.count; + + pages = new Object(); + pages[0] = "resource:/res/profile/content1.xul"; + pages[1] = "resource:/res/profile/content2.xul"; + + function BrowserLoadURL(func) + { + if (func == "Prev") { + if (count > 0) { + count = count - 1; + } + } + + if (func == "Next") { + if (count != 1) { + count = count + 1; + } + } + + parent.frames[0].commit(); + parent.frames[0].location.replace( pages[count] ); + + if (count == 1) { + parent.count = count; + parent.frames[1].location.replace("resource:/res/profile/navFinishPreg.xul"); + } + } + + + function SetValue(name, value) + { + //dump("Set Value"); + //dump("name: "+name+"\n"); + //dump("value: "+value+"\n"); + } + + + + + + Prev + Next + + + diff --git a/mozilla/profile/resources/preg.html b/mozilla/profile/resources/preg.html new file mode 100644 index 00000000000..d66d04c3333 --- /dev/null +++ b/mozilla/profile/resources/preg.html @@ -0,0 +1,28 @@ + + + + + + Hello + + + +
+

+Product Registration

+ +
+

+User Name :  +
+

+
 Do not register me  +
  +

+


+

+

+


+

+ +