From 583072ce9d88a3bc89f1aa7a532c19fd21b28619 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 1 Aug 2023 09:11:09 -0600 Subject: [PATCH] Fix insert multiple entries into email document failed at "Please wait ... loading" --- addressbook/js/app.ts | 7 ++++--- api/js/etemplate/Et2Dialog/Et2Dialog.ts | 5 ++--- api/js/etemplate/et2_extension_nextmatch_actions.js | 6 ++++-- api/templates/default/etemplate2.css | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/addressbook/js/app.ts b/addressbook/js/app.ts index ba2040a157..1fb2056d17 100644 --- a/addressbook/js/app.ts +++ b/addressbook/js/app.ts @@ -1125,12 +1125,13 @@ class AddressbookApp extends EgwApp var callback = function(button, value) { if(button == Et2Dialog.OK_BUTTON) { - var _action = jQuery.extend(true, {}, action); + var _action_data = jQuery.extend(true, {}, action.data); if(value.infolog) { - _action.data.menuaction += '&to_app=infolog&info_type=' + value.info_type; + _action_data.menuaction += '&to_app=infolog&info_type=' + value.info_type; + action.data = _action_data; } - nm_action(_action, selected, target); + nm_action(action, selected, target); } }; let dialog = new Et2Dialog(this.egw); diff --git a/api/js/etemplate/Et2Dialog/Et2Dialog.ts b/api/js/etemplate/Et2Dialog/Et2Dialog.ts index d4c3fd73a7..a1a792ba59 100644 --- a/api/js/etemplate/Et2Dialog/Et2Dialog.ts +++ b/api/js/etemplate/Et2Dialog/Et2Dialog.ts @@ -1357,7 +1357,6 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog)) retry.transformAttributes({ callback: function(button) { - debugger; switch(button) { case 'dialog[cancel]': @@ -1435,8 +1434,8 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog)) } // Disable cancel (it's too late), enable OK - dialog._overlayContentNode.querySelector('et2-button[button_id="' + Et2Dialog.CANCEL_BUTTON + '"]').setAttribute("disabled") - dialog._overlayContentNode.querySelector('et2-button[button_id="' + Et2Dialog.OK_BUTTON + '"]').removeAttribute("disabled") + dialog.querySelector('et2-button[button_id="' + Et2Dialog.CANCEL_BUTTON + '"]').setAttribute("disabled", "") + dialog.querySelector('et2-button[button_id="' + Et2Dialog.OK_BUTTON + '"]').removeAttribute("disabled") if(!cancel && typeof _callback == "function") { _callback.call(dialog, true, response); diff --git a/api/js/etemplate/et2_extension_nextmatch_actions.js b/api/js/etemplate/et2_extension_nextmatch_actions.js index 240743b0ff..0bcc5888a6 100644 --- a/api/js/etemplate/et2_extension_nextmatch_actions.js +++ b/api/js/etemplate/et2_extension_nextmatch_actions.js @@ -10,6 +10,8 @@ * @copyright EGroupware GmbH 2012-2021 */ +import {EgwActionManager} from "../egw_action/EgwActionManager"; + /** * Default action for nextmatch rows, runs action specified _action.data.nm_action: see nextmatch_widget::egw_actions() * @@ -83,7 +85,7 @@ export function nm_action(_action, _senders, _target, _ids) } //console.log(_action); console.log(_senders); - var mgr = _action.getManager(); + let mgr = _action instanceof EgwActionManager ? _action : _action.getManager(); var url = '#'; if (typeof _action.data.url != 'undefined') @@ -320,7 +322,7 @@ export function fetchAll(ids, nextmatch, callback) callback.call(this, idsArr); } } - },this); + }, {}); count += 200; } while (count < total) return true; diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index f2bdcc13f9..25ec88990b 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -2795,7 +2795,7 @@ table.egwGridView_outer thead tr th.noResize:hover { } .long_task .message.error { - color: white; + color: darkgray; background-image: none; }