Pick a better DOM node to put the loading indicator - using just the tree node from the action causes too many loading animations

This commit is contained in:
Nathan Gray 2014-01-11 12:51:45 +00:00
parent ab490eadc1
commit ef1596fd5a

View File

@ -1962,14 +1962,16 @@ app.classes.mail = AppJS.extend(
egw.debug('warn', "Move folder, but no target");
return;
}
// Some UI feedback while the folder is moved
$j(destination.iface.getDOMNode()).addClass('loading');
// 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');
for(var i = 0; i < _senders.length; i++)
{
egw.jsonq('mail.mail_ui.ajax_MoveFolder',[_senders[i].iface.id, destination.id],
// Move is done (successfully or not), remove loading
function() {$j(destination.iface.getDOMNode()).removeClass('loading');}
function() {load_node.removeClass('loading');}
);
}
},