From 8009e300864840b4f1119b59656b3026f2e4a028 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 2 Aug 2011 15:39:59 +0000 Subject: [PATCH] * eMail: fix refresh behavior, regarding the reading of an eMail in previewMessageArea; timed refresh of Message list, now only refreshes the messageList Area, not the preview area; fix reload behavior on MailDeletion in preview mode (click on delete Icon within previewArea) --- felamimail/inc/class.ajaxfelamimail.inc.php | 9 ++++++--- felamimail/inc/class.uiwidgets.inc.php | 4 ++-- felamimail/js/jscode/viewMainScreen.js | 1 - 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/felamimail/inc/class.ajaxfelamimail.inc.php b/felamimail/inc/class.ajaxfelamimail.inc.php index 92749fe806..32bed4a42c 100644 --- a/felamimail/inc/class.ajaxfelamimail.inc.php +++ b/felamimail/inc/class.ajaxfelamimail.inc.php @@ -497,7 +497,7 @@ class ajaxfelamimail } - function generateMessageList($_folderName,$modifyoffset=0) + function generateMessageList($_folderName,$modifyoffset=0,$listOnly=false) { if($this->_debug) error_log("ajaxfelamimail::generateMessageList with $_folderName,$modifyoffset".function_backtrace()); $response = new xajaxResponse(); @@ -505,6 +505,9 @@ class ajaxfelamimail $response->addScript("activeServerID=".$this->imapServerID.";"); $response->addScript("activeFolder = \"".$_folderName."\";"); $response->addScript("activeFolderB64 = \"".base64_encode($_folderName)."\";"); + $sentFolder = $this->bofelamimail->getSentFolder(false); + $response->addScript("sentFolder = \"".($sentFolder?$sentFolder:'')."\";"); + $response->addScript("sentFolderB64 = \"".($sentFolder?base64_encode($sentFolder):'')."\";"); $draftFolder = $this->bofelamimail->getDraftFolder(false); $response->addScript("draftFolder = \"".($draftFolder?$draftFolder:'')."\";"); $response->addScript("draftFolderB64 = \"".($draftFolder?base64_encode($draftFolder):'')."\";"); @@ -599,7 +602,7 @@ class ajaxfelamimail $response->addAssign("messageCounter", "innerHTML", ''.$shortName.': '.lang('Viewing messages').($maxMessages>0?" $firstMessage - $lastMessage":"")." ($totalMessage ".lang("total").')'); } - $response->addAssign("divMessageList", "innerHTML", $headerJs.$headerTable); + $response->addAssign("divMessage".($listOnly?'Table':'')."List", "innerHTML", $headerJs.$headerTable); $response->addAssign("skriptGridOnFirstLoad","innerHTML",""); if($quota = $this->bofelamimail->getQuotaRoot()) { @@ -932,7 +935,7 @@ class ajaxfelamimail function refreshMessageList() { - return $this->generateMessageList($this->sessionData['mailbox']); + return $this->generateMessageList($this->sessionData['mailbox'],0,$listOnly=true); } function refreshFolder($injectIntoResponse = false) diff --git a/felamimail/inc/class.uiwidgets.inc.php b/felamimail/inc/class.uiwidgets.inc.php index 54cf0bacfb..9c9e98b605 100644 --- a/felamimail/inc/class.uiwidgets.inc.php +++ b/felamimail/inc/class.uiwidgets.inc.php @@ -1596,8 +1596,8 @@ $j(document).ready(function() { 'action' => ($_forceNewWindow ? "window.open('$deleteURL','_blank','dependent=yes,width=100,height=100,toolbar=no,scrollbars=no,status=no')": "window.location.href = '$deleteURL'"), 'tooltip' => ($_headerData['deleted']?lang('undelete'):lang('delete')), ), - 'delete' => array( - 'action' => ($_forceNewWindow ? "window.open('$deleteURL','_blank','dependent=yes,width=100,height=100,toolbar=no,scrollbars=no,status=no')": "window.location.href = '$deleteURL'"), + 'delete' => array(// json_encode(array('msg'=>array($_headerData['uid']))) may be used for {msg:[".$_headerData['uid']."]} + 'action' => ($_forceNewWindow ? "mail_deleteMessages({msg:[".$_headerData['uid']."]});": "window.location.href = '$deleteURL'"), 'tooltip' => ($_headerData['deleted']?lang('undelete'):lang('delete')), ), ); diff --git a/felamimail/js/jscode/viewMainScreen.js b/felamimail/js/jscode/viewMainScreen.js index 5e7721eb5a..2709d05068 100644 --- a/felamimail/js/jscode/viewMainScreen.js +++ b/felamimail/js/jscode/viewMainScreen.js @@ -760,7 +760,6 @@ var searchesPending=0; function refresh() { //searchesPending++; //document.title=searchesPending; - mail_resetMessageSelect(); egw_appWindow('felamimail').xajax_doXMLHTTP('felamimail.ajaxfelamimail.refreshMessageList'); }