From 748eb1ea2f8d4ba432bc572fe868dad5d5eec6ef Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 7 Jan 2016 11:12:32 +0000 Subject: [PATCH] Implement progress indicator for mail folders d-n-d --- mail/js/app.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index aca0b7d77c..7a6a0fd671 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -3142,16 +3142,19 @@ app.classes.mail = AppJS.extend( egw.debug('warn', "Move folder, but no target"); return; } - // Some UI feedback while the folder is moved - using just the iface DOMNode would - // put the load image in every row - var load_node = $j(destination.iface.getDOMNode()).closest('td').prev() - .addClass('loading'); - + var ftree = this.et2.getWidgetById(this.nm_index+'[foldertree]'); + egw.message (egw.lang('Folder %1 is moving to folder %2',_senders[0].id, destination.id)); + egw.loading_prompt('mail_moveFolder', true,'','#egw_fw_basecontainer'); for(var i = 0; i < _senders.length; i++) { egw.jsonq('mail.mail_ui.ajax_MoveFolder',[_senders[i].id, destination.id], // Move is done (successfully or not), remove loading - function() {load_node.removeClass('loading');} + function() { + var id = destination.id.split('::'); + //refersh the top parent + ftree.refreshItem(id[0],null); + egw.loading_prompt('mail_moveFolder', false); + } ); } },