Bug 506290 - "[autoconfig] Layout changes to quick account setup." [r=philringnalda sr=bienvenu ui-r=clarkbw a=blocking-thunderbird3]
This commit is contained in:
Родитель
1a02e61a62
Коммит
b1f66b9878
|
@ -1,18 +1,20 @@
|
|||
<!ENTITY welcome.description "Quick Account Setup">
|
||||
<!ENTITY autoconfigWizard.style "width: 640px; height: 480px;">
|
||||
<!ENTITY name.description "Your name">
|
||||
<!ENTITY email.description "Email">
|
||||
<!ENTITY password.description "Password">
|
||||
|
||||
<!ENTITY next.label "Next »">
|
||||
<!ENTITY next.accesskey "N">
|
||||
<!ENTITY back.label "« Back">
|
||||
<!ENTITY back.accesskey "B">
|
||||
<!ENTITY autoconfigWizard.title "Mail Account Setup">
|
||||
<!ENTITY name.label "Your name:">
|
||||
<!ENTITY name.accesskey "n">
|
||||
<!ENTITY name.emptytext "First Last">
|
||||
<!ENTITY name.text "Your name, as shown to others">
|
||||
<!ENTITY email.label "Email address:">
|
||||
<!ENTITY email.accesskey "l">
|
||||
<!ENTITY email.emptytext "email@example.com">
|
||||
<!ENTITY password.label "Password:">
|
||||
<!ENTITY password.accesskey "P">
|
||||
<!ENTITY password.emptytext "Password">
|
||||
<!ENTITY password.text "Optional, will only be used to validate the username">
|
||||
|
||||
<!ENTITY accountInformation.label "Account Information">
|
||||
<!ENTITY username.label "username">
|
||||
<!ENTITY receivingServer.label "receiving">
|
||||
<!ENTITY sendingServer.label "sending">
|
||||
<!ENTITY username2.label "Username:">
|
||||
<!ENTITY incoming.label "Incoming:">
|
||||
<!ENTITY outgoing.label "Outgoing:">
|
||||
<!ENTITY noEncryption.label "None">
|
||||
<!ENTITY starttls.label "STARTTLS">
|
||||
<!ENTITY sslTls.label "SSL/TLS">
|
||||
|
@ -21,11 +23,14 @@
|
|||
<!ENTITY pop.label "POP">
|
||||
<!ENTITY smtp.label "SMTP">
|
||||
|
||||
<!-- LOCALIZATION NOTE (createAndEditSettings.label): This label is a link
|
||||
which will create the account and take the user to the account
|
||||
configuration screen. -->
|
||||
<!ENTITY createAndEditSettings.label "Create and Edit Account Settings">
|
||||
<!ENTITY manualSetup.label "Manual Setup…">
|
||||
<!ENTITY manualSetup.accesskey "S">
|
||||
<!ENTITY cancel.label "Cancel">
|
||||
<!ENTITY cancel.accesskey "a">
|
||||
<!ENTITY continue.label "Continue">
|
||||
<!ENTITY continue.accesskey "C">
|
||||
<!ENTITY startOver.label "Start over">
|
||||
<!ENTITY startOver.accesskey "o">
|
||||
<!ENTITY stop.label "Stop">
|
||||
<!ENTITY stop.accesskey "S">
|
||||
<!-- LOCALIZATION NOTE (retest.label): This is the text that is
|
||||
|
@ -65,6 +70,6 @@
|
|||
<!ENTITY insecureServer.tooltip.title "Warning! This is an insecure server.">
|
||||
<!ENTITY insecureServer.tooltip.details "Click circle for more details.">
|
||||
|
||||
<!ENTITY insecureClearText.description "Email is sent in clear-text, so your email could be read by attackers, etc. &brandShortName; will let you get to your mail, but you should really get your email provider to configure the server with a secure connection.">
|
||||
<!ENTITY insecureCleartext.description "Email is sent in clear-text, so your email could be read by other people on the internet. &brandShortName; will let you get to your mail, but you should really get your email provider to configure the server with a secure connection.">
|
||||
<!ENTITY insecureSelfSigned.description "The server uses a certificate that we can't trust, so we can't be sure that someone isn't intercepting the traffic between &brandShortName; and your server. &brandShortName; will let you get to your mail, but you should really get your email provider to configure the server with a trusted certificate.">
|
||||
<!ENTITY secureServer.description "Congratulations! This is a secure server.">
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# accountCreation.properties
|
||||
|
||||
# LOCALIZATION NOTE: %1$S will be the hostname of the server the user was trying to connect to.
|
||||
# LOCALIZATION NOTE(cleartext_warning): %1$S will be the hostname of the server the user was trying to connect to.
|
||||
cleartext_warning=%1$S does not use encryption.
|
||||
# LOCALIZATION NOTE(selfsigned_warning): %1$S will be the hostname of the server the user was trying to connect to.
|
||||
selfsigned_warning=%1$S does not use a trusted certificate.
|
||||
selfsigned_details=Normally, a secure mail server will present a trusted certificate to prove that it is really the server it claims to be. The connection to the mail server will be encrypted but cannot be validated as being the correct server.
|
||||
cleartext_details=Insecure mail servers do not use encrypted connections to protect your passwords and private information. By connecting to this server you could expose your password and private information.
|
||||
|
@ -10,10 +11,13 @@ cleartext_details=Insecure mail servers do not use encrypted connections to prot
|
|||
default_server_tag= (default)
|
||||
|
||||
# config titles
|
||||
searching_for_configs=Searching…
|
||||
# LOCALIZATION NOTE(looking_up_settings): %1$S will be the brandShortName.
|
||||
looking_up_settings=%1$S is looking up the settings for your email account.
|
||||
manually_edit_config=Editing Config
|
||||
finished_with_success=Finished
|
||||
finished_with_error=Error
|
||||
# LOCALIZATION NOTE(found_settings): %1$S will be the brandShortName.
|
||||
found_settings=%1$S has found the settings for your email account.
|
||||
# LOCALIZATION NOTE(failed_to_find_settings): %1$S will be the brandShortName.
|
||||
failed_to_find_settings=%1$S failed to find the settings for your email account.
|
||||
|
||||
# config subtitles
|
||||
check_preconfig=checking for pre-configuration…
|
||||
|
@ -45,6 +49,5 @@ no_encryption=No encryption
|
|||
ssl_tls=SSL/TLS
|
||||
starttls=STARTTLS
|
||||
|
||||
name.error=Please enter your name, as it should be shown to your correspondents.
|
||||
email.error=Double check this email address!
|
||||
password.error=Login did not succeed. Please double-check username and password.
|
||||
please_enter_name=Please enter your name.
|
||||
double_check_email=Double check this email address!
|
||||
|
|
|
@ -8,6 +8,15 @@
|
|||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
#back_button {
|
||||
border: none;
|
||||
-moz-appearance: none;
|
||||
color: -moz-nativehyperlinktext;
|
||||
text-decoration: underline;
|
||||
background-color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clickable_label:hover {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
|
@ -40,10 +49,15 @@
|
|||
}
|
||||
|
||||
.errordescription {
|
||||
padding: 2px 1ex;
|
||||
color: InfoText;
|
||||
background-color: InfoBackground;
|
||||
-moz-border-radius: 4px;
|
||||
margin-top: 3px;
|
||||
-moz-padding-start: 3px;
|
||||
}
|
||||
|
||||
.initialDesc {
|
||||
margin-top: 2px;
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
.edited_label {
|
||||
|
@ -109,7 +123,6 @@ description.explanation {
|
|||
}
|
||||
|
||||
#config_status_title {
|
||||
font-size: larger;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
@ -119,10 +132,6 @@ description.explanation {
|
|||
font-style: italic;
|
||||
}
|
||||
|
||||
vbox.statusimage {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
/* Missing:
|
||||
* label.bignumber
|
||||
* hbox.stepheading
|
||||
|
@ -176,18 +185,19 @@ image.insecureLarry {
|
|||
height: 64px;
|
||||
width: 64px;
|
||||
padding: 0;
|
||||
list-style-image: url("chrome://global/skin/icons/sslWarning.png");
|
||||
background: url("chrome://global/skin/icons/sslWarning.png") no-repeat;
|
||||
}
|
||||
|
||||
image.secureLarry {
|
||||
height: 64px;
|
||||
width: 64px;
|
||||
padding: 0;
|
||||
list-style-image: url("chrome://messenger/skin/icons/identity.png");
|
||||
background: url("chrome://messenger/skin/icons/identity.png") no-repeat;
|
||||
}
|
||||
|
||||
vbox.mastervbox {
|
||||
padding: 14px;
|
||||
background: #F4F4F4;
|
||||
}
|
||||
|
||||
vbox.icon[state='strong'] {
|
||||
|
@ -206,10 +216,11 @@ vbox.icon[state='weak'] {
|
|||
background-image: url("chrome://messenger/skin/icons/insecure.png");
|
||||
}
|
||||
|
||||
.warningbox {
|
||||
#warningbox {
|
||||
width: 800px;
|
||||
height: 485px;
|
||||
background: #333333 none repeat scroll 0% 0%;
|
||||
padding: 1em;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.warning {
|
||||
|
@ -268,7 +279,6 @@ vbox.settings {
|
|||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
padding: 0px 3px;
|
||||
}
|
||||
|
||||
|
@ -289,13 +299,26 @@ label.textbox-label {
|
|||
border-bottom: 1px dotted InactiveBorder;
|
||||
}
|
||||
|
||||
.protocol,
|
||||
textbox.security {
|
||||
.protocol {
|
||||
width: 8em;
|
||||
}
|
||||
|
||||
.protocol > label {
|
||||
-moz-padding-start: 6px;
|
||||
}
|
||||
|
||||
.security {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
textbox.port {
|
||||
width: 5em;
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
textbox.username {
|
||||
width: 12em;
|
||||
margin-bottom: 4px !important;
|
||||
margin-top: 4px !important;
|
||||
}
|
||||
|
||||
textbox.host {
|
||||
|
@ -355,3 +378,17 @@ row.heading {
|
|||
.technical_details[expanded] {
|
||||
background-image: url("chrome://messenger/skin/section_expanded.png");
|
||||
}
|
||||
|
||||
label.autoconfigLabel {
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
label.textbox-label {
|
||||
width: 58px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
vbox.initialSettings textbox {
|
||||
width: 280px;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,15 @@
|
|||
* .smaller-button
|
||||
*/
|
||||
|
||||
#back_button {
|
||||
border: none;
|
||||
-moz-appearance: none;
|
||||
color: -moz-nativehyperlinktext;
|
||||
text-decoration: underline;
|
||||
background-color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clickable_label:hover {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
|
@ -35,9 +44,13 @@
|
|||
}
|
||||
|
||||
.errordescription {
|
||||
-moz-padding-start: 4px;
|
||||
padding-top: 4px;
|
||||
color: rgb(244,50,50);
|
||||
-moz-padding-start: 3px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.initialDesc {
|
||||
margin-top: 2px;
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
.edited_label {
|
||||
|
@ -92,10 +105,6 @@ description.explanation {
|
|||
* #config_status_subtitle
|
||||
*/
|
||||
|
||||
vbox.statusimage {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
label.bignumber {
|
||||
font-size: larger;
|
||||
font-weight: bolder;
|
||||
|
@ -156,18 +165,19 @@ image.insecureLarry {
|
|||
height: 64px;
|
||||
width: 64px;
|
||||
padding: 0;
|
||||
list-style-image: url("chrome://global/skin/icons/sslWarning.png");
|
||||
background: url("chrome://global/skin/icons/sslWarning.png") no-repeat;
|
||||
}
|
||||
|
||||
image.secureLarry {
|
||||
height: 64px;
|
||||
width: 64px;
|
||||
padding: 0;
|
||||
list-style-image: url("chrome://messenger/skin/icons/identity.png");
|
||||
background: url("chrome://messenger/skin/icons/identity.png") no-repeat;
|
||||
}
|
||||
|
||||
vbox.mastervbox {
|
||||
padding: 14px;
|
||||
background: #F4F4F4;
|
||||
}
|
||||
|
||||
vbox.icon[state='strong'] {
|
||||
|
@ -186,7 +196,9 @@ vbox.icon[state='weak'] {
|
|||
background-image: url("chrome://messenger/skin/icons/insecure.png");
|
||||
}
|
||||
|
||||
.warningbox {
|
||||
#warningbox {
|
||||
width: 650px;
|
||||
height: 400px;
|
||||
background: #333333 none repeat scroll 0% 0%;
|
||||
padding: 1em;
|
||||
overflow: auto;
|
||||
|
@ -271,12 +283,22 @@ vbox.settings {
|
|||
width: 8em;
|
||||
}
|
||||
|
||||
textbox.security {
|
||||
width: 8em;
|
||||
.protocol > label {
|
||||
-moz-padding-start: 6px;
|
||||
}
|
||||
|
||||
.security {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
textbox.port {
|
||||
width: 5em;
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
textbox.username {
|
||||
width: 14em;
|
||||
margin-bottom: 4px !important;
|
||||
margin-top: 4px !important;
|
||||
}
|
||||
|
||||
textbox.host {
|
||||
|
@ -375,3 +397,17 @@ menulist[editable="true"].clickable > .menulist-dropmarker{
|
|||
.technical_details[expanded] {
|
||||
background-image: url("chrome://messenger/skin/section_expanded.png");
|
||||
}
|
||||
|
||||
label.autoconfigLabel {
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
label.textbox-label {
|
||||
width: 58px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
vbox.initialSettings textbox {
|
||||
width: 280px;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,15 @@
|
|||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
#back_button {
|
||||
border: none;
|
||||
-moz-appearance: none;
|
||||
color: -moz-nativehyperlinktext;
|
||||
text-decoration: underline;
|
||||
background-color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clickable_label:hover {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
|
@ -28,9 +37,13 @@
|
|||
*/
|
||||
|
||||
.errordescription {
|
||||
-moz-padding-start: 4px;
|
||||
padding-top: 4px;
|
||||
color: rgb(244,50,50);
|
||||
-moz-padding-start: 3px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.initialDesc {
|
||||
margin-top: 2px;
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
.edited_label {
|
||||
|
@ -68,9 +81,8 @@ menulist[disabled="true"] > .menulist-dropmarker {
|
|||
}
|
||||
|
||||
#outgoing_protocol {
|
||||
width: 73px;
|
||||
width: 63px;
|
||||
padding-top: 5px;
|
||||
-moz-padding-start: 6px;
|
||||
}
|
||||
|
||||
#outgoing_config {
|
||||
|
@ -102,7 +114,6 @@ description.explanation {
|
|||
}
|
||||
|
||||
#config_status_title {
|
||||
font-size: larger;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
@ -112,10 +123,6 @@ description.explanation {
|
|||
font-style: italic;
|
||||
}
|
||||
|
||||
vbox.statusimage {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
label.bignumber {
|
||||
font-size: larger;
|
||||
font-weight: bolder;
|
||||
|
@ -177,18 +184,19 @@ image.insecureLarry {
|
|||
height: 64px;
|
||||
width: 64px;
|
||||
padding: 0;
|
||||
list-style-image: url("chrome://global/skin/icons/sslWarning.png");
|
||||
background: url("chrome://global/skin/icons/sslWarning.png") no-repeat;
|
||||
}
|
||||
|
||||
image.secureLarry {
|
||||
height: 64px;
|
||||
width: 64px;
|
||||
padding: 0;
|
||||
list-style-image: url("chrome://messenger/skin/icons/identity.png");
|
||||
background: url("chrome://messenger/skin/icons/identity.png") no-repeat;
|
||||
}
|
||||
|
||||
vbox.mastervbox {
|
||||
padding: 14px;
|
||||
background: #F4F4F4;
|
||||
}
|
||||
|
||||
vbox.icon[state='strong'] {
|
||||
|
@ -207,7 +215,9 @@ vbox.icon[state='weak'] {
|
|||
background-image: url("chrome://messenger/skin/icons/insecure.png");
|
||||
}
|
||||
|
||||
.warningbox {
|
||||
#warningbox {
|
||||
width: 650px;
|
||||
height: 400px;
|
||||
background: #333333 none repeat scroll 0% 0%;
|
||||
padding: 1em;
|
||||
overflow: auto;
|
||||
|
@ -287,10 +297,39 @@ vbox.settings {
|
|||
/* Missing:
|
||||
* label.textbox-label
|
||||
* .protocol
|
||||
* textbox.security
|
||||
* textbox.port
|
||||
* textbox.host
|
||||
* menulist.host
|
||||
*/
|
||||
|
||||
.protocol > label {
|
||||
-moz-padding-start: 6px;
|
||||
}
|
||||
|
||||
.security {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
textbox.port {
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
textbox.username {
|
||||
width: 12em;
|
||||
margin-bottom: 4px !important;
|
||||
margin-top: 4px !important;
|
||||
}
|
||||
|
||||
textbox.host {
|
||||
width: 12em;
|
||||
margin-bottom: 4px !important;
|
||||
margin-top: 4px !important;
|
||||
}
|
||||
|
||||
menulist.host {
|
||||
width: 12em;
|
||||
margin-bottom: 4px !important;
|
||||
margin-top: 4px !important;
|
||||
}
|
||||
|
||||
/* Missing:
|
||||
* textbox[disabled="true"]
|
||||
* label.heading
|
||||
* row.heading
|
||||
|
@ -321,3 +360,17 @@ vbox.settings {
|
|||
.technical_details[expanded] {
|
||||
background-image: url("chrome://messenger/skin/section_expanded.png");
|
||||
}
|
||||
|
||||
label.autoconfigLabel {
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
label.textbox-label {
|
||||
width: 58px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
vbox.initialSettings textbox {
|
||||
width: 280px;
|
||||
}
|
||||
|
|
|
@ -145,6 +145,13 @@ EmailConfigWizard.prototype =
|
|||
var menulist = document.getElementById("outgoing_server");
|
||||
menulist.addEventListener("command",
|
||||
function(event) { gEmailConfigWizard.userChangedOutgoing(event); }, true);
|
||||
|
||||
// Store the size of the bottom half of the window in the fullspacer
|
||||
// element, so that we don't resize wildly when we show and hide it.
|
||||
window.sizeToContent();
|
||||
document.getElementById("settingsbox").hidden = true;
|
||||
document.getElementById("fullspacer").width = document.width;
|
||||
window.sizeToContent();
|
||||
},
|
||||
|
||||
/* When the next button is clicked we've moved from the initial account
|
||||
|
@ -170,6 +177,8 @@ EmailConfigWizard.prototype =
|
|||
_show("stop_button");
|
||||
_hide("edit_button");
|
||||
_hide("go_button");
|
||||
|
||||
window.sizeToContent();
|
||||
},
|
||||
|
||||
/* The back button can be clicked at anytime and should stop all probing of
|
||||
|
@ -181,6 +190,7 @@ EmailConfigWizard.prototype =
|
|||
*/
|
||||
onBack : function()
|
||||
{
|
||||
this._disableConfigDetails(true);
|
||||
this.hideConfigDetails();
|
||||
this.clearConfigDetails();
|
||||
|
||||
|
@ -190,18 +200,15 @@ EmailConfigWizard.prototype =
|
|||
// swap buttons back
|
||||
_show("next_button");
|
||||
_hide("back_button");
|
||||
document.getElementById("advanced_settings").disabled = true;
|
||||
_hide("advanced_settings");
|
||||
},
|
||||
|
||||
/* Helper method that enables or disabled all the account information inputs
|
||||
*
|
||||
* NOTE: The remember password input was skipped purposefully, people should
|
||||
* continue to be able to change that setting even as account details
|
||||
* are determined.
|
||||
*/
|
||||
_accountInfoInputs : function(disabled)
|
||||
{
|
||||
let ids = ["realname","email","password"];
|
||||
let ids = ["realname", "email", "password", "remember_password"];
|
||||
if (disabled && document.getElementById("password").getAttribute("empty")) {
|
||||
document.getElementById("password").value = " ";
|
||||
document.getElementById("password").setAttribute("empty", true);
|
||||
|
@ -264,10 +271,17 @@ EmailConfigWizard.prototype =
|
|||
*/
|
||||
validateRealname : function()
|
||||
{
|
||||
if (document.getElementById('realname').value.length > 0)
|
||||
this.clearError('nameerror');
|
||||
else
|
||||
this.setError("nameerror", "name.error");
|
||||
let realname = document.getElementById("realname");
|
||||
if (realname.value.length > 0) {
|
||||
this.clearError("nameerror");
|
||||
_show("nametext");
|
||||
realname.removeAttribute("error");
|
||||
}
|
||||
else {
|
||||
_hide("nametext");
|
||||
this.setError("nameerror", "please_enter_name");
|
||||
realname.setAttribute("error", "true");
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -288,20 +302,20 @@ EmailConfigWizard.prototype =
|
|||
*/
|
||||
onEmailInput : function()
|
||||
{
|
||||
if (document.getElementById('realname').value.length > 0 &&
|
||||
if (document.getElementById("realname").value.length > 0 &&
|
||||
this.emailAddrValidish())
|
||||
_show("next_button");
|
||||
document.getElementById("next_button").disabled = false;
|
||||
else
|
||||
_hide("next_button");
|
||||
document.getElementById("next_button").disabled = true;
|
||||
},
|
||||
|
||||
onRealnameInput : function()
|
||||
{
|
||||
if (document.getElementById('realname').value.length > 0 &&
|
||||
this.emailAddrValidish())
|
||||
_show("next_button");
|
||||
document.getElementById("next_button").disabled = false;
|
||||
else
|
||||
_hide("next_button");
|
||||
document.getElementById("next_button").disabled = true;
|
||||
},
|
||||
|
||||
/* This check is done on blur and is only done as an informative warning
|
||||
|
@ -310,13 +324,18 @@ EmailConfigWizard.prototype =
|
|||
*/
|
||||
validateEmail : function()
|
||||
{
|
||||
if (document.getElementById('email').value.length <= 0)
|
||||
let email = document.getElementById("email");
|
||||
if (email.value.length <= 0)
|
||||
return;
|
||||
|
||||
if (emailRE.test(document.getElementById('email').value))
|
||||
this.clearError('emailerror');
|
||||
else
|
||||
this.setError("emailerror", "email.error");
|
||||
if (emailRE.test(email.value)) {
|
||||
this.clearError("emailerror");
|
||||
email.removeAttribute("error");
|
||||
}
|
||||
else {
|
||||
this.setError("emailerror", "double_check_email");
|
||||
email.setAttribute("error", "true");
|
||||
}
|
||||
},
|
||||
|
||||
// We use this to prevent probing from forgetting the user's choice.
|
||||
|
@ -364,12 +383,14 @@ EmailConfigWizard.prototype =
|
|||
{
|
||||
let passwordElt = document.getElementById("password");
|
||||
let rememberPasswordElt = document.getElementById("remember_password");
|
||||
rememberPasswordElt.disabled = false;
|
||||
if (passwordElt.value.length < 1) {
|
||||
document.getElementById("remember_password").checked = false;
|
||||
rememberPasswordElt.disabled = true;
|
||||
rememberPasswordElt.checked = false;
|
||||
this._userChangedPassword = false;
|
||||
}
|
||||
else if (!this._userChangedPassword)
|
||||
document.getElementById("remember_password").checked = true;
|
||||
rememberPasswordElt.checked = true;
|
||||
},
|
||||
|
||||
/* If the user just tabbed through the password input without entering
|
||||
|
@ -379,15 +400,19 @@ EmailConfigWizard.prototype =
|
|||
onblurPassword : function()
|
||||
{
|
||||
let passwordElt = document.getElementById("password");
|
||||
if (passwordElt.value.length < 1)
|
||||
let rememberPasswordElt = document.getElementById("remember_password");
|
||||
if (passwordElt.value.length < 1) {
|
||||
rememberPasswordElt.disabled = true;
|
||||
passwordElt.type = "text";
|
||||
}
|
||||
else
|
||||
rememberPasswordElt.disabled = false;
|
||||
},
|
||||
|
||||
findConfig : function(domain, email)
|
||||
{
|
||||
gEmailWizardLogger.info("findConfig()");
|
||||
this.startSpinner("searching_for_configs");
|
||||
this.setSpinnerStatus("check_preconfig");
|
||||
this.startSpinner("all", "looking_up_settings");
|
||||
if (this._probeAbortable)
|
||||
{
|
||||
gEmailWizardLogger.info("aborting existing config search");
|
||||
|
@ -400,34 +425,29 @@ EmailConfigWizard.prototype =
|
|||
function(config) // success
|
||||
{
|
||||
me.foundConfig(config);
|
||||
me.stopSpinner("finished_with_success");
|
||||
me.setSpinnerStatus("found_preconfig");
|
||||
me.stopSpinner("found_settings");
|
||||
me._probeAbortable = null;
|
||||
},
|
||||
function(e) // fetchConfigFromDisk failed
|
||||
{
|
||||
gEmailWizardLogger.info("fetchConfigFromDisk failed: " + e);
|
||||
me.startSpinner("searching_for_configs");
|
||||
me.setSpinnerStatus("checking_mozilla_config");
|
||||
me.startSpinner("all", "looking_up_settings");
|
||||
me._probeAbortable =
|
||||
fetchConfigFromDB(
|
||||
domain,
|
||||
function(config) // success
|
||||
{
|
||||
me.foundConfig(config);
|
||||
me.stopSpinner("finished_with_success");
|
||||
me.setSpinnerStatus("found_isp_config");
|
||||
me.stopSpinner("found_settings");
|
||||
me.showEditButton();
|
||||
me._probeAbortable = null;
|
||||
},
|
||||
function(e) // fetchConfigFromDB failed
|
||||
{
|
||||
gEmailWizardLogger.info("fetchConfigFromDB failed: " + e);
|
||||
me.setSpinnerStatus("probing_config");
|
||||
var initialConfig = new AccountConfig();
|
||||
me._prefillConfig(initialConfig);
|
||||
me.startSpinner("searching_for_configs")
|
||||
me.setSpinnerStatus("guessing_from_email");
|
||||
me.startSpinner("all", "looking_up_settings")
|
||||
me._guessConfig(domain, initialConfig, 'both');
|
||||
});
|
||||
});
|
||||
|
@ -467,21 +487,24 @@ EmailConfigWizard.prototype =
|
|||
me._outgoingState);
|
||||
if (me._incomingState == 'done' && me._outgoingState == 'done')
|
||||
{
|
||||
me.stopSpinner("finished_with_success");
|
||||
me.setSpinnerStatus("config_details_found");
|
||||
me.stopSpinner("found_settings");
|
||||
_hide("stop_button");
|
||||
_show("edit_button");
|
||||
}
|
||||
else if (me._incomingState == 'done' && me._outgoingState != 'probing')
|
||||
{
|
||||
me.stopSpinner("finished_with_success");
|
||||
me.setSpinnerStatus("incoming_found_specify_outgoing");
|
||||
if (me._outgoingState == "failed")
|
||||
me.stopSpinner("failed_to_find_settings");
|
||||
else
|
||||
me.stopSpinner("found_settings");
|
||||
me.editConfigDetails();
|
||||
}
|
||||
else if (me._outgoingState == 'done' && me._incomingState != 'probing')
|
||||
{
|
||||
me.stopSpinner("finished_with_success");
|
||||
me.setSpinnerStatus("outgoing_found_specify_incoming");
|
||||
if (me._incomingState == "failed")
|
||||
me.stopSpinner("failed_to_find_settings");
|
||||
else
|
||||
me.stopSpinner("found_settings");
|
||||
me.editConfigDetails();
|
||||
}
|
||||
if (me._outgoingState != 'probing' &&
|
||||
|
@ -493,22 +516,23 @@ EmailConfigWizard.prototype =
|
|||
{
|
||||
gEmailWizardLogger.info("guessConfig failed: " + e);
|
||||
me.updateConfig(config);
|
||||
me.stopSpinner("finished_with_error");
|
||||
me.setSpinnerStatus("please_enter_missing_hostnames");
|
||||
me.stopSpinner("failed_to_find_settings");
|
||||
me._probeAbortable = null;
|
||||
me.editConfigDetails();
|
||||
},
|
||||
function(e, config) // guessconfig failed for incoming
|
||||
{
|
||||
gEmailWizardLogger.info("guessConfig failed for incoming: " + e);
|
||||
me.setSpinnerStatus("incoming_failed_trying_outgoing");
|
||||
me._setIconAndTooltip("incoming", "failed", "");
|
||||
me._incomingState = "failed";
|
||||
config.incoming.hostname = -1;
|
||||
me.updateConfig(config);
|
||||
},
|
||||
function(e, config) // guessconfig failed for outgoing
|
||||
{
|
||||
gEmailWizardLogger.info("guessConfig failed for outgoing: " + e);
|
||||
me.setSpinnerStatus("outgoing_failed_trying_incoming");
|
||||
me._setIconAndTooltip("outgoing", "failed", "");
|
||||
me._outgoingState = "failed";
|
||||
if (!me._userPickedOutgoingServer)
|
||||
config.outgoing.hostname = -1;
|
||||
|
||||
|
@ -538,6 +562,7 @@ EmailConfigWizard.prototype =
|
|||
{
|
||||
this._currentConfigFilledIn = config.copy();
|
||||
_show("advanced_settings");
|
||||
document.getElementById("advanced_settings").disabled = false;
|
||||
replaceVariables(this._currentConfigFilledIn, this._realname, this._email,
|
||||
this._password);
|
||||
|
||||
|
@ -545,7 +570,6 @@ EmailConfigWizard.prototype =
|
|||
|
||||
document.getElementById('create_button').disabled = false;
|
||||
document.getElementById('create_button').hidden = false;
|
||||
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -686,6 +710,7 @@ EmailConfigWizard.prototype =
|
|||
if (this._incomingWarning == '')
|
||||
_hide('acknowledge_warning');
|
||||
}
|
||||
window.sizeToContent();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -701,8 +726,13 @@ EmailConfigWizard.prototype =
|
|||
// If we're going backwards, we should reset the acknowledge_warning.
|
||||
document.getElementById('acknowledge_warning').checked = false;
|
||||
this.toggleAcknowledgeWarning();
|
||||
document.getElementById("incoming_technical").removeAttribute("expanded");;
|
||||
document.getElementById("incoming_details").setAttribute("collapsed", true);;
|
||||
document.getElementById("outgoing_technical").removeAttribute("expanded");;
|
||||
document.getElementById("outgoing_details").setAttribute("collapsed", true);;
|
||||
_hide('warningbox');
|
||||
_show('mastervbox');
|
||||
window.sizeToContent();
|
||||
},
|
||||
|
||||
validateAndFinish : function()
|
||||
|
@ -710,6 +740,7 @@ EmailConfigWizard.prototype =
|
|||
// if we're coming from the cert warning dialog
|
||||
_show('mastervbox');
|
||||
_hide('warningbox');
|
||||
window.sizeToContent();
|
||||
|
||||
if (!this.checkIncomingAccountIsNew())
|
||||
{
|
||||
|
@ -746,7 +777,7 @@ EmailConfigWizard.prototype =
|
|||
verifyConfig : function(successCallback, errorCallback)
|
||||
{
|
||||
var me = this;
|
||||
this.startSpinner("checking_password");
|
||||
this.startSpinner("username", "checking_password");
|
||||
// logic function defined in verifyConfig.js
|
||||
verifyConfig(
|
||||
this._currentConfigFilledIn,
|
||||
|
@ -878,7 +909,7 @@ EmailConfigWizard.prototype =
|
|||
if (state == 'weak')
|
||||
this._incomingState = 'done';
|
||||
|
||||
this._setIconAndTooltip('incoming_status', state, details);
|
||||
this._setIconAndTooltip('incoming', state, details);
|
||||
},
|
||||
|
||||
_setOutgoingStatus: function(state, details)
|
||||
|
@ -907,26 +938,36 @@ EmailConfigWizard.prototype =
|
|||
if (state == 'weak')
|
||||
this._outgoingState = 'done';
|
||||
|
||||
this._setIconAndTooltip('outgoing_status', state, details);
|
||||
this._setIconAndTooltip('outgoing', state, details);
|
||||
},
|
||||
|
||||
_setIconAndTooltip : function(id, state, details)
|
||||
{
|
||||
let icon = document.getElementById(id);
|
||||
gEmailWizardLogger.warn(id + " setting icon and tooltip " +
|
||||
state + ":" + details);
|
||||
let icon = document.getElementById(id + "_status");
|
||||
icon.setAttribute("state", state);
|
||||
switch (state)
|
||||
{
|
||||
case "weak":
|
||||
icon.setAttribute("tooltip", "insecureserver-" + details);
|
||||
icon.setAttribute("popup", "insecureserver-" + details + "-panel");
|
||||
this._updateSpinner(id, true);
|
||||
break;
|
||||
case "hidden":
|
||||
icon.removeAttribute("tooltip");
|
||||
icon.removeAttribute("popup");
|
||||
this._updateSpinner(id, false);
|
||||
break;
|
||||
case "strong":
|
||||
icon.setAttribute("tooltip", "secureservertooltip");
|
||||
icon.setAttribute("popup", "secureserver-panel");
|
||||
this._updateSpinner(id, true);
|
||||
break;
|
||||
case "failed":
|
||||
icon.removeAttribute("tooltip");
|
||||
icon.removeAttribute("popup");
|
||||
this._updateSpinner(id, true);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -942,7 +983,9 @@ EmailConfigWizard.prototype =
|
|||
hideConfigDetails : function()
|
||||
{
|
||||
_hide("settingsbox");
|
||||
document.getElementById("create_button").disabled = true;
|
||||
_hide("create_button");
|
||||
window.sizeToContent();
|
||||
},
|
||||
|
||||
/* Clears out the config details information, this is really only meant to be
|
||||
|
@ -967,6 +1010,7 @@ EmailConfigWizard.prototype =
|
|||
*/
|
||||
editConfigDetails : function()
|
||||
{
|
||||
gEmailWizardLogger.info("onEdit");
|
||||
// Add the custom entry to the menulist, if it's not already there.
|
||||
let menulist = document.getElementById("outgoing_server");
|
||||
if (this._smtpServerCount == menulist.itemCount) {
|
||||
|
@ -976,10 +1020,10 @@ EmailConfigWizard.prototype =
|
|||
}
|
||||
|
||||
this._disableConfigDetails(false);
|
||||
this._setIncomingStatus('hidden');
|
||||
this._setOutgoingStatus('hidden');
|
||||
document.getElementById('create_button').disabled = true;
|
||||
_hide("create_button");
|
||||
this._setIncomingStatus("failed");
|
||||
this._setOutgoingStatus("failed");
|
||||
document.getElementById("advanced_settings").disabled = false;
|
||||
document.getElementById("create_button").disabled = true;
|
||||
_hide("stop_button");
|
||||
_hide("edit_button");
|
||||
_show("go_button");
|
||||
|
@ -997,13 +1041,13 @@ EmailConfigWizard.prototype =
|
|||
},
|
||||
|
||||
// IDs of <textbox> inputs that can have a .value attr set
|
||||
_configDetailTextInputs : ["username", "incoming_server",
|
||||
_configDetailTextInputs : ["password", "username", "incoming_server",
|
||||
"incoming_port", "incoming_protocol",
|
||||
"outgoing_port"],
|
||||
|
||||
// IDs of the <menulist> elements that don't accept a .value attr but can
|
||||
// be disabled
|
||||
_configDetailMenulists : ["incoming_security",
|
||||
_configDetailMenulists : ["remember_password", "incoming_security",
|
||||
"outgoing_server", "outgoing_security"],
|
||||
|
||||
/* Helper function to loop through all config details form elements and
|
||||
|
@ -1033,6 +1077,7 @@ EmailConfigWizard.prototype =
|
|||
if (config.incoming.username)
|
||||
{
|
||||
document.getElementById("username").value = config.incoming.username;
|
||||
this._setIconAndTooltip("username", "strong", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1060,6 +1105,8 @@ EmailConfigWizard.prototype =
|
|||
}
|
||||
else
|
||||
{
|
||||
// We got an incoming server, so we can enable the advanced settings.
|
||||
document.getElementById("advanced_settings").disabled = false;
|
||||
switch (config.incoming.socketType)
|
||||
{
|
||||
case 2: // SSL / TLS
|
||||
|
@ -1178,6 +1225,7 @@ EmailConfigWizard.prototype =
|
|||
// the stop is naturally not hidden so has no place in the code where it is
|
||||
// told to be shown
|
||||
_show("stop_button");
|
||||
this._password = document.getElementById("password").value;
|
||||
this.goWithConfigDetails();
|
||||
var newConfig = this.getUserConfig();
|
||||
if (this._incomingState != "done") {
|
||||
|
@ -1198,39 +1246,46 @@ EmailConfigWizard.prototype =
|
|||
|
||||
// UI helper functions
|
||||
|
||||
startSpinner: function(actionStrName)
|
||||
startSpinner: function(which, actionStrName)
|
||||
{
|
||||
this._showStatusTitle(false, actionStrName);
|
||||
gEmailWizardLogger.warn("spinner start\n");
|
||||
},
|
||||
|
||||
setSpinnerStatus : function(actionStrName)
|
||||
{
|
||||
this._showStatus(actionStrName);
|
||||
if (which == "all") {
|
||||
this._setIconAndTooltip("username", "hidden", "");
|
||||
this._setIconAndTooltip("incoming", "hidden", "");
|
||||
this._setIconAndTooltip("outgoing", "hidden", "");
|
||||
}
|
||||
else
|
||||
this._setIconAndTooltip(which, "hidden", "");
|
||||
gEmailWizardLogger.warn(which + "spinner start " + actionStrName);
|
||||
},
|
||||
|
||||
stopSpinner: function(actionStrName)
|
||||
{
|
||||
this._showStatusTitle(true, actionStrName);
|
||||
gEmailWizardLogger.warn("spinner stop\n");
|
||||
this._updateSpinner("username", true);
|
||||
this._updateSpinner("incoming", true);
|
||||
this._updateSpinner("outgoing", true);
|
||||
gEmailWizardLogger.warn("all spinner stop " + actionStrName);
|
||||
},
|
||||
|
||||
// thought this would be needed other places, not likely though
|
||||
_hideSpinner : function(hidden)
|
||||
_updateSpinner: function(which, stop)
|
||||
{
|
||||
document.getElementById("config_spinner").hidden = hidden;
|
||||
document.getElementById(which + "_spinner").hidden = stop;
|
||||
},
|
||||
|
||||
_showStatusTitle: function(success, msgName)
|
||||
{
|
||||
let brandShortName = document.getElementById("bundle_brand")
|
||||
.getString("brandShortName");
|
||||
let msg;
|
||||
try {
|
||||
msg = msgName ? gStringsBundle.getString(msgName) : "";
|
||||
msg = msgName
|
||||
? gStringsBundle.getFormattedString(msgName, [brandShortName])
|
||||
: "";
|
||||
} catch(ex) {
|
||||
gEmailWizardLogger.error("missing string for " + msgName);
|
||||
}
|
||||
|
||||
this._hideSpinner(success);
|
||||
let title = document.getElementById("config_status_title");
|
||||
title.hidden = false;
|
||||
title.textContent = msg;
|
||||
|
@ -1238,26 +1293,11 @@ EmailConfigWizard.prototype =
|
|||
", msg: " + msg);
|
||||
},
|
||||
|
||||
_showStatus: function(msgName)
|
||||
{
|
||||
let msg;
|
||||
try {
|
||||
msg = msgName ? gStringsBundle.getString(msgName) : "";
|
||||
} catch(ex) {
|
||||
gEmailWizardLogger.error("missing string for " + msgName);
|
||||
}
|
||||
|
||||
let subtitle = document.getElementById("config_status_subtitle");
|
||||
subtitle.hidden = false;
|
||||
subtitle.textContent = msg;
|
||||
gEmailWizardLogger.info("show status subtitle: " + msg);
|
||||
},
|
||||
|
||||
_prefillConfig: function(initialConfig)
|
||||
{
|
||||
var emailsplit = this._email.split("@");
|
||||
if (emailsplit.length != 2)
|
||||
throw new Exception(gStringsBundle.getString("email.error"));
|
||||
throw new Exception(gStringsBundle.getString("double_check_email"));
|
||||
|
||||
var emaillocal = sanitize.nonemptystring(emailsplit[0]);
|
||||
initialConfig.incoming.username = emaillocal;
|
||||
|
@ -1270,9 +1310,7 @@ EmailConfigWizard.prototype =
|
|||
{
|
||||
gEmailWizardLogger.info("_startProbingIncoming: " + config.incoming.hostname +
|
||||
" probe = " + this._probeAbortable);
|
||||
this.startSpinner("searching_for_configs");
|
||||
this.setSpinnerStatus(this._outgoingState == "probing" ?
|
||||
"check_server_details" : "check_in_server_details");
|
||||
this.startSpinner("incoming", "looking_up_settings");
|
||||
|
||||
config.incoming._inprogress = true;
|
||||
// User entered hostname, we may want to probe port and protocol and socketType
|
||||
|
@ -1306,9 +1344,7 @@ EmailConfigWizard.prototype =
|
|||
{
|
||||
gEmailWizardLogger.info("_startProbingOutgoing: " + config.outgoing.hostname +
|
||||
" probe = " + this._probeAbortable);
|
||||
this.startSpinner("searching_for_configs");
|
||||
this.setSpinnerStatus(this._incomingState == "probing" ?
|
||||
"check_server_details" : "check_out_server_details");
|
||||
this.startSpinner("outgoing", "looking_up_settings");
|
||||
|
||||
config.outgoing._inprogress = true;
|
||||
// User entered hostname, we want to probe port and protocol and socketType
|
||||
|
@ -1331,12 +1367,14 @@ EmailConfigWizard.prototype =
|
|||
|
||||
clearError: function(which) {
|
||||
_hide(which);
|
||||
_hide(which+"icon");
|
||||
document.getElementById(which).textContent = "";
|
||||
},
|
||||
|
||||
setError: function(which, msg_name) {
|
||||
try {
|
||||
_show(which);
|
||||
_show(which+"icon");
|
||||
document.getElementById(which).textContent =
|
||||
gStringsBundle.getString(msg_name);
|
||||
}
|
||||
|
|
|
@ -48,8 +48,7 @@
|
|||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="autoconfigWizard"
|
||||
windowtype="mail:autoconfig"
|
||||
title="&welcome.description;"
|
||||
style="&autoconfigWizard.style;"
|
||||
title="&autoconfigWizard.title;"
|
||||
onload="gEmailConfigWizard.onLoad();"
|
||||
onkeypress="gEmailConfigWizard.onKeyDown(event)"
|
||||
onclose="gEmailConfigWizard.onWizardShutdown();"
|
||||
|
@ -93,7 +92,7 @@
|
|||
<image class="insecureLarry"/>
|
||||
<vbox flex="1">
|
||||
<description class="title">&insecureServer.tooltip.title;</description>
|
||||
<description class="details">&insecureClearText.description;</description>
|
||||
<description class="details">&insecureCleartext.description;</description>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</panel>
|
||||
|
@ -109,7 +108,9 @@
|
|||
<panel id="secureserver-panel" class="popup-panel">
|
||||
<hbox>
|
||||
<image class="secureLarry"/>
|
||||
<description class="title">&secureServer.description;</description>
|
||||
<vbox flex="1">
|
||||
<description class="title">&secureServer.description;</description>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</panel>
|
||||
|
||||
|
@ -137,296 +138,322 @@
|
|||
<description class="title">&secureServer.description;</description>
|
||||
</hbox>
|
||||
</tooltip>
|
||||
<tooltip id="optional-password">
|
||||
<description>&password.text;</description>
|
||||
</tooltip>
|
||||
|
||||
|
||||
<vbox class="mastervbox"
|
||||
id="mastervbox"
|
||||
flex="1">
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="heading">
|
||||
<hbox align="center">
|
||||
<label class="heading">&accountInformation.label;</label>
|
||||
</hbox>
|
||||
<hbox><spacer/></hbox>
|
||||
</row>
|
||||
<row>
|
||||
<grid>
|
||||
<rows>
|
||||
<row align="center">
|
||||
<description id="nameerror" class="errordescription"
|
||||
hidden="true"/>
|
||||
</row>
|
||||
<row align="center">
|
||||
<textbox id="realname"
|
||||
class="padded"
|
||||
value="" emptytext="&name.description;"
|
||||
oninput="gEmailConfigWizard.onRealnameInput()"
|
||||
onblur="gEmailConfigWizard.validateRealname();"/>
|
||||
</row>
|
||||
<spacer/>
|
||||
<row align="center">
|
||||
<description id="emailerror" class="errordescription"
|
||||
hidden="true"/>
|
||||
</row>
|
||||
<row align="center">
|
||||
<textbox id="email"
|
||||
class="padded uri-element"
|
||||
emptytext="&email.description;"
|
||||
oninput="gEmailConfigWizard.onEmailInput()"
|
||||
onblur="gEmailConfigWizard.validateEmail();"/>
|
||||
</row>
|
||||
<spacer/>
|
||||
<row align="center">
|
||||
<description id="passworderror" class="errordescription"
|
||||
hidden="true"/>
|
||||
</row>
|
||||
<row align="center">
|
||||
<!-- this starts out as text so the emptytext shows, but then
|
||||
changes to type=password once it's not empty -->
|
||||
<textbox id="password"
|
||||
class="padded"
|
||||
emptytext="&password.description;"
|
||||
type="text"
|
||||
oninput="gEmailConfigWizard.oninputPassword();"
|
||||
onfocus="this.type='password';"
|
||||
onblur="gEmailConfigWizard.onblurPassword();"/>
|
||||
</row>
|
||||
<row align="center">
|
||||
<checkbox id="remember_password"
|
||||
accesskey="&rememberPassword.accesskey;"
|
||||
onclick="gEmailConfigWizard._userChangedPassword=true;"
|
||||
label="&rememberPassword.label;" checked="false"/>
|
||||
</row>
|
||||
<row>
|
||||
<hbox pack="end">
|
||||
<button id="next_button"
|
||||
hidden="true"
|
||||
oncommand="gEmailConfigWizard.onNext();"
|
||||
accesskey="&next.accesskey;"
|
||||
label="&next.label;" class="larger-button"/>
|
||||
<button id="back_button" class="smaller-button"
|
||||
oncommand="gEmailConfigWizard.onBack();"
|
||||
accesskey="&back.accesskey;"
|
||||
label="&back.label;" hidden="true"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<vbox>
|
||||
<groupbox id="settingsbox" class="settings" hidden="true">
|
||||
<vbox>
|
||||
<vbox id="configarea">
|
||||
<hbox>
|
||||
<hbox flex="1">
|
||||
<description id="config_status_title" flex="1"/>
|
||||
</hbox>
|
||||
<hbox pack="end">
|
||||
<button id="stop_button"
|
||||
oncommand="gEmailConfigWizard.onStop();"
|
||||
accesskey="&stop.accesskey;"
|
||||
label="&stop.label;" class="smaller-button"/>
|
||||
<button id="edit_button"
|
||||
oncommand="gEmailConfigWizard.onEdit();"
|
||||
accesskey="&edit.accesskey;"
|
||||
label="&edit.label;" class="smaller-button"
|
||||
hidden="true"/>
|
||||
<button id="go_button"
|
||||
oncommand="gEmailConfigWizard.onGo();"
|
||||
accesskey="&retest.accesskey;"
|
||||
label="&retest.label;" class="smaller-button"
|
||||
hidden="true"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<hbox flex="1">
|
||||
<description id="config_status_subtitle" flex="1"/>
|
||||
</hbox>
|
||||
<hbox pack="end">
|
||||
<vbox class="statusimage" width="16">
|
||||
<image id="config_spinner"
|
||||
src="chrome://global/skin/icons/loading_16.png"
|
||||
hidden="true"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox id="usernamearea">
|
||||
<label class="textbox-label" value="&username.label;"
|
||||
control="username"/>
|
||||
<hbox>
|
||||
<vbox class="statusimage" width="22"/>
|
||||
<textbox id="username"
|
||||
value=""
|
||||
disabled="true"
|
||||
class="username"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox id="incomingarea">
|
||||
<label class="textbox-label" value="&receivingServer.label;"
|
||||
control="incoming_server"/>
|
||||
<hbox>
|
||||
<vbox id="incoming_status" class="icon" width="22"/>
|
||||
<hbox>
|
||||
<textbox id="incoming_server"
|
||||
value=""
|
||||
disabled="true"
|
||||
oninput="gEmailConfigWizard.setIncomingServer()"
|
||||
class="host uri-element"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<spacer height="30" width="22"/>
|
||||
<hbox>
|
||||
<menulist id="incoming_protocol"
|
||||
value=""
|
||||
disabled="true"
|
||||
sizetopopup="none"
|
||||
class="protocol">
|
||||
<menupopup onpopuphidden="gEmailConfigWizard.setIncomingProtocol()">
|
||||
<menuitem label="&imap.label;" value="1"/>
|
||||
<menuitem label="&pop.label;" value="2"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<textbox id="incoming_port"
|
||||
value=""
|
||||
disabled="true"
|
||||
oninput="gEmailConfigWizard.setPort('incoming_port')"
|
||||
class="port"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="incoming_security"
|
||||
value=""
|
||||
disabled="true"
|
||||
sizetopopup="none"
|
||||
class="security">
|
||||
<menupopup onpopuphidden="gEmailConfigWizard.setSecurity('incoming_security')">
|
||||
<menuitem label="&noEncryption.label;" value="1"/>
|
||||
<menuitem label="&starttls.label;" value="3"/>
|
||||
<menuitem label="&sslTls.label;" value="2"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox id="outgoingarea">
|
||||
<label class="textbox-label" value="&sendingServer.label;"
|
||||
control="outgoing_server"/>
|
||||
<hbox>
|
||||
<vbox id="outgoing_status" class="icon" width="22"/>
|
||||
<hbox>
|
||||
<menulist id="outgoing_server"
|
||||
class="host uri-element"
|
||||
disabled="true"
|
||||
sizetopopup="none"
|
||||
editable="true" >
|
||||
<!-- oncommand, and onchange and onmousedown of menulist's inputfield, set in ctor -->
|
||||
<menupopup id="smtp_menupopup"/>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<spacer height="30" width="22"/>
|
||||
<hbox align="center">
|
||||
<label id="outgoing_protocol"
|
||||
class="protocol" value="&smtp.label;"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<textbox id="outgoing_port"
|
||||
value=""
|
||||
disabled="true"
|
||||
oninput="gEmailConfigWizard.setPort('outgoing_port')"
|
||||
class="port"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="outgoing_security"
|
||||
value=""
|
||||
disabled="true"
|
||||
sizetopopup="none"
|
||||
class="security">
|
||||
<menupopup onpopuphidden="gEmailConfigWizard.setSecurity('outgoing_security')">
|
||||
<menuitem label="&noEncryption.label;" value="1"/>
|
||||
<menuitem label="&starttls.label;" value="3"/>
|
||||
<menuitem label="&sslTls.label;" value="2"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
<vbox id="mastervbox" class="mastervbox" flex="1">
|
||||
<groupbox class="initialSettings">
|
||||
<hbox align="center">
|
||||
<label accesskey="&name.accesskey;"
|
||||
class="autoconfigLabel"
|
||||
value="&name.label;"
|
||||
control="realname"/>
|
||||
<textbox id="realname"
|
||||
class="padded"
|
||||
value=""
|
||||
emptytext="&name.emptytext;"
|
||||
oninput="gEmailConfigWizard.onRealnameInput()"
|
||||
onblur="gEmailConfigWizard.validateRealname();"/>
|
||||
<description id="nametext" class="initialDesc">&name.text;</description>
|
||||
<image id="nameerroricon"
|
||||
hidden="true"
|
||||
src="chrome://global/skin/icons/warning-16.png"/>
|
||||
<description id="nameerror" class="errordescription" hidden="true"/>
|
||||
</hbox>
|
||||
<hbox align="center">
|
||||
<label accesskey="&email.accesskey;"
|
||||
class="autoconfigLabel"
|
||||
value="&email.label;"
|
||||
control="email"/>
|
||||
<textbox id="email"
|
||||
class="padded uri-element"
|
||||
emptytext="&email.emptytext;"
|
||||
oninput="gEmailConfigWizard.onEmailInput()"
|
||||
onblur="gEmailConfigWizard.validateEmail();"/>
|
||||
<image id="emailerroricon"
|
||||
hidden="true"
|
||||
src="chrome://global/skin/icons/warning-16.png"/>
|
||||
<description id="emailerror" class="errordescription" hidden="true"/>
|
||||
</hbox>
|
||||
<hbox align="center">
|
||||
<!-- this starts out as text so the emptytext shows, but then
|
||||
changes to type=password once it's not empty -->
|
||||
<label accesskey="&password.accesskey;"
|
||||
class="autoconfigLabel"
|
||||
value="&password.label;"
|
||||
control="password"
|
||||
tooltip="optional-password"/>
|
||||
<textbox id="password"
|
||||
class="padded"
|
||||
emptytext="&password.emptytext;"
|
||||
type="text"
|
||||
oninput="gEmailConfigWizard.oninputPassword();"
|
||||
onfocus="this.type='password';"
|
||||
onblur="gEmailConfigWizard.onblurPassword();"/>
|
||||
<image id="passworderroricon"
|
||||
hidden="true"
|
||||
src="chrome://global/skin/icons/warning-16.png"/>
|
||||
<description id="passworderror" class="errordescription" hidden="true"/>
|
||||
</hbox>
|
||||
<hbox align="center">
|
||||
<label class="autoconfigLabel"/>
|
||||
<checkbox id="remember_password"
|
||||
label="&rememberPassword.label;"
|
||||
accesskey="&rememberPassword.accesskey;"
|
||||
disabled="true"
|
||||
checked="false"
|
||||
onclick="gEmailConfigWizard._userChangedPassword=true;"/>
|
||||
<spacer flex="1"/>
|
||||
<hbox>
|
||||
<button id="back_button"
|
||||
label="&startOver.label;"
|
||||
accesskey="&startOver.accesskey;"
|
||||
class="larger-button"
|
||||
hidden="true"
|
||||
oncommand="gEmailConfigWizard.onBack();"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<hbox id="fullspacer"/>
|
||||
</groupbox>
|
||||
<vbox>
|
||||
<groupbox id="settingsbox" class="settings">
|
||||
<vbox>
|
||||
<vbox id="configarea">
|
||||
<hbox>
|
||||
<hbox flex="1">
|
||||
<description id="config_status_title" flex="1" class="title"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox id="usernamearea" align="center">
|
||||
<vbox id="username_status"
|
||||
class="icon"
|
||||
align="center"
|
||||
pack="center">
|
||||
<image id="username_spinner"
|
||||
src="chrome://global/skin/icons/loading_16.png"
|
||||
hidden="true"/>
|
||||
</vbox>
|
||||
<label class="textbox-label"
|
||||
value="&username2.label;"
|
||||
control="username"/>
|
||||
<textbox id="username"
|
||||
value=""
|
||||
disabled="true"
|
||||
class="username"/>
|
||||
<hbox flex="1" pack="end">
|
||||
<button id="stop_button"
|
||||
label="&stop.label;"
|
||||
accesskey="&stop.accesskey;"
|
||||
class="smaller-button"
|
||||
oncommand="gEmailConfigWizard.onStop();"/>
|
||||
<button id="edit_button"
|
||||
label="&edit.label;"
|
||||
accesskey="&edit.accesskey;"
|
||||
class="smaller-button"
|
||||
hidden="true"
|
||||
oncommand="gEmailConfigWizard.onEdit();"/>
|
||||
<button id="go_button"
|
||||
label="&retest.label;"
|
||||
accesskey="&retest.accesskey;"
|
||||
class="smaller-button"
|
||||
hidden="true"
|
||||
oncommand="gEmailConfigWizard.onGo();"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<hbox id="incomingarea" align="center">
|
||||
<vbox id="incoming_status"
|
||||
class="icon"
|
||||
align="center"
|
||||
pack="center">
|
||||
<image id="incoming_spinner"
|
||||
src="chrome://global/skin/icons/loading_16.png"
|
||||
hidden="true"/>
|
||||
</vbox>
|
||||
<label class="textbox-label"
|
||||
value="&incoming.label;"
|
||||
control="incoming_server"/>
|
||||
<hbox>
|
||||
<textbox id="incoming_server"
|
||||
class="host uri-element"
|
||||
value=""
|
||||
disabled="true"
|
||||
oninput="gEmailConfigWizard.setIncomingServer()"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<spacer height="30" width="12"/>
|
||||
<hbox class="protocol">
|
||||
<menulist id="incoming_protocol"
|
||||
value=""
|
||||
disabled="true"
|
||||
sizetopopup="always">
|
||||
<menupopup onpopuphidden="gEmailConfigWizard.setIncomingProtocol()">
|
||||
<menuitem label="&imap.label;" value="1"/>
|
||||
<menuitem label="&pop.label;" value="2"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<textbox id="incoming_port"
|
||||
class="port"
|
||||
value=""
|
||||
disabled="true"
|
||||
oninput="gEmailConfigWizard.setPort('incoming_port')"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="incoming_security"
|
||||
class="security"
|
||||
value=""
|
||||
disabled="true"
|
||||
sizetopopup="always">
|
||||
<menupopup onpopuphidden="gEmailConfigWizard.setSecurity('incoming_security')">
|
||||
<menuitem label="&noEncryption.label;" value="1"/>
|
||||
<menuitem label="&starttls.label;" value="3"/>
|
||||
<menuitem label="&sslTls.label;" value="2"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</hbox>
|
||||
<hbox id="outgoingarea" align="center">
|
||||
<vbox id="outgoing_status"
|
||||
class="icon"
|
||||
align="center"
|
||||
pack="center">
|
||||
<image id="outgoing_spinner"
|
||||
src="chrome://global/skin/icons/loading_16.png"
|
||||
hidden="true"/>
|
||||
</vbox>
|
||||
<label class="textbox-label"
|
||||
value="&outgoing.label;"
|
||||
control="outgoing_server"/>
|
||||
<hbox>
|
||||
<!-- oncommand, and onchange and onmousedown of menulist's
|
||||
inputfield, set in constructor -->
|
||||
<menulist id="outgoing_server"
|
||||
class="host uri-element"
|
||||
disabled="true"
|
||||
sizetopopup="none"
|
||||
editable="true" >
|
||||
<menupopup id="smtp_menupopup"/>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<spacer height="30" width="12"/>
|
||||
<hbox class="protocol" align="center">
|
||||
<label id="outgoing_protocol"
|
||||
value="&smtp.label;"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<textbox id="outgoing_port"
|
||||
class="port"
|
||||
value=""
|
||||
disabled="true"
|
||||
oninput="gEmailConfigWizard.setPort('outgoing_port')"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="outgoing_security"
|
||||
class="security"
|
||||
value=""
|
||||
disabled="true"
|
||||
sizetopopup="always">
|
||||
<menupopup onpopuphidden="gEmailConfigWizard.setSecurity('outgoing_security')">
|
||||
<menuitem label="&noEncryption.label;" value="1"/>
|
||||
<menuitem label="&starttls.label;" value="3"/>
|
||||
<menuitem label="&sslTls.label;" value="2"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
</vbox>
|
||||
<spacer flex="1"/>
|
||||
<hbox>
|
||||
<hbox align="center">
|
||||
<button id="cancel_button" label="&cancel.label;"
|
||||
onmousedown="gEmailConfigWizard.onCancel();"/>
|
||||
<label id="advanced_settings" value="&createAndEditSettings.label;"
|
||||
onmousedown="gEmailConfigWizard.advancedSettings()"
|
||||
hidden="true" class="clickable_label"/>
|
||||
</hbox>
|
||||
<button id="advanced_settings"
|
||||
label="&manualSetup.label;"
|
||||
accesskey="&manualSetup.accesskey;"
|
||||
class="larger-button"
|
||||
disabled="true"
|
||||
hidden="true"
|
||||
oncommand="gEmailConfigWizard.advancedSettings();"/>
|
||||
<spacer flex="1"/>
|
||||
<hbox align="center">
|
||||
<button id="create_button" label="&createAccount.label;"
|
||||
accesskey="&createAccount.accesskey;"
|
||||
onmousedown="gEmailConfigWizard.onOK();"
|
||||
hidden="true" class="larger-button"/>
|
||||
<button id="cancel_button"
|
||||
label="&cancel.label;"
|
||||
accesskey="&cancel.accesskey;"
|
||||
oncommand="gEmailConfigWizard.onCancel();"/>
|
||||
</hbox>
|
||||
<button id="create_button"
|
||||
label="&createAccount.label;"
|
||||
accesskey="&createAccount.accesskey;"
|
||||
class="larger-button"
|
||||
hidden="true"
|
||||
disabled="true"
|
||||
oncommand="gEmailConfigWizard.onOK();"/>
|
||||
<hbox pack="end">
|
||||
<button id="next_button"
|
||||
label="&continue.label;"
|
||||
accesskey="&continue.accesskey;"
|
||||
class="larger-button"
|
||||
hidden="false"
|
||||
disabled="true"
|
||||
oncommand="gEmailConfigWizard.onNext();"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
|
||||
<vbox id="warningbox" class="warningbox" hidden="true" flex="1">
|
||||
<vbox id="warningbox" hidden="true" flex="1">
|
||||
<hbox class="warning" flex="1">
|
||||
<vbox class="larrybox">
|
||||
<image id="insecure_larry" class="insecureLarry"/>
|
||||
</vbox>
|
||||
<vbox flex="1" class="warning_text">
|
||||
<label class="warning-heading">&warning.label;</label>
|
||||
<vbox id="incoming_box">
|
||||
<hbox>
|
||||
<label class="warning_settings" value="&incomingSettings.label;"/>
|
||||
<description id="warning_incoming"/>
|
||||
</hbox>
|
||||
<label id="incoming_technical" value="&technicaldetails.label;"
|
||||
class="technical_details"
|
||||
onclick="gEmailConfigWizard.toggleDetails('incoming');"/>
|
||||
<description id="incoming_details" collapsed="true"/>
|
||||
</vbox>
|
||||
<vbox id="outgoing_box">
|
||||
<hbox>
|
||||
<label class="warning_settings" value="&outgoingSettings.label;"/>
|
||||
<description id="warning_outgoing"/>
|
||||
</hbox>
|
||||
<label id="outgoing_technical" value="&technicaldetails.label;"
|
||||
class="technical_details"
|
||||
onclick="gEmailConfigWizard.toggleDetails('outgoing');"/>
|
||||
<description id="outgoing_details" collapsed="true"/>
|
||||
</vbox>
|
||||
<spacer flex="10"/>
|
||||
<description id="findoutmore">&contactYourProvider.description;</description>
|
||||
<checkbox id="acknowledge_warning"
|
||||
class="acknowledge_checkbox"
|
||||
label="&confirmWarning.label;"
|
||||
accesskey="&confirmWarning.accesskey;"
|
||||
oncommand="gEmailConfigWizard.toggleAcknowledgeWarning()"/>
|
||||
<label class="warning-heading">&warning.label;</label>
|
||||
<vbox id="incoming_box">
|
||||
<hbox>
|
||||
<label class="warning_settings" value="&incomingSettings.label;"/>
|
||||
<description id="warning_incoming"/>
|
||||
</hbox>
|
||||
<label id="incoming_technical"
|
||||
class="technical_details"
|
||||
value="&technicaldetails.label;"
|
||||
onclick="gEmailConfigWizard.toggleDetails('incoming');"/>
|
||||
<description id="incoming_details" collapsed="true"/>
|
||||
</vbox>
|
||||
<vbox id="outgoing_box">
|
||||
<hbox>
|
||||
<label class="warning_settings" value="&outgoingSettings.label;"/>
|
||||
<description id="warning_outgoing"/>
|
||||
</hbox>
|
||||
<label id="outgoing_technical"
|
||||
class="technical_details"
|
||||
value="&technicaldetails.label;"
|
||||
onclick="gEmailConfigWizard.toggleDetails('outgoing');"/>
|
||||
<description id="outgoing_details" collapsed="true"/>
|
||||
</vbox>
|
||||
<spacer flex="10"/>
|
||||
<description id="findoutmore">&contactYourProvider.description;</description>
|
||||
<spacer flex="100"/>
|
||||
<checkbox id="acknowledge_warning"
|
||||
label="&confirmWarning.label;"
|
||||
accesskey="&confirmWarning.accesskey;"
|
||||
class="acknowledge_checkbox"
|
||||
oncommand="gEmailConfigWizard.toggleAcknowledgeWarning()"/>
|
||||
<hbox>
|
||||
<button id="getmeoutofhere" label="&changeSettings.label;"
|
||||
<button id="getmeoutofhere"
|
||||
label="&changeSettings.label;"
|
||||
accesskey="&changeSettings.accesskey;"
|
||||
oncommand="gEmailConfigWizard.getMeOutOfHere()"/>
|
||||
<spacer flex="1"/>
|
||||
<button id="iknow" label="&createAccount.label;" disabled="true"
|
||||
<button id="iknow"
|
||||
label="&createAccount.label;"
|
||||
accesskey="&createAccount.accesskey;"
|
||||
disabled="true"
|
||||
oncommand="gEmailConfigWizard.validateAndFinish()"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
|
|
@ -96,8 +96,14 @@ function verifyConfig(config, alter, msgWindow, successCallback, errorCallback)
|
|||
inServer.useSecAuth = true;
|
||||
|
||||
try {
|
||||
inServer.password = config.incoming.password;
|
||||
verifyLogon(config, inServer, alter, msgWindow, successCallback, errorCallback);
|
||||
if (inServer.password)
|
||||
verifyLogon(config, inServer, alter, msgWindow,
|
||||
successCallback, errorCallback);
|
||||
else {
|
||||
// Avoid pref pollution, clear out server prefs.
|
||||
accountManager.removeIncomingServer(inServer, true);
|
||||
successCallback();
|
||||
}
|
||||
} catch (e) {
|
||||
ddump("ERROR: verify logon shouldn't have failed");
|
||||
errorCallback(e);
|
||||
|
@ -117,12 +123,16 @@ function verifyLogon(config, inServer, alter, msgWindow, successCallback,
|
|||
// our listener listens both for the url and cert errors.
|
||||
msgWindow.notificationCallbacks = listener;
|
||||
// try to work around bug where backend is clearing password.
|
||||
inServer.password = config.incoming.password;
|
||||
let uri = inServer.verifyLogon(listener, msgWindow);
|
||||
// clear msgWindow so url won't prompt for passwords.
|
||||
uri.QueryInterface(Ci.nsIMsgMailNewsUrl).msgWindow = null;
|
||||
// restore them
|
||||
msgWindow.notificationCallbacks = saveCallbacks;
|
||||
try {
|
||||
inServer.password = config.incoming.password;
|
||||
let uri = inServer.verifyLogon(listener, msgWindow);
|
||||
// clear msgWindow so url won't prompt for passwords.
|
||||
uri.QueryInterface(Ci.nsIMsgMailNewsUrl).msgWindow = null;
|
||||
}
|
||||
finally {
|
||||
// restore them
|
||||
msgWindow.notificationCallbacks = saveCallbacks;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче