mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-28 14:45:28 +00:00
See Changelog
Monotone-Parent: 39d36001db32af64db061e377168a6c1bc81941d Monotone-Revision: dd23d4ef280d7ee44b779645014bd0c19bce9265 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2010-11-10T15:21:09 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
* UI/WebServerResources/MailerUI.js (openMailbox): improved
|
||||
behavior when reloading the mailbox.
|
||||
(onMenuEmptyTrashCallback): new callback exclusive to the "empty
|
||||
trash" menu option; it deletes the cached data source and refresh
|
||||
the current folder instead of jumping to the inbox.
|
||||
|
||||
2010-11-08 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
|
||||
@@ -1005,7 +1005,7 @@ function deleteCachedMailbox(mailboxPath) {
|
||||
var keys = Mailer.dataSources.keys();
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
if (keys[i] == mailboxPath || keys[i].startsWith(mailboxPath + "?"))
|
||||
Mailer.dataSources.unset(keys[i]);
|
||||
Mailer.dataSources.unset(keys[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2209,17 +2209,24 @@ function onMenuEmptyTrash(event) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
var urlstr = URLForFolderID(folderID) + "/emptyTrash";
|
||||
var errorLabel = _("The trash could not be emptied.");
|
||||
deleteCachedMailboxByType("trash");
|
||||
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
||||
triggerAjaxRequest(urlstr, onMenuEmptyTrashCallback, errorLabel);
|
||||
|
||||
if (folderID == Mailer.currentMailbox) {
|
||||
$('messageContent').update();
|
||||
$('messageContent').innerHTML = '';
|
||||
}
|
||||
var msgID = Mailer.currentMessages[folderID];
|
||||
if (msgID)
|
||||
deleteCachedMessage(folderID + "/" + msgID);
|
||||
}
|
||||
|
||||
function onMenuEmptyTrashCallback(http) {
|
||||
if (http.readyState == 4
|
||||
&& isHttpStatus204(http.status))
|
||||
deleteCachedMailboxByType('trash');
|
||||
else
|
||||
showAlertDialog(http.callbackData);
|
||||
}
|
||||
|
||||
function _onMenuChangeToXXXFolder(event, folder) {
|
||||
var type = document.menuTarget.getAttribute("datatype");
|
||||
if (type == "additional")
|
||||
|
||||
Reference in New Issue
Block a user