зеркало из https://github.com/mozilla/gecko-dev.git
Fixes to bugs 87177, 91560, 86014, 81321. R=bhuvan, hwaara, eddyk, SR=sspitzer
This commit is contained in:
Родитель
98470d0683
Коммит
e85024b972
|
@ -31,6 +31,10 @@ function onInit()
|
||||||
initRetentionSettings();
|
initRetentionSettings();
|
||||||
initDownloadSettings();
|
initDownloadSettings();
|
||||||
}
|
}
|
||||||
|
onCheckItem("bc_notDownload", "offline.notDownload");
|
||||||
|
onCheckItem("bc_downloadMsg", "nntp.downloadMsg");
|
||||||
|
onCheckItem("bc_removeBody", "nntp.removeBody");
|
||||||
|
onCheckKeepMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
function initServerSettings()
|
function initServerSettings()
|
||||||
|
@ -47,7 +51,7 @@ function initServerSettings()
|
||||||
document.getElementById("offline.downloadBodiesOnGetNewMail").checked = gImapIncomingServer.downloadBodiesOnGetNewMail;
|
document.getElementById("offline.downloadBodiesOnGetNewMail").checked = gImapIncomingServer.downloadBodiesOnGetNewMail;
|
||||||
document.getElementById("offline.newFolder").checked = gImapIncomingServer.offlineDownload;
|
document.getElementById("offline.newFolder").checked = gImapIncomingServer.offlineDownload;
|
||||||
}
|
}
|
||||||
onLockPreference();
|
// onLockPreference();
|
||||||
}
|
}
|
||||||
|
|
||||||
function initRetentionSettings()
|
function initRetentionSettings()
|
||||||
|
@ -56,7 +60,7 @@ function initRetentionSettings()
|
||||||
var retentionSettings = gIncomingServer.retentionSettings;
|
var retentionSettings = gIncomingServer.retentionSettings;
|
||||||
|
|
||||||
document.getElementById("nntp.keepUnread").checked = retentionSettings.keepUnreadMessagesOnly;
|
document.getElementById("nntp.keepUnread").checked = retentionSettings.keepUnreadMessagesOnly;
|
||||||
document.getElementById("nntp.removeBody").checked = retentionSettings.cleanupBodiesByDates;
|
document.getElementById("nntp.removeBody").checked = retentionSettings.cleanupBodiesByDays;
|
||||||
document.getElementById("nntp.keepMsg").setAttribute("value", retentionSettings.retainByPreference);
|
document.getElementById("nntp.keepMsg").setAttribute("value", retentionSettings.retainByPreference);
|
||||||
if(retentionSettings.daysToKeepHdrs > 0)
|
if(retentionSettings.daysToKeepHdrs > 0)
|
||||||
document.getElementById("nntp.keepOldMsgMin").setAttribute("value", retentionSettings.daysToKeepHdrs);
|
document.getElementById("nntp.keepOldMsgMin").setAttribute("value", retentionSettings.daysToKeepHdrs);
|
||||||
|
@ -215,7 +219,7 @@ function onSave()
|
||||||
retentionSettings.daysToKeepBodies = document.getElementById("nntp.removeBodyMin").value;
|
retentionSettings.daysToKeepBodies = document.getElementById("nntp.removeBodyMin").value;
|
||||||
retentionSettings.numHeadersToKeep = document.getElementById("nntp.keepNewMsgMin").value;
|
retentionSettings.numHeadersToKeep = document.getElementById("nntp.keepNewMsgMin").value;
|
||||||
retentionSettings.keepUnreadMessagesOnly = document.getElementById("nntp.keepUnread").checked;
|
retentionSettings.keepUnreadMessagesOnly = document.getElementById("nntp.keepUnread").checked;
|
||||||
retentionSettings.cleanupBodiesByDates = document.getElementById("nntp.removeBody").checked;
|
retentionSettings.cleanupBodiesByDays = document.getElementById("nntp.removeBody").checked;
|
||||||
|
|
||||||
downloadSettings.downloadByDate = document.getElementById("nntp.downloadMsg").checked;
|
downloadSettings.downloadByDate = document.getElementById("nntp.downloadMsg").checked;
|
||||||
downloadSettings.downloadUnreadOnly = document.getElementById("nntp.downloadUnread").checked;
|
downloadSettings.downloadUnreadOnly = document.getElementById("nntp.downloadUnread").checked;
|
||||||
|
@ -284,3 +288,37 @@ is known, it needs to be added to the array. See bugs 91560 and 79561
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onCheckItem(broadcasterElementId, checkElementId)
|
||||||
|
{
|
||||||
|
var broadcaster = document.getElementById(broadcasterElementId);
|
||||||
|
var checked = document.getElementById(checkElementId).checked;
|
||||||
|
if(checked) {
|
||||||
|
broadcaster.removeAttribute("disabled");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
broadcaster.setAttribute("disabled", "true");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCheckKeepMsg()
|
||||||
|
{
|
||||||
|
var broadcaster_keepMsg = document.getElementById("bc_keepMsg");
|
||||||
|
var checkedOld = document.getElementById("nntp.keepOldMsg").checked;
|
||||||
|
var checkedNew = document.getElementById("nntp.keepNewMsg").checked;
|
||||||
|
var checkedAll = document.getElementById("nntp.keepAllMsg").checked;
|
||||||
|
if(checkedAll) {
|
||||||
|
broadcaster_keepMsg.setAttribute("disabled", "true");
|
||||||
|
}
|
||||||
|
else if(checkedOld) {
|
||||||
|
document.getElementById("nntp.keepOldMsgMin").removeAttribute("disabled");
|
||||||
|
document.getElementById("nntp.keepNewMsgMin").setAttribute("disabled", "true");
|
||||||
|
}
|
||||||
|
else if(checkedNew) {
|
||||||
|
document.getElementById("nntp.keepNewMsgMin").removeAttribute("disabled");
|
||||||
|
document.getElementById("nntp.keepOldMsgMin").setAttribute("disabled", "true");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,22 +39,16 @@ Contributors:
|
||||||
|
|
||||||
<script type="application/x-javascript" src="chrome://messenger/content/AccountManager.js"/>
|
<script type="application/x-javascript" src="chrome://messenger/content/AccountManager.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://messenger/content/am-offline.js"/>
|
<script type="application/x-javascript" src="chrome://messenger/content/am-offline.js"/>
|
||||||
|
|
||||||
|
<broadcaster id="bc_notDownload"/>
|
||||||
|
<broadcaster id="bc_downloadMsg"/>
|
||||||
|
<broadcaster id="bc_keepMsg"/>
|
||||||
|
<broadcaster id="bc_removeBody"/>
|
||||||
|
|
||||||
<text hidden="true" wsm_persist="true" id="server.type"/>
|
<text hidden="true" wsm_persist="true" id="server.type"/>
|
||||||
|
|
||||||
<hbox id="headertitle" class="box-smallheader"/>
|
<hbox id="headertitle" class="box-smallheader"/>
|
||||||
|
|
||||||
<groupbox orient="vertical" id="offlinepop.titlebox" hidable="true" hidefor="imap,nntp">
|
|
||||||
<html iscontrolcontainer="true">&offlinePopDesc.label;</html>
|
|
||||||
<hbox iscontrolcontainer="true" autostretch="never">
|
|
||||||
<checkbox wsm_persist="true" id="offline.notDownload"
|
|
||||||
label="&offlineNotDownload.label;" accesskey="&offlineNotDownload.accesskey;"/>
|
|
||||||
<textbox wsm_persist="true" id="offline.notDownloadMin" size="5" value="50"/>
|
|
||||||
<text class="label" value="&kb.label;"/>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
</groupbox>
|
|
||||||
|
|
||||||
<groupbox orient="vertical" id="offline.titlebox" hidable="true" hidefor="pop3">
|
<groupbox orient="vertical" id="offline.titlebox" hidable="true" hidefor="pop3">
|
||||||
<label value="&offlineGroupTitle.label;"/>
|
<label value="&offlineGroupTitle.label;"/>
|
||||||
|
|
||||||
|
@ -81,24 +75,24 @@ Contributors:
|
||||||
</groupbox>
|
</groupbox>
|
||||||
|
|
||||||
<separator class="thin"/>
|
<separator class="thin"/>
|
||||||
<groupbox orient="vertical" id="diskspace.titlebox" hidable="true" hidefor="pop3">
|
<groupbox orient="vertical" id="diskspace.titlebox">
|
||||||
<label value="&diskspaceGroupTitle.label;"/>
|
<label value="&diskspaceGroupTitle.label;"/>
|
||||||
|
|
||||||
<html iscontrolcontainer="true" hidable="true" hidefor="pop3">&offlineMsg.label;</html>
|
<html iscontrolcontainer="true" hidable="true" hidefor="pop3">&offlineMsg.label;</html>
|
||||||
|
<html iscontrolcontainer="true" hidable="true" hidefor="imap,nntp">&offlinePopDesc.label;</html>
|
||||||
|
|
||||||
<hbox iscontrolcontainer="true" autostretch="never">
|
<hbox autostretch="never">
|
||||||
<checkbox wsm_persist="true" id="offline.notDownload"
|
<checkbox wsm_persist="true" id="offline.notDownload"
|
||||||
label="&offlineNotDownload.label;" accesskey="&offlineNotDownload.accesskey;"/>
|
label="&offlineNotDownload.label;" accesskey="&offlineNotDownload.accesskey;" oncommand="onCheckItem('bc_notDownload', 'offline.notDownload');"/>
|
||||||
<textbox wsm_persist="true" id="offline.notDownloadMin" size="5" value="50"/>
|
<textbox wsm_persist="true" id="offline.notDownloadMin" size="5" value="50" observes="bc_notDownload"/>
|
||||||
<text class="label" value="&kb.label;"/>
|
<text class="label" value="&kb.label;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
|
|
||||||
<checkbox iscontrolcontainer="true" hidable="true" hidefor="pop3,imap"
|
<checkbox iscontrolcontainer="true" hidable="true" hidefor="pop3,imap"
|
||||||
wsm_persist="true" id="nntp.downloadUnread" label="&nntpDownloadUnread.label;" accesskey="&nntpDownloadUnread.accesskey;"/>
|
wsm_persist="true" id="nntp.downloadUnread" label="&nntpDownloadUnread.label;" accesskey="&nntpDownloadUnread.accesskey;"/>
|
||||||
<hbox iscontrolcontainer="true" hidable="true" hidefor="pop3,imap" autostretch="never">
|
<hbox iscontrolcontainer="true" hidable="true" hidefor="pop3,imap" autostretch="never">
|
||||||
<checkbox wsm_persist="true" id="nntp.downloadMsg" label="&nntpDownloadMsg.label;" accesskey="&nntpDownloadMsg.accesskey;"/>
|
<checkbox wsm_persist="true" id="nntp.downloadMsg" label="&nntpDownloadMsg.label;" accesskey="&nntpDownloadMsg.accesskey;" oncommand="onCheckItem('bc_downloadMsg', 'nntp.downloadMsg');"/>
|
||||||
<textbox wsm_persist="true" id="nntp.downloadMsgMin" size="5" value="30"/>
|
<textbox wsm_persist="true" id="nntp.downloadMsgMin" size="5" value="30" observes="bc_downloadMsg"/>
|
||||||
<text class="label" value="&daysAgo.label;"/>
|
<text class="label" value="&daysAgo.label;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
|
@ -108,22 +102,22 @@ Contributors:
|
||||||
|
|
||||||
<radiogroup orient="vertical" wsm_persist="true" id="nntp.keepMsg" pref="true" preftype="int" prefattribute="data">
|
<radiogroup orient="vertical" wsm_persist="true" id="nntp.keepMsg" pref="true" preftype="int" prefattribute="data">
|
||||||
<hbox flex="1">
|
<hbox flex="1">
|
||||||
<radio group="nntp.keepMsg" wsm_persist="true" id="nntp.keepOldMsg" data="2" label="&nntpKeepMsg.label;"/>
|
<radio group="nntp.keepMsg" wsm_persist="true" id="nntp.keepOldMsg" data="2" label="&nntpKeepMsg.label;" oncommand="onCheckKeepMsg();"/>
|
||||||
<textbox wsm_persist="true" id="nntp.keepOldMsgMin" size="5" value="30"/>
|
<textbox wsm_persist="true" id="nntp.keepOldMsgMin" size="5" value="30" observes="bc_keepMsg"/>
|
||||||
<text class="label" value="&days.label;"/>
|
<text class="label" value="&days.label;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<radio group="nntp.keepMsg" wsm_persist="true" id="nntp.keepAllMsg" data="1" label="&nntpKeepAll.label;"/>
|
<radio group="nntp.keepMsg" wsm_persist="true" id="nntp.keepAllMsg" data="1" label="&nntpKeepAll.label;" oncommand="onCheckKeepMsg();"/>
|
||||||
<hbox flex="1">
|
<hbox flex="1">
|
||||||
<radio group="nntp.keepMsg" wsm_persist="true" id="nntp.keepNewMsg" data="3" label="&nntpKeepNew.label;"/>
|
<radio group="nntp.keepMsg" wsm_persist="true" id="nntp.keepNewMsg" data="3" label="&nntpKeepNew.label;" oncommand="onCheckKeepMsg();"/>
|
||||||
<textbox wsm_persist="true" id="nntp.keepNewMsgMin" size="5" value="30"/>
|
<textbox wsm_persist="true" id="nntp.keepNewMsgMin" size="5" value="30" observes="bc_keepMsg"/>
|
||||||
<text class="label" value="&message.label;"/>
|
<text class="label" value="&message.label;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</radiogroup>
|
</radiogroup>
|
||||||
|
|
||||||
<checkbox wsm_persist="true" id="nntp.keepUnread" label="&nntpKeepUnread.label;" checked="true"/>
|
<checkbox wsm_persist="true" id="nntp.keepUnread" label="&nntpKeepUnread.label;" checked="true"/>
|
||||||
<hbox flex="1">
|
<hbox flex="1">
|
||||||
<checkbox wsm_persist="true" id="nntp.removeBody" label="&nntpRemoveBody.label;"/>
|
<checkbox wsm_persist="true" id="nntp.removeBody" label="&nntpRemoveBody.label;" oncommand="onCheckItem('bc_removeBody','nntp.removeBody');"/>
|
||||||
<textbox wsm_persist="true" id="nntp.removeBodyMin" size="5" value="30"/>
|
<textbox wsm_persist="true" id="nntp.removeBodyMin" size="5" value="30" observes="bc_removeBody"/>
|
||||||
<text class="label" value="&days.label;"/>
|
<text class="label" value="&days.label;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
|
@ -231,7 +231,8 @@ function SetupRenameMenuItem(targetFolder, numSelected, isServer, serverType, sp
|
||||||
var canRename = (targetFolder.getAttribute('CanRename') == "true");
|
var canRename = (targetFolder.getAttribute('CanRename') == "true");
|
||||||
|
|
||||||
ShowMenuItem("folderPaneContext-rename", (numSelected <= 1) && !isServer && (specialFolder == "none") && canRename);
|
ShowMenuItem("folderPaneContext-rename", (numSelected <= 1) && !isServer && (specialFolder == "none") && canRename);
|
||||||
EnableMenuItem("folderPaneContext-rename", !isServer);
|
var folder = GetMsgFolderFromNode(targetFolder);
|
||||||
|
EnableMenuItem("folderPaneContext-rename", !isServer && folder.isCommandEnabled("cmd_renameFolder"));
|
||||||
|
|
||||||
if(canRename)
|
if(canRename)
|
||||||
{
|
{
|
||||||
|
@ -248,8 +249,11 @@ function SetupRemoveMenuItem(targetFolder, numSelected, isServer, serverType, sp
|
||||||
|
|
||||||
|
|
||||||
ShowMenuItem("folderPaneContext-remove", showRemove);
|
ShowMenuItem("folderPaneContext-remove", showRemove);
|
||||||
EnableMenuItem("folderPaneContext-remove", true);
|
if(showRemove)
|
||||||
|
{
|
||||||
|
var folder = GetMsgFolderFromNode(targetFolder);
|
||||||
|
EnableMenuItem("folderPaneContext-remove", folder.isCommandEnabled("cmd_delete"));
|
||||||
|
}
|
||||||
if(isMail && !isSpecialFolder)
|
if(isMail && !isSpecialFolder)
|
||||||
{
|
{
|
||||||
SetMenuItemLabel("folderPaneContext-remove", gMessengerBundle.getString("removeFolder"));
|
SetMenuItemLabel("folderPaneContext-remove", gMessengerBundle.getString("removeFolder"));
|
||||||
|
@ -260,7 +264,8 @@ function SetupCompactMenuItem(targetFolder, numSelected)
|
||||||
{
|
{
|
||||||
var canCompact = (targetFolder.getAttribute('CanCompact') == "true");
|
var canCompact = (targetFolder.getAttribute('CanCompact') == "true");
|
||||||
ShowMenuItem("folderPaneContext-compact", (numSelected <=1) && canCompact);
|
ShowMenuItem("folderPaneContext-compact", (numSelected <=1) && canCompact);
|
||||||
EnableMenuItem("folderPaneContext-compact", true );
|
var folder = GetMsgFolderFromNode(targetFolder);
|
||||||
|
EnableMenuItem("folderPaneContext-compact", folder.isCommandEnabled("cmd_compactFolder"));
|
||||||
|
|
||||||
if(canCompact)
|
if(canCompact)
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче