From 6a1f5393e4a5c499677fd9ffa0833a283f77d3c3 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 13 Aug 2015 11:54:50 +0000 Subject: [PATCH] Mail folder management dialog: - Add delete confirmation dialog in order to warn user --- mail/js/app.js | 52 +++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 32287a5478..064181b5d5 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -4969,33 +4969,41 @@ app.classes.mail = AppJS.extend( var tree = etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('tree'); var menuaction= 'mail.mail_ui.ajax_folderMgmt_delete'; - if (tree) + var callbackDialog = function(_btn) { - var selFolders = tree.input.getAllChecked(); - if (selFolders) + if (_btn === et2_dialog.YES_BUTTON) { - var selFldArr = selFolders.split(tree.input.dlmtr); - var msg = egw.lang('Folders deleting in progress ...'); - et2_dialog.long_task(function(_val, _resp){ - console.log(_val, _resp); - if (_val && _resp.type !== 'error') + if (tree) + { + var selFolders = tree.input.getAllChecked(); + if (selFolders) { - var stat = []; - var folderName = ''; - for(var i=0;i