mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Fix CRM view did not add new infolog entries on push
This commit is contained in:
parent
cd20749ca0
commit
29b22e336e
@ -580,9 +580,10 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
|||||||
if (type === void 0) { type = "add"; }
|
if (type === void 0) { type = "add"; }
|
||||||
var index = 0;
|
var index = 0;
|
||||||
var appname = this._get_appname();
|
var appname = this._get_appname();
|
||||||
if (appname && this.egw().window.app[appname] && typeof this.egw().window.app[appname].nm_refresh_index == "function") {
|
var app_obj = this.getInstanceManager().app_obj[appname] || this.egw().window.app[appname];
|
||||||
|
if (appname && app_obj && typeof app_obj.nm_refresh_index == "function") {
|
||||||
var sort = Object.values(this.controller._indexMap).map(function (e) { return ({ index: e.idx, uid: e.uid }); });
|
var sort = Object.values(this.controller._indexMap).map(function (e) { return ({ index: e.idx, uid: e.uid }); });
|
||||||
index = this.egw().window.app[appname].nm_refresh_index(this, uid, sort, type);
|
index = this.getInstanceManager().app_obj[appname].nm_refresh_index(this, uid, sort, type);
|
||||||
}
|
}
|
||||||
// App cancelled the add
|
// App cancelled the add
|
||||||
if (index === false) {
|
if (index === false) {
|
||||||
|
@ -863,10 +863,11 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
|||||||
{
|
{
|
||||||
let index : boolean | number = 0;
|
let index : boolean | number = 0;
|
||||||
let appname = this._get_appname();
|
let appname = this._get_appname();
|
||||||
if(appname && this.egw().window.app[appname] && typeof this.egw().window.app[appname].nm_refresh_index == "function")
|
let app_obj = this.getInstanceManager().app_obj[appname] || this.egw().window.app[appname];
|
||||||
|
if(appname && app_obj && typeof app_obj.nm_refresh_index == "function")
|
||||||
{
|
{
|
||||||
let sort = Object.values(this.controller._indexMap).map(e => ({index:e.idx, uid:e.uid}));
|
let sort = Object.values(this.controller._indexMap).map(e => ({index:e.idx, uid:e.uid}));
|
||||||
index = this.egw().window.app[appname].nm_refresh_index(this, uid, sort, type)
|
index = this.getInstanceManager().app_obj[appname].nm_refresh_index(this, uid, sort, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
// App cancelled the add
|
// App cancelled the add
|
||||||
|
@ -605,6 +605,10 @@ var et2_nextmatch_controller = /** @class */ (function (_super) {
|
|||||||
this.egw.dataFetch(this._widget.getInstanceManager().etemplate_exec_id || this._execId, _queriedRange, obj._filters, this._widgetId, _callback, _context);
|
this.egw.dataFetch(this._widget.getInstanceManager().etemplate_exec_id || this._execId, _queriedRange, obj._filters, this._widgetId, _callback, _context);
|
||||||
};
|
};
|
||||||
et2_nextmatch_controller.prototype.dataRegisterUID = function (_uid, _callback, _context) {
|
et2_nextmatch_controller.prototype.dataRegisterUID = function (_uid, _callback, _context) {
|
||||||
|
// Make sure we use correct prefix when data comes back
|
||||||
|
if (this._widget && this._widget._get_appname() != this.egw.getAppName()) {
|
||||||
|
_context.prefix = _uid.split('::')[0];
|
||||||
|
}
|
||||||
this.egw.dataRegisterUID(_uid, _callback, _context, this._widget.getInstanceManager().etemplate_exec_id || this._execId, this._widgetId);
|
this.egw.dataRegisterUID(_uid, _callback, _context, this._widget.getInstanceManager().etemplate_exec_id || this._execId, this._widgetId);
|
||||||
};
|
};
|
||||||
et2_nextmatch_controller.prototype.dataUnregisterUID = function () {
|
et2_nextmatch_controller.prototype.dataUnregisterUID = function () {
|
||||||
|
@ -755,6 +755,11 @@ export class et2_nextmatch_controller extends et2_dataview_controller implements
|
|||||||
|
|
||||||
dataRegisterUID( _uid, _callback, _context)
|
dataRegisterUID( _uid, _callback, _context)
|
||||||
{
|
{
|
||||||
|
// Make sure we use correct prefix when data comes back
|
||||||
|
if(this._widget && this._widget._get_appname() != this.egw.getAppName())
|
||||||
|
{
|
||||||
|
_context.prefix = _uid.split('::')[0];
|
||||||
|
}
|
||||||
this.egw.dataRegisterUID(_uid, _callback, _context,
|
this.egw.dataRegisterUID(_uid, _callback, _context,
|
||||||
this._widget.getInstanceManager().etemplate_exec_id || this._execId,
|
this._widget.getInstanceManager().etemplate_exec_id || this._execId,
|
||||||
this._widgetId
|
this._widgetId
|
||||||
|
@ -353,6 +353,14 @@ class infolog_ui
|
|||||||
$links['linked'] = array();
|
$links['linked'] = array();
|
||||||
unset($query['col_filter']['linked']);
|
unset($query['col_filter']['linked']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Querying for a particular ID. If linked is a list of IDs, reset the linked or we won't find the ID we want.
|
||||||
|
if($query['col_filter']['info_id'] && $link_filters['linked'] && !$link_filters['linked']['app'])
|
||||||
|
{
|
||||||
|
unset($links['linked']);
|
||||||
|
unset($link_filters['linked']);
|
||||||
|
}
|
||||||
|
|
||||||
if($query['action'] && in_array($query['action'], array_keys($GLOBALS['egw_info']['apps'])) && $query['action_id'])
|
if($query['action'] && in_array($query['action'], array_keys($GLOBALS['egw_info']['apps'])) && $query['action_id'])
|
||||||
{
|
{
|
||||||
$link_filters['action'] = array('app'=>$query['action'], 'id' => $query['action_id']);
|
$link_filters['action'] = array('app'=>$query['action'], 'id' => $query['action_id']);
|
||||||
@ -592,6 +600,10 @@ class infolog_ui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($query['col_filter']['info_id'])
|
||||||
|
{
|
||||||
|
$links['info_id'] = $query['col_filter']['info_id'];
|
||||||
|
}
|
||||||
if(count($links))
|
if(count($links))
|
||||||
{
|
{
|
||||||
$query['col_filter']['info_id'] = count($links) > 1 ? call_user_func_array('array_intersect', $links) : $links[$key];
|
$query['col_filter']['info_id'] = count($links) > 1 ? call_user_func_array('array_intersect', $links) : $links[$key];
|
||||||
|
Loading…
Reference in New Issue
Block a user