From 0dd7616c5ea432e6a5cc5966cd33beaf9df1e739 Mon Sep 17 00:00:00 2001 From: Milan Date: Thu, 20 Jul 2023 16:40:22 +0200 Subject: [PATCH] egw_action copy fixes regarding ticket 84314 --- addressbook/js/app.ts | 2 +- api/js/egw_action/egw_action_common.ts | 9 ++++++++- filemanager/js/filemanager.ts | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addressbook/js/app.ts b/addressbook/js/app.ts index 376ba9478d..ba2040a157 100644 --- a/addressbook/js/app.ts +++ b/addressbook/js/app.ts @@ -836,7 +836,7 @@ class AddressbookApp extends EgwApp id, values.name ); - action.setDefaultExecute(action.parent.onExecute.fnct); + action.setDefaultExecute(action.parent.onExecute.functionToPerform); action.updateAction({group: 1}); } } diff --git a/api/js/egw_action/egw_action_common.ts b/api/js/egw_action/egw_action_common.ts index 459804b7bb..fa8bfd7a2d 100755 --- a/api/js/egw_action/egw_action_common.ts +++ b/api/js/egw_action/egw_action_common.ts @@ -283,7 +283,14 @@ export class EgwFnct { private readonly context: any; private readonly acceptedTypes: string[]; - functionToPerform; + functionToPerform:Function; + + /** + * @deprecated please use functionToPerform instead + */ + public get fnct(){ + return this.functionToPerform + } private value; // Flag for if this action is using a default handler // I don't think this is ever used @unused diff --git a/filemanager/js/filemanager.ts b/filemanager/js/filemanager.ts index c46ee860eb..4eabd9679f 100644 --- a/filemanager/js/filemanager.ts +++ b/filemanager/js/filemanager.ts @@ -1116,7 +1116,7 @@ export class filemanagerAPP extends EgwApp let clipboard = JSON.parse(egw.getSessionItem('phpgwapi', 'egw_clipboard')); // Set a flag so apps can tell the difference, if they need to - action.set_onExecute(action.parent.onExecute.fnct); + action.set_onExecute(action.parent.onExecute.functionToPerform); action.execute(clipboard.selected,selected[0]); // Clear the clipboard, the files are not there anymore