* eMail: while composing try refreshing listview for Draftfolder (this is, when email app is open, and draft folder is selected)

This commit is contained in:
Klaus Leithoff 2013-06-06 11:56:04 +00:00
parent 3e40eaf0cb
commit 19d40a028b
3 changed files with 21 additions and 3 deletions

View File

@ -1177,9 +1177,16 @@ class ajaxfelamimail
return $response->getXML();
}
function refreshMessageList()
function refreshMessageList($folderTypeToCheckIfActive=null)
{
return $this->generateMessageList($this->sessionData['mailbox'],0,$listOnly=true);
if ($this->_debug) error_log(__METHOD__.__LINE__.array2string($folderTypeToCheckIfActive));
$mailboxToCheck = $this->sessionData['mailbox'];
if (!is_null($folderTypeToCheckIfActive))
{
if ($folderTypeToCheckIfActive=='Draft') $mailboxToCheck = $this->bofelamimail->getDraftFolder();
if ($folderTypeToCheckIfActive=='Template') $mailboxToCheck = $this->bofelamimail->getTemplateFolder();
}
if ($this->sessionData['mailbox']==$mailboxToCheck) return $this->generateMessageList($this->sessionData['mailbox'],0,$listOnly=true);
}
function refreshFolder($injectIntoResponse = false)

View File

@ -93,7 +93,12 @@ function checkunload(checkBrowser)
return checkBrowser;
}
}
if (do_onunload) xajax_doXMLHTTPsync('felamimail.ajaxfelamimail.removeLastDraftedVersion',composeID);
if (do_onunload)
{
xajax_doXMLHTTPsync('felamimail.ajaxfelamimail.removeLastDraftedVersion',composeID);
// try triggering refresh of draftFolder
if (typeof window.opener.refreshDraftFolderIfActive =='function') window.opener.refreshDraftFolderIfActive();
}
}
function fm_startTimerSaveAsDraft(_refreshTimeOut) {
@ -151,6 +156,8 @@ function fm_compose_saveAsDraftBG(autoSave)
do_onunload=true;
justSavedAsDraftManually = false;
}
// try triggering refresh of draftFolder
if (typeof window.opener.refreshDraftFolderIfActive =='function') window.opener.refreshDraftFolderIfActive();
}
function addEmail(to,email)

View File

@ -1001,6 +1001,10 @@ function refresh() {
egw_appWindow('felamimail').xajax_doXMLHTTP('felamimail.ajaxfelamimail.refreshMessageList');
}
function refreshDraftFolderIfActive() {
egw_appWindow('felamimail').xajax_doXMLHTTP('felamimail.ajaxfelamimail.refreshMessageList','Draft');
}
function refreshFolderStatus(_nodeID,mode) {
var nodeToRefresh = 0;
var mode2use = "none";