mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Ask the right app when getting appObjectManager, appname might not always be the current app (e.g. running app content under admin tab)
This commit is contained in:
parent
bfbacede85
commit
25641d33e1
3
api/js/egw_action/egw_action.d.ts
vendored
3
api/js/egw_action/egw_action.d.ts
vendored
@ -44,9 +44,10 @@ declare function egw_getObjectManager(_id: any, _create?: boolean, _search_depth
|
||||
* Returns the object manager for the current application
|
||||
*
|
||||
* @param {boolean} _create
|
||||
* @param {string} _appName
|
||||
* @return {egwActionObjectManager}
|
||||
*/
|
||||
declare function egw_getAppObjectManager(_create?: boolean): typeof egwActionObjectManager;
|
||||
declare function egw_getAppObjectManager(_create?: boolean, _appName?: string): typeof egwActionObjectManager;
|
||||
/**
|
||||
* Returns the action manager for the current application
|
||||
*
|
||||
|
@ -103,10 +103,11 @@ function egw_getObjectManager(_id, _create, _search_depth) {
|
||||
* Returns the object manager for the current application
|
||||
*
|
||||
* @param {boolean} _create
|
||||
* @param {string} _appName //appname might not always be the current app, e.g. running app content under admin tab
|
||||
* @return {egwActionObjectManager}
|
||||
*/
|
||||
function egw_getAppObjectManager(_create) {
|
||||
return egw_getObjectManager(egw_getAppName(), _create,1);
|
||||
function egw_getAppObjectManager(_create, _appName) {
|
||||
return egw_getObjectManager(_appName ?? egw_getAppName(), _create,1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -734,8 +734,9 @@ var et2_grid = /** @class */ (function (_super) {
|
||||
*/
|
||||
et2_grid.prototype._link_actions = function (actions) {
|
||||
// Get the top level element for the tree
|
||||
// get appObjectManager for the actual app, it might not always be the current app(e.g. running app content under admin tab)
|
||||
// @ts-ignore
|
||||
var objectManager = window.egw_getAppObjectManager(true);
|
||||
var objectManager = window.egw_getAppObjectManager(true, this.getInstanceManager().app);
|
||||
objectManager = objectManager.getObjectById(this.getInstanceManager().uniqueId, 2) || objectManager;
|
||||
var widget_object = objectManager.getObjectById(this.id);
|
||||
if (widget_object == null) {
|
||||
|
@ -998,8 +998,9 @@ export class et2_grid extends et2_DOMWidget implements et2_IDetachedDOM, et2_IAl
|
||||
_link_actions(actions : object[])
|
||||
{
|
||||
// Get the top level element for the tree
|
||||
// get appObjectManager for the actual app, it might not always be the current app(e.g. running app content under admin tab)
|
||||
// @ts-ignore
|
||||
let objectManager = window.egw_getAppObjectManager(true);
|
||||
let objectManager = window.egw_getAppObjectManager(true, this.getInstanceManager().app);
|
||||
objectManager = objectManager.getObjectById(this.getInstanceManager().uniqueId,2) || objectManager;
|
||||
let widget_object = objectManager.getObjectById(this.id);
|
||||
if (widget_object == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user