mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Mail folder management dialog:
- Fix folder refresh on both index and folderMgmt trees
This commit is contained in:
parent
40e0a2b705
commit
fb6d06e322
@ -4641,13 +4641,14 @@ class mail_ui
|
||||
{
|
||||
$success = $this->ajax_deleteFolder($_folderName,true);
|
||||
$response = egw_json_response::get();
|
||||
list(,$folderName) = explode(self::$delimiter, $_folderName);
|
||||
if ($success)
|
||||
{
|
||||
$res = $_folderName;
|
||||
$res = $folderName;
|
||||
}
|
||||
else
|
||||
{
|
||||
$res = lang("Failed to delete %1",$_folderName);
|
||||
$res = lang("Failed to delete %1",$folderName);
|
||||
}
|
||||
$response->data($res);
|
||||
}
|
||||
|
@ -4963,12 +4963,10 @@ app.classes.mail = AppJS.extend(
|
||||
* Detele button handler
|
||||
* triggers longTask dialog and send delete operation url
|
||||
*
|
||||
* @param {egw object} _egw egw object
|
||||
* @param {widget object} _widget button widget
|
||||
*/
|
||||
folderMgmt_deleteBtn: function (_egw, _widget)
|
||||
folderMgmt_deleteBtn: function ()
|
||||
{
|
||||
var tree = this.et2.getWidgetById('tree');
|
||||
var tree = etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('tree');
|
||||
var menuaction= 'mail.mail_ui.ajax_folderMgmt_delete';
|
||||
|
||||
if (tree)
|
||||
@ -4983,14 +4981,16 @@ app.classes.mail = AppJS.extend(
|
||||
if (_val && _resp.type !== 'error')
|
||||
{
|
||||
var stat = [];
|
||||
var tree = etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('tree');
|
||||
|
||||
// delete the item in folderMgmt dialog
|
||||
if (tree) tree.deleteItem(_resp, false);
|
||||
|
||||
stat[_resp] = _resp;
|
||||
var folderName = '';
|
||||
for(var i=0;i<selFldArr.length;i++)
|
||||
{
|
||||
folderName = selFldArr[i].split('::');
|
||||
stat[selFldArr[i]] = folderName[1];
|
||||
}
|
||||
// delete the item from index folderTree
|
||||
egw.window.app.mail.mail_removeLeaf(stat);
|
||||
// submit
|
||||
etemplate2.getByApplication('mail')[0].widgetContainer._inst.submit();
|
||||
}
|
||||
}, msg, 'Deleting folders', menuaction, selFldArr, 'mail');
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user