fix for #34427 - skin the account wizard (finally!)

r=ben
switch over to new XUL widgets
also fixes #39345
This commit is contained in:
alecf%netscape.com 2000-07-27 00:50:51 +00:00
Родитель 87a7fc278a
Коммит 85b3bec1d9
11 изменённых файлов: 29 добавлений и 52 удалений

Просмотреть файл

@ -44,7 +44,7 @@ Rights Reserved.
<script language="JavaScript" src="chrome://messenger/content/ispUtils.js"/>
<box align="vertical" flex="100%">
<box id="contentsink" flex="100%">
<html:iframe flex="100%" style="margin: 5px; border: none"
<iframe flex="100%"
name="wizardContents" scrolling="auto" id="wizardContents"/>
</box>
<box id="wizardButtons"/>

Просмотреть файл

@ -25,7 +25,7 @@ Rights Reserved.
<!DOCTYPE window SYSTEM "chrome://messenger/locale/aw-accname.dtd" >
<window id="accnamepage" xmlns:html="http://www.w3.org/1999/xhtml"
<window id="accnamepage"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical"
@ -33,13 +33,14 @@ Rights Reserved.
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-accname.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>
<box class="box-header" value="&accnameTitle.label;"/>
<html>&accnameDesc.label;</html>
<spring class="spacer"/>
<box>
<text class="label" value="&accnameLabel.label;"/>
<html:input type="text" name="prettyName" id="prettyName" size="40"/>
<textfield id="prettyName" size="40" wsm_persist="true"/>
</box>
</window>

Просмотреть файл

@ -23,7 +23,7 @@ Rights Reserved.
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/aw-done.dtd" >
<window id="done" xmlns:html="http://www.w3.org/1999/xhtml"
<window id="done"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
align="vertical"
class="dialog"
@ -46,7 +46,7 @@ Rights Reserved.
<text id="identity.email.text"/>
</box>
<spring class="spacer"/>
<!-- <html:div>&setupAnother.label;</html:div> -->
<!-- <html>&setupAnother.label;</html> -->
<spring class="spacer"/>
<html>&clickFinish.label;</html>
<spring class="spacer"/>

Просмотреть файл

@ -24,7 +24,7 @@ Rights Reserved.
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/aw-identity.dtd" >
<window id="identitypage" xmlns:html="http://www.w3.org/1999/xhtml"
<window id="identitypage"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
align="vertical"
class="dialog"
@ -32,6 +32,7 @@ Rights Reserved.
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-identity.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>
<box class="box-header" value="&identityTitle.label;"/>
<html>&identityDesc.label;</html>
@ -43,7 +44,7 @@ Rights Reserved.
<box>
<text class="label" for="fullName" value="&fullnameLabel.label;"/>
<html:input type="text" mailtype="identity" name="fullName" id="fullName"/>
<textfield mailtype="identity" wsm_persist="true" name="fullName" id="fullName"/>
</box>
<spring class="spacer"/>
@ -55,7 +56,7 @@ Rights Reserved.
<box>
<text class="label" for="email" value="&emailLabel.label;"/>
<html:input type="text" mailtype="identity" name="email" id="email"/>
<textfield wsm_persist="true" mailtype="identity" name="email" id="email"/>
<text id="postEmailText"/>
</box>
</window>

Просмотреть файл

