mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 06:59:46 +01:00
make mailattachments of type message/rfc822 clickable on compose
This commit is contained in:
parent
6c8c58f5c6
commit
7c28c6c016
@ -3999,7 +3999,7 @@ class mail_bo
|
|||||||
//error_log(__METHOD__.__LINE__.":$_uid,$_partID,$decode,$_folder".function_backtrace());
|
//error_log(__METHOD__.__LINE__.":$_uid,$_partID,$decode,$_folder".function_backtrace());
|
||||||
if (empty($_folder)) $_folder = ($this->sessionData['mailbox']? $this->sessionData['mailbox'] : $this->icServer->getCurrentMailbox());
|
if (empty($_folder)) $_folder = ($this->sessionData['mailbox']? $this->sessionData['mailbox'] : $this->icServer->getCurrentMailbox());
|
||||||
//error_log(__METHOD__.__LINE__.":$_uid,$_partID,$decode,$_folder");
|
//error_log(__METHOD__.__LINE__.":$_uid,$_partID,$decode,$_folder");
|
||||||
if(empty($_partID)) {
|
if(empty($_partID)||$_partID=='null') {
|
||||||
$uidsToFetch = new Horde_Imap_Client_Ids();
|
$uidsToFetch = new Horde_Imap_Client_Ids();
|
||||||
if (!(is_object($_uid) || is_array($_uid))) $_uid = (array)$_uid;
|
if (!(is_object($_uid) || is_array($_uid))) $_uid = (array)$_uid;
|
||||||
$uidsToFetch->add($_uid);
|
$uidsToFetch->add($_uid);
|
||||||
|
@ -328,6 +328,9 @@ class mail_compose
|
|||||||
$keysToDelete = array();
|
$keysToDelete = array();
|
||||||
if (!empty($_content['attachments']['delete']))
|
if (!empty($_content['attachments']['delete']))
|
||||||
{
|
{
|
||||||
|
//error_log(__METHOD__.__LINE__.':'.array2string($_content['attachments']));
|
||||||
|
//error_log(__METHOD__.__LINE__.':'.array2string($_content['attachments']['delete']));
|
||||||
|
|
||||||
$suppressSigOnTop = true;
|
$suppressSigOnTop = true;
|
||||||
$toDelete = $_content['attachments']['delete'];
|
$toDelete = $_content['attachments']['delete'];
|
||||||
unset($_content['attachments']['delete']);
|
unset($_content['attachments']['delete']);
|
||||||
@ -1723,7 +1726,8 @@ class mail_compose
|
|||||||
'name' => $_name,
|
'name' => $_name,
|
||||||
'type' => $_type,
|
'type' => $_type,
|
||||||
'size' => $_size,
|
'size' => $_size,
|
||||||
'folder' => $_folder
|
'folder' => $_folder,
|
||||||
|
'tmp_name' => mail_ui::generateRowID($this->mail_bo->profileID, $_folder, $_uid),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1735,7 +1739,7 @@ class mail_compose
|
|||||||
//if(isset($_GET['size'])) $attachment['size'] = $_GET['size'];
|
//if(isset($_GET['size'])) $attachment['size'] = $_GET['size'];
|
||||||
if(isset($_GET['type'])) $attachment['type'] = $_GET['type'];
|
if(isset($_GET['type'])) $attachment['type'] = $_GET['type'];
|
||||||
|
|
||||||
error_log(__METHOD__.__LINE__.array2string($_GET));
|
//error_log(__METHOD__.__LINE__.array2string($_GET));
|
||||||
if (isset($attachment['filename']) && parse_url($attachment['filename'],PHP_URL_SCHEME) == 'vfs')
|
if (isset($attachment['filename']) && parse_url($attachment['filename'],PHP_URL_SCHEME) == 'vfs')
|
||||||
{
|
{
|
||||||
egw_vfs::load_wrapper('vfs');
|
egw_vfs::load_wrapper('vfs');
|
||||||
|
@ -1443,8 +1443,18 @@ app.classes.mail = AppJS.extend(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// CALLED FOR COMPOSE; processedmail_id could hold several IDs seperated by comma
|
||||||
attgrid = this.et2.getArrayMgr("content").getEntry('attachments')[widget.id.replace(/\[name\]/,'')];
|
attgrid = this.et2.getArrayMgr("content").getEntry('attachments')[widget.id.replace(/\[name\]/,'')];
|
||||||
mailid = this.et2.getArrayMgr("content").getEntry('processedmail_id');
|
var mailids = this.et2.getArrayMgr("content").getEntry('processedmail_id');
|
||||||
|
var mailida = mailids.split(',');
|
||||||
|
mailid = mailida[widget.id.replace(/\[name\]/,'')];
|
||||||
|
if (typeof attgrid.uid != 'undefined' && attgrid.uid && mailid.indexOf(attgrid.uid)==-1)
|
||||||
|
{
|
||||||
|
for (i=0; i<mailida.length; i++)
|
||||||
|
{
|
||||||
|
if (mailida[i].indexOf('::'+attgrid.uid)>-1) mailid = mailida[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//console.log(mailid,attgrid.partID,attgrid.filename,attgrid.mimetype);
|
//console.log(mailid,attgrid.partID,attgrid.filename,attgrid.mimetype);
|
||||||
var url = window.egw_webserverUrl+'/index.php?';
|
var url = window.egw_webserverUrl+'/index.php?';
|
||||||
@ -1539,7 +1549,7 @@ app.classes.mail = AppJS.extend(
|
|||||||
var attgrid;
|
var attgrid;
|
||||||
attgrid = this.et2.getArrayMgr("content").getEntry('attachments')[widget.id.replace(/\[name\]/,'')];
|
attgrid = this.et2.getArrayMgr("content").getEntry('attachments')[widget.id.replace(/\[name\]/,'')];
|
||||||
//console.log(attgrid);
|
//console.log(attgrid);
|
||||||
if (attgrid.uid && attgrid.partID)
|
if (attgrid.uid && (attgrid.partID||attgrid.folder))
|
||||||
{
|
{
|
||||||
this.displayAttachment(tag_info, widget, true);
|
this.displayAttachment(tag_info, widget, true);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user