mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
get importFromVFS working, when selecting vfs file via vfs dialog
This commit is contained in:
parent
0601d40bd3
commit
e7a5418af2
@ -1129,7 +1129,7 @@ class mail_bo
|
|||||||
// fetch the data for the selected messages
|
// fetch the data for the selected messages
|
||||||
if (self::$debug) $starttime = microtime(true);
|
if (self::$debug) $starttime = microtime(true);
|
||||||
//$headersNew = $this->icServer->getSummary($queryString, $rByUid);
|
//$headersNew = $this->icServer->getSummary($queryString, $rByUid);
|
||||||
$headersNew = $this->_getSummary($queryString, $rByUid);
|
$headersNew = $this->_getSummary($queryString, $rByUid,false,$_folderName);
|
||||||
if (PEAR::isError($headersNew) && empty($queryString))
|
if (PEAR::isError($headersNew) && empty($queryString))
|
||||||
{
|
{
|
||||||
$headersNew = array();
|
$headersNew = array();
|
||||||
|
@ -2706,9 +2706,16 @@ blockquote[type=cite] {
|
|||||||
return "opener.app.mail.import_closeVfsSelector('$path');";
|
return "opener.app.mail.import_closeVfsSelector('$path');";
|
||||||
}
|
}
|
||||||
|
|
||||||
function importMessageFromVFS($target, $path=null)
|
/**
|
||||||
|
* importMessage
|
||||||
|
*/
|
||||||
|
function importMessage($content=null)
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__.__LINE__.array2string(array('target'=>$target,'file'=>$path)));
|
//error_log(__METHOD__.__LINE__.$this->mail_bo->getDraftFolder());
|
||||||
|
if (isset($_REQUEST['file']) && isset($_REQUEST['folder']))
|
||||||
|
{
|
||||||
|
$path = $_REQUEST['file'];
|
||||||
|
$target = $_REQUEST['folder'];
|
||||||
$content['divImportArea']['FOLDER'][0]=$target;
|
$content['divImportArea']['FOLDER'][0]=$target;
|
||||||
$content['divImportArea']['uploadForImport'] = array(
|
$content['divImportArea']['uploadForImport'] = array(
|
||||||
'name' => egw_vfs::basename($path),
|
'name' => egw_vfs::basename($path),
|
||||||
@ -2716,19 +2723,8 @@ blockquote[type=cite] {
|
|||||||
'file' => egw_vfs::PREFIX.$path,
|
'file' => egw_vfs::PREFIX.$path,
|
||||||
'size' => filesize(egw_vfs::PREFIX.$path),
|
'size' => filesize(egw_vfs::PREFIX.$path),
|
||||||
);
|
);
|
||||||
//$this->importMessage($content);
|
|
||||||
return "window.close();";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* importMessage
|
|
||||||
*/
|
|
||||||
function importMessage($content=null)
|
|
||||||
{
|
|
||||||
//error_log(__METHOD__.__LINE__.$this->mail_bo->getDraftFolder());
|
|
||||||
error_log(__METHOD__.__LINE__.array2string($_GET));
|
|
||||||
error_log(__METHOD__.__LINE__.array2string($content));
|
|
||||||
if (!empty($content))
|
if (!empty($content))
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__.__LINE__.array2string($content));
|
//error_log(__METHOD__.__LINE__.array2string($content));
|
||||||
|
@ -1189,17 +1189,18 @@ app.mail = AppJS.extend(
|
|||||||
// names used here are assigned in app.mail.import_displayVfsSelector and class.mail_hooks.inc.php
|
// names used here are assigned in app.mail.import_displayVfsSelector and class.mail_hooks.inc.php
|
||||||
this.mail_fileSelectorWindow = window.open('','mail_import_vfsSelector');
|
this.mail_fileSelectorWindow = window.open('','mail_import_vfsSelector');
|
||||||
importMessageDialog = window.open('','importMessageDialog');
|
importMessageDialog = window.open('','importMessageDialog');
|
||||||
this.mail_fileSelectorWindow.close();
|
|
||||||
var vfsfile = importMessageDialog.app.mail.et2.getWidgetById('vfsfile');
|
var vfsfile = importMessageDialog.app.mail.et2.getWidgetById('vfsfile');
|
||||||
//console.log(vfsfile);
|
//console.log(vfsfile);
|
||||||
vfsfile.input[0].value=_ref;
|
vfsfile.input[0].value=_ref;
|
||||||
var folder = importMessageDialog.app.mail.et2.getWidgetById('FOLDER');
|
var folder = importMessageDialog.app.mail.et2.getWidgetById('FOLDER');
|
||||||
//console.log(vfsfile.input[0].value,folder.value[0]);
|
//console.log(vfsfile.input[0].value,folder.value[0]);
|
||||||
importMessageDialog.close();
|
importMessageDialog = egw().open_link(egw.link('/index.php', {
|
||||||
egw().open_link(egw.link('/index.php', {
|
|
||||||
menuaction: 'mail.mail_ui.importMessage',
|
menuaction: 'mail.mail_ui.importMessage',
|
||||||
content: {fi: vfsfile.input[0].value, fo: folder.value[0]},//represents the target where to import to
|
file: vfsfile.input[0].value,
|
||||||
}), 'mail_display', '640x580');
|
folder: folder.value[0]
|
||||||
|
}), 'importMessageDialog', '640x580');
|
||||||
|
this.mail_fileSelectorWindow.close();
|
||||||
|
importMessageDialog.focus();
|
||||||
//vfsfile._parent._parent._parent.parentNode.et2_obj.submit();
|
//vfsfile._parent._parent._parent.parentNode.et2_obj.submit();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user