@ -63,6 +63,7 @@ var savedPassword="";
function onSavePassword(target) {
dump("savePassword changed! (" + target.checked + ")\n");
var passwordField = document.getElementById("server.password");
if (!passwordField) return;
if (target.checked) {
passwordField.removeAttribute("disabled");

Просмотреть файл

@ -24,7 +24,7 @@ Rights Reserved.
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/aw-login.dtd" >
<window id="loginpage" xmlns:html="http://www.w3.org/1999/xhtml"
<window id="loginpage"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
align="vertical"
class="dialog"
@ -32,6 +32,7 @@ Rights Reserved.
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-login.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>
<box class="box-header" value="&loginTitle.label;"/>
@ -39,29 +40,26 @@ Rights Reserved.
<html>&usernameDesc.label; &usernameExample.label;</html>
<box>
<text class="label" value="&usernameLabel.label;"/>
<html:input type="text" name="username" id="username"/>
<textfield id="username" wsm_persist="true"/>
</box>
</box>
<spring class="spacer"/>
<!--
<box align="vertical">
<text class="title" value="&passwordTitle.label;"/>
<html>&savePasswordDesc.label;</html>
<spring class="spacer"/>
<html>&savePasswordLabel.label;</html>
<box>
<html:input type="checkbox" name="rememberPassword"
onchange="onSavePassword(event.target);"
id="rememberPassword"/>
<html:label for="rememberPassword">&savePasswordCheckbox.label;</html:label>
</box>
<checkbox wsm_persist="true" oncommand="onSavePassword(event.target)"
id="rememberPassword"/>
<spring class="spacer"/>
<box orient="vertical" style="padding-left: 20px">
<text class="label" value="&passwordDesc.label;"/>
<box>
<text class="label" value="&passwordLabel.label;"/>
<html:input type="password"
name="password" id="password"/>
<textfield type="password" id="password" wsm_persist="true"/>
</box>
</box>
</box>
-->
</window>

Просмотреть файл

@ -24,7 +24,7 @@ Rights Reserved.
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/aw-server.dtd" >
<window id="serverpage" xmlns:html="http://www.w3.org/1999/xhtml"
<window id="serverpage"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
align="vertical"
class="dialog"
@ -32,6 +32,7 @@ Rights Reserved.
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-server.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>
<box class="box-header" value="&serverTitle.label;"/>
@ -39,7 +40,7 @@ Rights Reserved.
<html>&newsServerNameDesc.label;</html>
<box>
<text class="label" for="hostname" value="&incomingServerLabel.label;"/>
<html:input type="text" id="hostname" name="hostname"/>
<textfield id="hostname" wsm_persist="true"/>
</box>
</box>

Просмотреть файл

@ -38,23 +38,6 @@ function validate() {
}
function onInit() {
// hack hack - initialize the menulist
var hiddenInput = document.getElementById("servertype");
dump("hiddenInput = " + hiddenInput.value + "\n");
var servertypeMenulist = document.getElementById("servertypeMenulist");
if (hiddenInput.value) {
var selectedElements =
servertypeMenulist.getElementsByAttribute("data", hiddenInput.value);
if (selectedElements && selectedElements.length>0)
servertypeMenulist.selectedItem = selectedElements[0];
}
// initialize to default selected item
else {
hiddenInput.value = servertypeMenulist.selectedItem.getAttribute("data");
}
var smtpTextField = document.getElementById("smtphostname");
@ -69,14 +52,6 @@ function onInit() {
hideShowSmtpSettings(smtpServer);
}
function onTypeChanged(event)
{
dump("onTypeChanged(<" + event.target.localName + ">)\n");
var hiddenInput = document.getElementById("servertype");
hiddenInput.value = event.target.getAttribute("data");
}
function setDivText(id, value) {
if (!value) return;

Просмотреть файл

@ -24,7 +24,7 @@ Rights Reserved.
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/aw-server.dtd" >
<window id="serverpage" xmlns:html="http://www.w3.org/1999/xhtml"
<window id="serverpage"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
align="vertical"
class="dialog"
@ -32,6 +32,7 @@ Rights Reserved.
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-server.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>
<box class="box-header" value="&serverTitle.label;"/>
@ -42,20 +43,19 @@ Rights Reserved.
<spring class="spacer"/>
<box>
<text class="label" value="&incomingServerTypeLabel.label;"/>
<menulist id="servertypeMenulist" oncommand="onTypeChanged(event)">
<menulist id="servertype" wsm_persist="true">
<menupopup>
<menuitem data="pop3" value="&popType.label;"/>
<menuitem data="imap" value="&imapType.label;"/>
</menupopup>
</menulist>
<html:input type="hidden" id="servertype" name="servertype"/>
</box>
<spring class="spacer"/>
<html>&incomingServerNameDesc.label;</html>
<spring class="spacer"/>
<box>
<text class="label" value="&incomingServerLabel.label;"/>
<html:input type="text" id="hostname" name="hostname"/>
<textfield wsm_persist="true" id="hostname"/>
</box>
</box>
@ -68,7 +68,7 @@ Rights Reserved.
<spring class="spacer"/>
<box>
<text class="label" value="&smtpServerLabel.label;"/>
<html:input type="text" id="smtphostname" name="smtphostname"/>
<textfield id="smtphostname" wsm_persist="true"/>
</box>
</box>

Просмотреть файл

@ -64,7 +64,7 @@ function SetFields(id, value)
dump(" Trying to find it in the ispbox \n");
var ispBox = document.getElementById("ispBox");
var fields = document.getElementsByAttribute("id", id);
if (!fields) {
if (!fields || fields.length == 0) {
dump("still couldn't find it!\n");
return;
} else

Просмотреть файл

@ -1,6 +1,6 @@
<!-- extracted from aw-login.xul -->
<!ENTITY loginTitle.label "Name and Password">
<!ENTITY loginTitle.label "User Name">
<!ENTITY usernameDesc.label "Enter the user name given to you by your email provider.">
<!-- LOCALIZATION NOTE (usernameExample.label) : do not translate "&quot;jsmith&quot;" in below line -->
<!ENTITY usernameExample.label "(For example, &quot;jsmith&quot;)">