mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Some UI improvements
- call delete async, server can notify of failure - Immediately delete row for fast feedback - leave preview open, nextmatch will select next row
This commit is contained in:
parent
344a63b37c
commit
f0c46ad6f8
@ -928,9 +928,17 @@ app.classes.mail = AppJS.extend(
|
|||||||
*/
|
*/
|
||||||
mail_deleteMessages: function(_msg,_action,_calledFromPopup)
|
mail_deleteMessages: function(_msg,_action,_calledFromPopup)
|
||||||
{
|
{
|
||||||
egw_message(this.egw.lang('delete messages'));
|
// Tell server
|
||||||
egw.json('mail.mail_ui.ajax_deleteMessages',[_msg,(typeof _action == 'undefined'?'no':_action)])
|
egw.json('mail.mail_ui.ajax_deleteMessages',[_msg,(typeof _action == 'undefined'?'no':_action)])
|
||||||
.sendRequest();
|
.sendRequest(true);
|
||||||
|
|
||||||
|
// Update list
|
||||||
|
var ids = [];
|
||||||
|
for (var i = 0; i < _msg['msg'].length; i++)
|
||||||
|
{
|
||||||
|
ids.push(_msg['msg'][i].replace(/mail::/,''));
|
||||||
|
}
|
||||||
|
egw_refresh(this.egw.lang('delete messages'),'mail',ids,'delete');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -940,15 +948,7 @@ app.classes.mail = AppJS.extend(
|
|||||||
*/
|
*/
|
||||||
mail_deleteMessagesShowResult: function(_msg)
|
mail_deleteMessagesShowResult: function(_msg)
|
||||||
{
|
{
|
||||||
var myMessage = _msg['egw_message'];
|
egw_message(_msg['egw_message']);
|
||||||
for (var i = 0; i < _msg['msg'].length; i++)
|
|
||||||
{
|
|
||||||
egw_refresh(myMessage,'mail',_msg['msg'][i].replace(/mail::/,''),'delete');
|
|
||||||
egw.dataDeleteUID(_msg['msg'][i]);
|
|
||||||
}
|
|
||||||
//this.mail_refreshMessageGrid(_calledFromPopup);
|
|
||||||
|
|
||||||
this.mail_preview();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user