forked from extern/egroupware
handle flagging of message as seen explizitly on preview
This commit is contained in:
parent
3a140463e8
commit
ba7184f44f
@ -25,13 +25,14 @@ class mail_bosieve
|
||||
{
|
||||
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.'('.print_r($_vacation,true).')');
|
||||
// unset the fm_preferences session object, to force the reload/rebuild
|
||||
$GLOBALS['egw']->session->appsession('fm_preferences','felamimail',serialize(array()));
|
||||
$GLOBALS['egw']->session->appsession('session_data','emailadmin',serialize(array()));
|
||||
|
||||
$_restoreSession = false; // as in async, each call may be for a different user
|
||||
$bopreferences = CreateObject('felamimail.bopreferences',$_restoreSession);
|
||||
$mailPreferences = $bopreferences->getPreferences();
|
||||
$icServer = $mailPreferences->getIncomingServer(0);
|
||||
//$bopreferences = CreateObject('felamimail.bopreferences',$_restoreSession);
|
||||
//$mailPreferences = $bopreferences->getPreferences();
|
||||
//$icServer = $mailPreferences->getIncomingServer(0);
|
||||
$_profile_id=999999;
|
||||
$icServer = emailadmin_account::read($_profile_id)->imapServer();
|
||||
|
||||
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.'->LoginName:'.$icServer->loginName);
|
||||
//error_log(__METHOD__.__LINE__.array2string($_vacation));
|
||||
try
|
||||
|
@ -3837,12 +3837,13 @@ blockquote[type=cite] {
|
||||
*
|
||||
* @param string _flag name of the flag
|
||||
* @param array _messageList list of UID's
|
||||
* @param bool _sendJsonResponse tell fuction to send the JsonResponse
|
||||
*
|
||||
* @return xajax response
|
||||
*/
|
||||
function ajax_flagMessages($_flag, $_messageList)
|
||||
function ajax_flagMessages($_flag, $_messageList, $_sendJsonResponse=true)
|
||||
{
|
||||
if(mail_bo::$debug) error_log(__METHOD__."->".$_flag.':'.array2string($_messageList));
|
||||
if(mail_bo::$debug); error_log(__METHOD__."->".$_flag.':'.array2string($_messageList));
|
||||
if ($_messageList=='all' || !empty($_messageList['msg']))
|
||||
{
|
||||
if ($_messageList=='all')
|
||||
@ -3875,9 +3876,12 @@ blockquote[type=cite] {
|
||||
$this->saveSessionData();
|
||||
}
|
||||
*/
|
||||
if ($_sendJsonResponse)
|
||||
{
|
||||
$response = egw_json_response::get();
|
||||
$response->call('egw_message',lang('flagged %1 messages as %2 in %3',count($_messageList['msg']),lang($_flag),$folder));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* delete messages
|
||||
@ -3909,7 +3913,7 @@ blockquote[type=cite] {
|
||||
}
|
||||
try
|
||||
{
|
||||
//error_log(__METHOD__."->".print_r($messageList,true).' Method:'.$_forceDeleteMethod);
|
||||
//error_log(__METHOD__."->".print_r($messageList,true).' folder:'.$folder.' Method:'.$_forceDeleteMethod);
|
||||
$this->mail_bo->deleteMessages(($_messageList=='all' ? 'all':$messageList),$folder,(empty($_forceDeleteMethod)?'no':$_forceDeleteMethod));
|
||||
}
|
||||
catch (egw_exception $e)
|
||||
|
@ -646,7 +646,7 @@ app.classes.mail = AppJS.extend(
|
||||
// When body is requested, mail is marked as read by the mail server. Update UI to match.
|
||||
if (typeof dataElem != 'undefined' && typeof dataElem.data != 'undefined' && typeof dataElem.data.flags != 'undefined' && typeof dataElem.data.flags.read != 'undefined') dataElem.data.flags.read = 'read';
|
||||
this.mail_removeRowClass(messages,'unseen');
|
||||
|
||||
egw.jsonq('mail.mail_ui.ajax_flagMessages',['read', messages, false]);
|
||||
// Pre-load next email already so user gets it faster
|
||||
// Browser will cache the file for us
|
||||
/*
|
||||
@ -1060,8 +1060,8 @@ app.classes.mail = AppJS.extend(
|
||||
mail_compressFolder: function(action,_senders) {
|
||||
//console.log(action,_senders,FolderName);
|
||||
egw_message(this.egw.lang('compress folder'));
|
||||
egw.json('mail.mail_ui.ajax_compressFolder',[_senders[0].iface.id])
|
||||
.sendRequest(true);
|
||||
egw.jsonq('mail.mail_ui.ajax_compressFolder',[_senders[0].iface.id]);
|
||||
// .sendRequest(true);
|
||||
// since the json reply is using egw_refresh, we should not need to call refreshFolderStatus
|
||||
// as the actions thereof are now bound to run after grid refresh
|
||||
//this.mail_g();
|
||||
@ -1269,8 +1269,8 @@ app.classes.mail = AppJS.extend(
|
||||
*/
|
||||
mail_flagMessages: function(_flag, _elems,_isPopup)
|
||||
{
|
||||
egw.json('mail.mail_ui.ajax_flagMessages',[_flag, _elems])
|
||||
.sendRequest(true);
|
||||
egw.jsonq('mail.mail_ui.ajax_flagMessages',[_flag, _elems]);
|
||||
// .sendRequest(true);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user