Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
},
success: (data, status, xhr) => {
loader.close();
- app.dialog.alert(
- `Action '${action}' successful`,
- gettext("Info"),
- () => {
- if (action === 'delete' ||
- action === 'deliver') {
- // refresh the main list when a mail
- // got deleted or delivered
- app.ptr.refresh();
- }
- },
- );
+ PMG.Utils.showSuccessToast(`${action} successful`);
+ if (action === 'delete' || action === 'deliver') {
+ app.ptr.refresh();
+ }
reject();
},
error: xhr => {
destroyOnClose: true,
});
},
+ showSuccessToast(msg) {
+ app.toast.show({
+ text: msg,
+ closeTimeout: 2000,
+ closeButton: true,
+ destroyOnClose: true,
+ });
+ },
extractParams() {
let queryObj = app.utils.parseUrlQuery(location.search);
let mail, action, date, username, ticket;