diff --git a/api/js/egw_action/egw_action.js b/api/js/egw_action/egw_action.js index fefd94268d..ec74d35272 100644 --- a/api/js/egw_action/egw_action.js +++ b/api/js/egw_action/egw_action.js @@ -26,7 +26,8 @@ import { EGW_KEY_PAGE_DOWN, EGW_AO_EXEC_THIS, EGW_AO_EXEC_SELECTED, - EGW_KEY_A, EGW_KEY_SPACE + EGW_KEY_A, EGW_KEY_SPACE, + EGW_AO_FLAG_DEFAULT_FOCUS } from './egw_action_constants.js'; import {egwFnct, egwActionStoreJSON, egwBitIsSet, egwQueueCallback, egwSetBit, egwObjectLength} from './egw_action_common.js'; import './egw_action_popup.js'; @@ -2528,3 +2529,17 @@ export function egwActionObjectManager(_id, _manager) return ao; } + +// make some functions available globally for old eTemplate apps like KnowledgeBase +if (typeof window.egw_getActionManager === 'undefined') +{ + window.egw_globalObjectManager = egw_globalObjectManager; + window.egw_getActionManager = egw_getActionManager; + window.egw_getObjectManager = egw_getObjectManager; + window.egwActionObjectManager = egwActionObjectManager; + window.egwActionObjectInterface = egwActionObjectInterface; + window.EGW_AO_FLAG_DEFAULT_FOCUS = EGW_AO_FLAG_DEFAULT_FOCUS; + window.EGW_AO_STATE_SELECTED = EGW_AO_STATE_SELECTED; + window.EGW_AO_SHIFT_STATE_MULTI = EGW_AO_SHIFT_STATE_MULTI; + window.EGW_AO_STATE_FOCUSED = EGW_AO_STATE_FOCUSED; +} \ No newline at end of file diff --git a/api/js/egw_action/egw_action_common.js b/api/js/egw_action/egw_action_common.js index ea45b11b13..d1b8bb27af 100644 --- a/api/js/egw_action/egw_action_common.js +++ b/api/js/egw_action/egw_action_common.js @@ -517,4 +517,11 @@ export function sprintf() { f = f.substring(m[0].length); } return o.join(''); +} +// make some functions global for old eTemplate apps like KnowledgeBase +if (typeof window.egwPreventSelect === 'undefined') +{ + window.egwPreventSelect = egwPreventSelect; + window.egwBitIsSet = egwBitIsSet; + window.egwUnfocus = egwUnfocus; } \ No newline at end of file diff --git a/api/js/egw_action/egw_action_popup.js b/api/js/egw_action/egw_action_popup.js index 29950e5de7..d9e0d6bc79 100644 --- a/api/js/egw_action/egw_action_popup.js +++ b/api/js/egw_action/egw_action_popup.js @@ -18,7 +18,7 @@ import {egwAction, egwActionImplementation, egwActionObject} from './egw_action. import {egwFnct} from './egw_action_common.js'; import {egwMenu, _egw_active_menu} from "./egw_menu.js"; import {EGW_KEY_ENTER, EGW_KEY_MENU} from "./egw_action_constants.js"; -import {tapAndSwipe} from "../tapandswipe"; +import {tapAndSwipe} from "../tapandswipe.js"; if (typeof window._egwActionClasses == "undefined") window._egwActionClasses = {}; diff --git a/api/js/tapandswipe.js b/api/js/tapandswipe.js new file mode 100644 index 0000000000..54ae972bf4 --- /dev/null +++ b/api/js/tapandswipe.js @@ -0,0 +1,2 @@ +// dummy to get egw_actions work with old eTemplate, 23.1+ plus uses the complied TS file +export function tapAndSwipe() {} \ No newline at end of file