changes to get old eTemplate apps like KnowledgeBase working in 23.1

makes some more symbols global again in one block at the end of the files
This commit is contained in:
ralf 2023-02-09 14:17:08 +01:00
parent 6d9c31d6be
commit d816d837cd
4 changed files with 26 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 = {};

2
api/js/tapandswipe.js Normal file
View File

@ -0,0 +1,2 @@
// dummy to get egw_actions work with old eTemplate, 23.1+ plus uses the complied TS file
export function tapAndSwipe() {}