зеркало из https://github.com/mozilla/pjs.git
add initial implementation of the account wizard
This commit is contained in:
Родитель
958ca9b7e4
Коммит
9ddf61f119
|
@ -1,10 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window>
|
||||
<!DOCTYPE window
|
||||
[
|
||||
<!ENTITY accountManagerTitle.label "Account Manager">
|
||||
|
||||
]>
|
||||
<xul:window id="account-manager" xmlns="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="Startup()" title="Account Manager">
|
||||
onload="Startup()" title="&accountManagerTitle.label;">
|
||||
<script language="javascript" src="AccountManager.js"/>
|
||||
|
||||
<frameset cols="25%,75%">
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*/
|
||||
|
||||
var wizardMap = {
|
||||
intro: { next: "identity"},
|
||||
identity: { next: "smtp", previous: "intro"},
|
||||
smtp: { next: "server", previous: "identity"},
|
||||
server: { next: "done", previous: "server"},
|
||||
done: { previous: "server" }
|
||||
}
|
||||
|
||||
var pagePrefix="aw-";
|
||||
var pagePostfix=".xul";
|
||||
|
||||
var currentPageTag;
|
||||
|
||||
var contentWindow;
|
||||
|
||||
// event handlers
|
||||
function onLoad() {
|
||||
dump("Initializing the wizard..\n");
|
||||
contentWindow = window.frames["wizardContents"];
|
||||
}
|
||||
|
||||
function onNext(event) {
|
||||
savePageInfo(contentWindow);
|
||||
nextPage(contentWindow);
|
||||
initializePage(contentWindow);
|
||||
}
|
||||
|
||||
function onBack(event) {
|
||||
previousPage(contentWindow);
|
||||
}
|
||||
|
||||
// utility functions
|
||||
function getUrlFromTag(title) {
|
||||
return pagePrefix + title + pagePostfix;
|
||||
}
|
||||
|
||||
|
||||
// helper functions that actually do stuff
|
||||
function savePageInfo(win) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
function nextPage(win) {
|
||||
var nextPageTag = wizardMap[currentPageTag].next;
|
||||
if (nextPageTag)
|
||||
win.location=getUrlFromTag(nextPageTag);
|
||||
}
|
||||
|
||||
function previousPage(win) {
|
||||
previousPageTag = wizardMap[currentPageTag].previous;
|
||||
if (previousPageTag)
|
||||
win.location=getUrlFromTag(previousPageTag)
|
||||
}
|
||||
|
||||
function initializePage(win) {
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window>
|
||||
|
||||
<window id="account-wizard-dialog" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="onLoad();">
|
||||
|
||||
<html:script language="JavaScript" src="AccountWizard.js"/>
|
||||
|
||||
<box align="vertical" style="width: 100%; height: 100%">
|
||||
<html:iframe flex="100%" style="width: 100%; height: 200px; border: none" src="aw-intro.xul" name="wizardContents"/>
|
||||
<html:br/><html:hr/>
|
||||
<box align="horizontal" style="margin: 10px">
|
||||
<spring flex="100%"/>
|
||||
<titledbutton value="< Back" onclick="onBack(event);"/>
|
||||
<titledbutton value="Next >" onclick="onNext(event);"/>
|
||||
<spring style="width: 10px"/>
|
||||
<titledbutton value="Finish" onclick="onFinish(event);"/>
|
||||
<spring style="width: 10px"/>
|
||||
<titledbutton value="Cancel" onclick="onCancel(event);"/>
|
||||
</box>
|
||||
</box>
|
||||
</window>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window>
|
||||
|
||||
<window id="done" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="parent.currentPageTag='done'">
|
||||
<html:div>That's it!</html:div>
|
||||
</window>
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window>
|
||||
|
||||
<window id="identity" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="parent.currentPageTag='identity'">
|
||||
|
||||
<box align="vertical" style="width: 100%; height: 100%; margin: 10px">
|
||||
<html:div>Please enter your name and email address.</html:div>
|
||||
<html:div>This information will be saved in your preferences</html:div>
|
||||
|
||||
<html:div>Full name:</html:div>
|
||||
<box align="horizontal">
|
||||
<html:input id="name" type="text"/>
|
||||
<html:div>(e.g. John Smith)</html:div>
|
||||
</box>
|
||||
|
||||
<html:div>Email Address:</html:div>
|
||||
<box align="horizontal">
|
||||
<html:input id="email" type="text"/>
|
||||
<html:div>(e.g. jsmith@company.com)</html:div>
|
||||
</box>
|
||||
|
||||
</box>
|
||||
</window>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window>
|
||||
|
||||
<window id="intro" title="intro" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="parent.currentPageTag='intro'">
|
||||
<html:div>Welcome to the account wizard</html:div>
|
||||
</window>
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window>
|
||||
|
||||
<window id="server" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="parent.currentPageTag='server'">
|
||||
|
||||
<box align="vertical" style="width: 100%; height: 100%; margin: 10px">
|
||||
<html:div>Mail Server user name:</html:div>
|
||||
<box align="horizontal">
|
||||
<html:input id="username" type="text"/>
|
||||
<html:div>(e.g. jsmith)</html:div>
|
||||
</box>
|
||||
|
||||
<html:div>Incoming Mail Server:</html:div>
|
||||
<box align="horizontal">
|
||||
<html:input id="hostname" type="text"/>
|
||||
<html:div>(e.g. jsmith)</html:div>
|
||||
</box>
|
||||
|
||||
</box>
|
||||
</window>
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window>
|
||||
|
||||
<window id="smtp" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="parent.currentPageTag='smtp'">
|
||||
|
||||
<box align="vertical" style="width: 100%; height: 100%; margin: 10px">
|
||||
<html:div>Outgoing mail (SMTP) server:</html:div>
|
||||
<box align="horizontal">
|
||||
<html:input id="smtp" type="text"/>
|
||||
<html:div>f!</html:div>
|
||||
</box>
|
||||
|
||||
</box>
|
||||
</window>
|
Загрузка…
Ссылка в новой задаче