diff --git a/mailnews/base/prefs/resources/content/am-offline.js b/mailnews/base/prefs/resources/content/am-offline.js
index db7f03d3cd76..68fd3b95b956 100644
--- a/mailnews/base/prefs/resources/content/am-offline.js
+++ b/mailnews/base/prefs/resources/content/am-offline.js
@@ -31,6 +31,10 @@ function onInit()
initRetentionSettings();
initDownloadSettings();
}
+ onCheckItem("bc_notDownload", "offline.notDownload");
+ onCheckItem("bc_downloadMsg", "nntp.downloadMsg");
+ onCheckItem("bc_removeBody", "nntp.removeBody");
+ onCheckKeepMsg();
}
function initServerSettings()
@@ -47,7 +51,7 @@ function initServerSettings()
document.getElementById("offline.downloadBodiesOnGetNewMail").checked = gImapIncomingServer.downloadBodiesOnGetNewMail;
document.getElementById("offline.newFolder").checked = gImapIncomingServer.offlineDownload;
}
- onLockPreference();
+ // onLockPreference();
}
function initRetentionSettings()
@@ -56,7 +60,7 @@ function initRetentionSettings()
var retentionSettings = gIncomingServer.retentionSettings;
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);
if(retentionSettings.daysToKeepHdrs > 0)
document.getElementById("nntp.keepOldMsgMin").setAttribute("value", retentionSettings.daysToKeepHdrs);
@@ -215,7 +219,7 @@ function onSave()
retentionSettings.daysToKeepBodies = document.getElementById("nntp.removeBodyMin").value;
retentionSettings.numHeadersToKeep = document.getElementById("nntp.keepNewMsgMin").value;
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.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");
+ }
+
+
+}
+
diff --git a/mailnews/base/prefs/resources/content/am-offline.xul b/mailnews/base/prefs/resources/content/am-offline.xul
index 8aa31f2fe5c9..9ad8a392e1ac 100644
--- a/mailnews/base/prefs/resources/content/am-offline.xul
+++ b/mailnews/base/prefs/resources/content/am-offline.xul
@@ -39,22 +39,16 @@ Contributors:
+
+
+
+
+
-
- &offlinePopDesc.label;
-
-
-
-
-
-
-
-
@@ -81,24 +75,24 @@ Contributors:
-
+
&offlineMsg.label;
+ &offlinePopDesc.label;
-
+
-
+ label="&offlineNotDownload.label;" accesskey="&offlineNotDownload.accesskey;" oncommand="onCheckItem('bc_notDownload', 'offline.notDownload');"/>
+
-
-
+
-
-
+
+
@@ -108,22 +102,22 @@ Contributors:
-
-
+
+
-
+
-
-
+
+
-
-
+
+
diff --git a/mailnews/base/resources/content/mailContextMenus.js b/mailnews/base/resources/content/mailContextMenus.js
index c8cbb122e951..38e28edd2ebb 100644
--- a/mailnews/base/resources/content/mailContextMenus.js
+++ b/mailnews/base/resources/content/mailContextMenus.js
@@ -231,7 +231,8 @@ function SetupRenameMenuItem(targetFolder, numSelected, isServer, serverType, sp
var canRename = (targetFolder.getAttribute('CanRename') == "true");
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)
{
@@ -248,8 +249,11 @@ function SetupRemoveMenuItem(targetFolder, numSelected, isServer, serverType, sp
ShowMenuItem("folderPaneContext-remove", showRemove);
- EnableMenuItem("folderPaneContext-remove", true);
-
+ if(showRemove)
+ {
+ var folder = GetMsgFolderFromNode(targetFolder);
+ EnableMenuItem("folderPaneContext-remove", folder.isCommandEnabled("cmd_delete"));
+ }
if(isMail && !isSpecialFolder)
{
SetMenuItemLabel("folderPaneContext-remove", gMessengerBundle.getString("removeFolder"));
@@ -260,7 +264,8 @@ function SetupCompactMenuItem(targetFolder, numSelected)
{
var canCompact = (targetFolder.getAttribute('CanCompact') == "true");
ShowMenuItem("folderPaneContext-compact", (numSelected <=1) && canCompact);
- EnableMenuItem("folderPaneContext-compact", true );
+ var folder = GetMsgFolderFromNode(targetFolder);
+ EnableMenuItem("folderPaneContext-compact", folder.isCommandEnabled("cmd_compactFolder"));
if(canCompact)
{