зеркало из https://github.com/mozilla/pjs.git
switch from document.controls to document.getElementsByAttribute, in preparation for skinnability work
This commit is contained in:
Родитель
a0f7f6e0b5
Коммит
cecb05c0dd
|
@ -627,7 +627,8 @@ function getAccountFromServerId(serverId) {
|
|||
//
|
||||
function getPageFormElements() {
|
||||
try {
|
||||
var pageElements = top.frames["contentFrame"].document.controls;
|
||||
var pageElements =
|
||||
top.frames["contentFrame"].document.getElementsByAttribute("wsm_persist", "true");
|
||||
return pageElements;
|
||||
}
|
||||
catch (ex) {
|
||||
|
|
|
@ -16,17 +16,17 @@
|
|||
<script language="JavaScript" src="chrome://messenger/content/widgetglue.js"/>
|
||||
<script src="chrome://messenger/content/am-copies.js"/>
|
||||
|
||||
<html:input type="hidden" name="identity.fccFolder" id="identity.fccFolder"/>
|
||||
<html:input type="hidden" name="identity.draftFolder" id="identity.draftFolder"/>
|
||||
<html:input type="hidden" name="identity.stationeryFolder" id="identity.stationeryFolder"/>
|
||||
<html:input type="hidden" name="identity.email" id="identity.email"/>
|
||||
<html:input wsm_persist="true" type="hidden" name="identity.fccFolder" id="identity.fccFolder"/>
|
||||
<html:input wsm_persist="true" type="hidden" name="identity.draftFolder" id="identity.draftFolder"/>
|
||||
<html:input wsm_persist="true" type="hidden" name="identity.stationeryFolder" id="identity.stationeryFolder"/>
|
||||
<html:input wsm_persist="true" type="hidden" name="identity.email" id="identity.email"/>
|
||||
|
||||
<box class="box-smallheader" title="©AndFolderTitle.label;"/>
|
||||
<text class="label" value="&sendingPrefix.label;"/>
|
||||
|
||||
<box>
|
||||
<box flex="1">
|
||||
<html:input name="identity.doFcc" id="identity.doFcc" type="checkbox"/>
|
||||
<html:input wsm_persist="true" name="identity.doFcc" id="identity.doFcc" type="checkbox"/>
|
||||
<html:label for="identity.doFcc" flex="1">&fccMailFolder.label;</html:label>
|
||||
</box>
|
||||
|
||||
|
@ -36,14 +36,14 @@
|
|||
</box>
|
||||
</box>
|
||||
<box>
|
||||
<html:input name="identity.bccSelf" id="identity.bccSelf" type="checkbox"/>
|
||||
<html:label for="identity.bccSelf"><text before="&bccAccount.label; <" id="bccemail" after=">"/>
|
||||
<html:input wsm_persist="true" name="identity.bccSelf" id="identity.bccSelf" type="checkbox"/>
|
||||
<html:label wsm_persist="true" for="identity.bccSelf"><text before="&bccAccount.label; <" id="bccemail" after=">"/>
|
||||
</html:label>
|
||||
</box>
|
||||
<box>
|
||||
<html:input name="identity.bccOthers" id="identity.bccOthers" type="checkbox"/>
|
||||
<html:input wsm_persist="true" name="identity.bccOthers" id="identity.bccOthers" type="checkbox"/>
|
||||
<html:label for="identity.bccOthers">&bccAddress.label;</html:label>
|
||||
<html:input type="text" name="identity.bccList"/>
|
||||
<html:input wsm_persist="true" type="text" name="identity.bccList"/>
|
||||
</box>
|
||||
|
||||
<spring class="spacer"/>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<rows>
|
||||
<row>
|
||||
<text class="label" value="&accountName.label;" for="server.prettyName"/>
|
||||
<html:input type="text" size="30" name="server.prettyName" id="server.prettyName" flex="100%"/>
|
||||
<html:input wsm_persist="true" type="text" size="30" name="server.prettyName" id="server.prettyName" flex="100%"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
@ -42,40 +42,40 @@
|
|||
<rows>
|
||||
<row>
|
||||
<text class="label" value="&name.label;" for="identity.fullName"/>
|
||||
<html:input name="identity.fullName" id="identity.fullName" type="text" size="30"/>
|
||||
<html:input wsm_persist="true" name="identity.fullName" id="identity.fullName" type="text" size="30"/>
|
||||
</row>
|
||||
<row>
|
||||
<text class="label" value="&email.label;" for="identity.email"/>
|
||||
<html:input id="identity.email" name="identity.email" type="text" maxwidth="200" size="30"/>
|
||||
<html:input wsm_persist="true" id="identity.email" name="identity.email" type="text" maxwidth="200" size="30"/>
|
||||
</row>
|
||||
<row>
|
||||
<text class="label" value="&replyTo.label;" for="identity.replyTo"/>
|
||||
<html:input id="identity.replyTo" name="identity.replyTo" type="text" maxwidth="200" size="30"/>
|
||||
<html:input wsm_persist="true" id="identity.replyTo" name="identity.replyTo" type="text" maxwidth="200" size="30"/>
|
||||
</row>
|
||||
<row>
|
||||
<text class="label" value="&organization.label;" for="identity.organization"/>
|
||||
<html:input id="identity.organization" name="identity.organization" type="text" size="30"/>
|
||||
<html:input wsm_persist="true" id="identity.organization" name="identity.organization" type="text" size="30"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<!-- no vcard in PR1
|
||||
<row class="checkboxrow">
|
||||
<html:td colspan="2">
|
||||
<html:input name="identity.attachVCard" type="checkbox"/>
|
||||
<html:input wsm_persist="true" name="identity.attachVCard" type="checkbox"/>
|
||||
&attachVCard.label;
|
||||
<button value="&editVCard.label;"/>
|
||||
</html:td>
|
||||
</row>
|
||||
-->
|
||||
<box orient="horizontal">
|
||||
<html:input name="identity.attachSignature" id="identity.attachSignature" type="checkbox"/>
|
||||
<html:input wsm_persist="true" name="identity.attachSignature" id="identity.attachSignature" type="checkbox"/>
|
||||
<html:label for="identity.attachSignature">&signature.label;</html:label>
|
||||
<html:input type="text" id="identity.signature" datatype="nsIFileSpec" flex="100%" name="identity.signature"/>
|
||||
<html:input wsm_persist="true" type="text" id="identity.signature" datatype="nsIFileSpec" flex="100%" name="identity.signature"/>
|
||||
<button class="dialog push" name="browse" type="button" value="&choose.label;" onclick="prefNavSelectFile('identity.signature', 'choosefile', true)"/>
|
||||
</box>
|
||||
|
||||
<!--
|
||||
<html:select flex="100%">
|
||||
<html:select wsm_persist="true" flex="100%">
|
||||
<html:option value="sig1">&sampleSig1.label;</html:option>
|
||||
<html:option value="sig2">&sampleSig2.label;</html:option>
|
||||
<html:option value="sig3">&sampleSig3.label;</html:option>
|
||||
|
@ -85,13 +85,13 @@
|
|||
-->
|
||||
|
||||
<box>
|
||||
<html:input name="identity.composeHtml" id="identity.composeHtml" type="checkbox"/>
|
||||
<html:input wsm_persist="true" name="identity.composeHtml" id="identity.composeHtml" type="checkbox"/>
|
||||
<html:label for="identity.composeHtml">&useHtml.label;</html:label>
|
||||
</box>
|
||||
|
||||
<box orient="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<button onclick="onAdvanced" value="&advancedButton.label;"/>
|
||||
<html:input type="hidden" name="identity.smtpServerKey"/>
|
||||
<html:input wsm_persist="true" type="hidden" name="identity.smtpServerKey"/>
|
||||
</box>
|
||||
</window>
|
||||
|
|
|
@ -53,7 +53,7 @@ function initServerType() {
|
|||
|
||||
function hideShowControls(serverType)
|
||||
{
|
||||
var controls = document.controls;
|
||||
var controls = document.getElementsByAttribute("wsm_persist", "true");
|
||||
var len = controls.length;
|
||||
for (var i=0; i<len; i++) {
|
||||
var control = controls[i];
|
||||
|
@ -131,8 +131,10 @@ function getImapServer() {
|
|||
|
||||
function saveServerLocally(imapServer)
|
||||
{
|
||||
var controls = document.controls;
|
||||
|
||||
dump("Saving values in " + imapServer + ":\n");
|
||||
for (var i in imapServer) {
|
||||
dump("imapServer." + i + " = " + imapServer[i] + "\n");
|
||||
}
|
||||
// boolean prefs, JS does the conversion for us
|
||||
document.getElementById("imap.dualUseFolders").value = imapServer.dualUseFolders;
|
||||
document.getElementById("imap.usingSubscription").value = imapServer.usingSubscription;
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
<script src="chrome://messenger/content/am-server.js"/>
|
||||
<script src="chrome://global/content/strres.js"/>
|
||||
|
||||
<html:input type="hidden" name="server.type" id="server.type"/>
|
||||
<html:input type="hidden" name="server.hostName" id="server.hostName"/>
|
||||
<html:input type="hidden" name="server.username" id="server.username"/>
|
||||
<html:input wsm_persist="true" type="hidden" name="server.type" id="server.type"/>
|
||||
<html:input wsm_persist="true" type="hidden" name="server.hostName" id="server.hostName"/>
|
||||
<html:input wsm_persist="true" type="hidden" name="server.username" id="server.username"/>
|
||||
|
||||
<box class="box-smallheader" title="&serverSettings.label;"/>
|
||||
<box wsm_persist="true" class="box-smallheader" title="&serverSettings.label;"/>
|
||||
|
||||
<grid>
|
||||
<columns>
|
||||
|
@ -42,41 +42,41 @@
|
|||
</grid>
|
||||
<spring class="spacer"/>
|
||||
<box id="serverPrefContainer" hidden="true" orient="vertical">
|
||||
<box orient="horizontal"><html:input name="server.isSecure"
|
||||
<box orient="horizontal"><html:input wsm_persist="true" name="server.isSecure"
|
||||
id="server.isSecure"
|
||||
type="checkbox"/>
|
||||
<html:label for="server.isSecure">&isSecure.label;</html:label>
|
||||
</box>
|
||||
<box orient="horizontal"><html:input name="server.rememberPassword"
|
||||
<box orient="horizontal"><html:input wsm_persist="true" name="server.rememberPassword"
|
||||
id="server.rememberPassword"
|
||||
type="checkbox"/>
|
||||
<html:label for="server.rememberPassword">&savePassword.label;</html:label>
|
||||
</box>
|
||||
<box orient="horizontal"><html:input name="server.doBiff"
|
||||
<box orient="horizontal"><html:input wsm_persist="true" name="server.doBiff"
|
||||
id="server.doBiff"
|
||||
type="checkbox"/>
|
||||
<html:label for="server.doBiff">&biffStart.label;</html:label>
|
||||
<html:input name="server.biffMinutes" type="text" size="3"/>
|
||||
<html:input wsm_persist="true" name="server.biffMinutes" type="text" size="3"/>
|
||||
&biffEnd.label;
|
||||
</box>
|
||||
<box style="margin-left: 2em">
|
||||
<html:input name="server.downloadOnBiff"
|
||||
<html:input wsm_persist="true" name="server.downloadOnBiff"
|
||||
id="server.downloadOnBiff"
|
||||
type="checkbox"/>
|
||||
<html:label for="server.downloadOnBiff">&downloadOnBiff.label;</html:label>
|
||||
</box>
|
||||
<box><html:input name="pop3.leaveMessagesOnServer" id="pop3.leaveMessagesOnServer" type="checkbox"/>
|
||||
<box><html:input wsm_persist="true" name="pop3.leaveMessagesOnServer" id="pop3.leaveMessagesOnServer" type="checkbox"/>
|
||||
<html:label for="pop3.leaveMessagesOnServer">&leaveOnServer.label;</html:label>
|
||||
</box>
|
||||
<box><html:input name="pop3.deleteMailLeftOnServer" id="pop3.deleteMailLeftOnServer" type="checkbox"/>
|
||||
<html:label for="pop3.deleteMailLeftOnServer">&deleteOnServer.label;</html:label>
|
||||
<box><html:input wsm_persist="true" name="pop3.deleteMailLeftOnServer" id="pop3.deleteMailLeftOnServer" type="checkbox"/>
|
||||
<html:label wsm_persist="true" for="pop3.deleteMailLeftOnServer">&deleteOnServer.label;</html:label>
|
||||
</box>
|
||||
|
||||
|
||||
<!-- IMAP -->
|
||||
<box>
|
||||
<text value="&deleteMessagePrefix.label;"/>
|
||||
<html:select name="imap.deleteModel">
|
||||
<html:select wsm_persist="true" name="imap.deleteModel">
|
||||
<html:option value="1">&modelMoveToTrash.label;</html:option>
|
||||
<html:option value="0">&modelMarkDeleted.label;</html:option>
|
||||
<html:option value="2">&modelDeleteImmediately.label;</html:option>
|
||||
|
@ -84,11 +84,11 @@
|
|||
</box>
|
||||
|
||||
<box>
|
||||
<html:input name="imap.cleanupInboxOnExit" id="imap.cleanupInboxOnExit" type="checkbox"/>
|
||||
<html:input wsm_persist="true" name="imap.cleanupInboxOnExit" id="imap.cleanupInboxOnExit" type="checkbox"/>
|
||||
<html:label for="imap.cleanupInboxOnExit">&expungeOnExit.label;</html:label>
|
||||
</box>
|
||||
<box>
|
||||
<html:input name="imap.emptyTrashOnExit" id="imap.emptyTrashOnExit" type="checkbox"/>
|
||||
<html:input wsm_persist="true" name="imap.emptyTrashOnExit" id="imap.emptyTrashOnExit" type="checkbox"/>
|
||||
<html:label for="imap.emptyTrashOnExit">&emptyTrashOnExit.label;</html:label>
|
||||
</box>
|
||||
<box iscontrolcontainer="true">
|
||||
|
@ -98,23 +98,23 @@
|
|||
onclick="openImapAdvanced(event);"/>
|
||||
</box>
|
||||
|
||||
<html:input type="hidden" id="imap.dualUseFolders" name="imap.dualUseFolders"/>
|
||||
<html:input type="hidden" id="imap.usingSubscription" name="imap.usingSubscription"/>
|
||||
<html:input type="hidden" id="imap.personalNamespace" name="imap.personalNamespace"/>
|
||||
<html:input type="hidden" id="imap.publicNamespace" name="imap.publicNamespace"/>
|
||||
<html:input type="hidden" id="imap.otherUsersNamespace" name="imap.otherUsersNamespace"/>
|
||||
<html:input type="hidden" id="imap.serverDirectory" name="imap.serverDirectory"/>
|
||||
<html:input type="hidden" id="imap.overrideNamespaces" name="imap.overrideNamespaces"/>
|
||||
<html:input wsm_persist="true" type="hidden" id="imap.dualUseFolders" name="imap.dualUseFolders"/>
|
||||
<html:input wsm_persist="true" type="hidden" id="imap.usingSubscription" name="imap.usingSubscription"/>
|
||||
<html:input wsm_persist="true" type="hidden" id="imap.personalNamespace" name="imap.personalNamespace"/>
|
||||
<html:input wsm_persist="true" type="hidden" id="imap.publicNamespace" name="imap.publicNamespace"/>
|
||||
<html:input wsm_persist="true" type="hidden" id="imap.otherUsersNamespace" name="imap.otherUsersNamespace"/>
|
||||
<html:input wsm_persist="true" type="hidden" id="imap.serverDirectory" name="imap.serverDirectory"/>
|
||||
<html:input wsm_persist="true" type="hidden" id="imap.overrideNamespaces" name="imap.overrideNamespaces"/>
|
||||
</box>
|
||||
|
||||
<!-- News -->
|
||||
<box orient="horizontal">
|
||||
<box>
|
||||
<html:input name="nntp.notifyOn" id="nntp.notifyOn" type="checkbox"/>
|
||||
<html:input wsm_persist="true" name="nntp.notifyOn" id="nntp.notifyOn" type="checkbox"/>
|
||||
<html:label for="nntp.notifyOn">&maxMessagesStart.label;</html:label>
|
||||
</box>
|
||||
<box>
|
||||
<html:input name="nntp.maxArticles" type="text" size="6"/>
|
||||
<html:input wsm_persist="true" name="nntp.maxArticles" type="text" size="6"/>
|
||||
&maxMessagesEnd.label;
|
||||
</box>
|
||||
</box>
|
||||
|
@ -123,11 +123,11 @@
|
|||
<title><text value="&abbreviate.label;"/></title>
|
||||
|
||||
<box>
|
||||
<html:input reversed="true" id="nntp.abbreviate.on" name="nntp.abbreviate" type="radio"/>
|
||||
<html:input wsm_persist="true" reversed="true" id="nntp.abbreviate.on" name="nntp.abbreviate" type="radio"/>
|
||||
<html:label for="nntp.abbreviate.on" >&abbreviateOn.label;</html:label>
|
||||
</box>
|
||||
<box>
|
||||
<html:input id="id.nntp.abbreviate.off" name="nntp.abbreviate" type="radio"/>
|
||||
<html:input wsm_persist="true" id="id.nntp.abbreviate.off" name="nntp.abbreviate" type="radio"/>
|
||||
<html:label for="id.nntp.abbreviate.off" >&abbreviateOff.label;</html:label>
|
||||
</box>
|
||||
</titledbox>
|
||||
|
@ -135,12 +135,12 @@
|
|||
|
||||
<box orient="vertical">
|
||||
<text value="&newsrcFilePath.label;" for="nntp.newsrcFilePath"/>
|
||||
<html:input type="text" size="60" id="nntp.newsrcFilePath" name="nntp.newsrcFilePath" datatype="nsIFileSpec"/>
|
||||
<html:input wsm_persist="true" type="text" size="60" id="nntp.newsrcFilePath" name="nntp.newsrcFilePath" datatype="nsIFileSpec"/>
|
||||
</box>
|
||||
</box>
|
||||
<spring flex="100%"/>
|
||||
<box orient="vertical">
|
||||
<text value="&localPath.label;" for="server.localPath"/>
|
||||
<html:input type="text" size="60" id="server.localPath" name="server.localPath" datatype="nsIFileSpec"/>
|
||||
<html:input wsm_persist="true" type="text" size="60" id="server.localPath" name="server.localPath" datatype="nsIFileSpec"/>
|
||||
</box>
|
||||
</window>
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
<rows>
|
||||
<row>
|
||||
<text class="label" value="&accountName.label;" for="server.prettyName"/>
|
||||
<html:input type="text" size="30" name="server.prettyName" id="server.prettyName"/>
|
||||
<html:input wsm_persist="true" type="text" size="30" name="server.prettyName" id="server.prettyName"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<spring flex="1"/>
|
||||
<box align="vertical">
|
||||
<text value="&localPath.label;"/>
|
||||
<html:input type="text" size="60" name="server.localPath" datatype="nsIFileSpec"/>
|
||||
<html:input wsm_persist="true" type="text" size="60" name="server.localPath" datatype="nsIFileSpec"/>
|
||||
</box>
|
||||
</window>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<box>
|
||||
<text class="label" value="&smtpHostname.label;"/>
|
||||
<html:input type="text" size="30" name="smtp.hostname"/>
|
||||
<html:input wsm_persist="true" type="text" size="30" name="smtp.hostname"/>
|
||||
</box>
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<html:input type="checkbox" id="smtp.useUsername" name="smtp.useUsername"/>
|
||||
<html:input wsm_persist="true" type="checkbox" id="smtp.useUsername" name="smtp.useUsername"/>
|
||||
<html:label for="smtp.useUsername">&smtpAlwaysUseName.label;</html:label>
|
||||
</row>
|
||||
|
||||
|
@ -37,18 +37,18 @@
|
|||
<text/>
|
||||
<box>
|
||||
<text class="label" value="&smtpUsername.label;"/>
|
||||
<html:input type="text" size="30" name="smtp.username" flex="100%"/>
|
||||
<html:input wsm_persist="true" type="text" size="30" name="smtp.username" flex="100%"/>
|
||||
</box>
|
||||
</row>
|
||||
<row>
|
||||
<text/>
|
||||
<box>
|
||||
<html:input type="checkbox" id="smtp.savePassword" name="smtp.savePassword"/>
|
||||
<html:input wsm_persist="true" type="checkbox" id="smtp.savePassword" name="smtp.savePassword"/>
|
||||
<html:label for="smtp.savePassword">&smtpSavePassword.label;</html:label>
|
||||
</box>
|
||||
</row>
|
||||
<row>
|
||||
<html:input id="smtp.isSecure" name="smtp.isSecure" type="checkbox"/>
|
||||
<html:input wsm_persist="true" id="smtp.isSecure" name="smtp.isSecure" type="checkbox"/>
|
||||
<html:label for="smtp.isSecure">&smtpUseSecure.label;</html:label>
|
||||
</row>
|
||||
</rows>
|
||||
|
|
Загрузка…
Ссылка в новой задаче