mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
unset moved / deleted message store to control preview area
This commit is contained in:
parent
42fd3fe37b
commit
0749b41b29
@ -2120,7 +2120,8 @@ blockquote[type=cite] {
|
||||
function loadEmailBody($_messageID=null)
|
||||
{
|
||||
if (!$_messageID) $_messageID = $_GET['_messageID'];
|
||||
if(mail_bo::$debug); error_log(__METHOD__."->".$_flag.':'.print_r($_messageID,true));
|
||||
if(mail_bo::$debug) error_log(__METHOD__."->".$_flag.':'.print_r($_messageID,true));
|
||||
if (empty($_messageID)) return "";
|
||||
$uidA = self::splitRowID($_messageID);
|
||||
$folder = $uidA['folder']; // all messages in one set are supposed to be within the same folder
|
||||
$messageID = $uidA['msgUID'];
|
||||
|
@ -64,11 +64,18 @@ app.mail = AppJS.extend(
|
||||
var _id = selected[0];
|
||||
dataElem = egw.dataGetUIDdata(_id);
|
||||
}
|
||||
else
|
||||
if(typeof selected == 'undefined' || selected.length == 0 || typeof dataElem =='undefined')
|
||||
{
|
||||
var subject ="";
|
||||
etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('previewFromAddress').set_value("");
|
||||
etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('previewToAddress').set_value("");
|
||||
etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('previewDate').set_value("");
|
||||
etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('previewSubject').set_value("");
|
||||
var IframeHandle = etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('messageIFRAME');
|
||||
IframeHandle.set_src(egw.link('/index.php',{menuaction:'mail.mail_ui.loadEmailBody',_messageID:""}));
|
||||
return;
|
||||
}
|
||||
console.log("mail_preview",dataElem);
|
||||
//console.log("mail_preview",dataElem);
|
||||
var subject =dataElem.data.subject;
|
||||
etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('previewFromAddress').set_value(dataElem.data.fromaddress);
|
||||
etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('previewToAddress').set_value(dataElem.data.toaddress);
|
||||
@ -266,6 +273,7 @@ app.mail = AppJS.extend(
|
||||
this.mail_setRowClass(_elems,'deleted');
|
||||
var request = new egw_json_request('mail.mail_ui.ajax_deleteMessages',[msg]);
|
||||
request.sendRequest(false);
|
||||
for (var i = 0; i < msg['msg'].length; i++) egw.dataDeleteUID(msg['msg'][i]);
|
||||
this.mail_refreshMessageGrid();
|
||||
},
|
||||
|
||||
@ -585,6 +593,7 @@ app.mail = AppJS.extend(
|
||||
// as the "onNodeSelect" function!
|
||||
var request = new egw_json_request('mail.mail_ui.ajax_moveMessages',[target, messages]);
|
||||
request.sendRequest(false);
|
||||
for (var i = 0; i < messages['msg'].length; i++) egw.dataDeleteUID(messages['msg'][i]);
|
||||
this.mail_refreshMessageGrid();
|
||||
},
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user