Use correct refresh methods for delete so app can handle it

This commit is contained in:
nathangray 2020-01-23 09:21:41 -07:00
parent 2bae92f066
commit ff50df67d0
4 changed files with 29 additions and 4 deletions

View File

@ -152,7 +152,7 @@ var EgwApp = /** @class */ (function () {
EgwApp.prototype.push = function (_type, _app, _id, _data) {
// only handle delete by default, for simple case of uid === "$app::$id"
if (_type === 'delete') {
egw.dataDeleteUID(_app + '::' + _id);
egw(window).refresh('', _app, _id, "delete");
}
};
/**
@ -1636,4 +1636,3 @@ var EgwApp = /** @class */ (function () {
return EgwApp;
}());
exports.EgwApp = EgwApp;
//# sourceMappingURL=egw_app.js.map

View File

@ -225,7 +225,7 @@ export abstract class EgwApp
// only handle delete by default, for simple case of uid === "$app::$id"
if (_type === 'delete')
{
egw.dataDeleteUID(_app+'::'+_id);
egw(window).refresh('', _app, _id, "delete");
}
}

View File

@ -56,6 +56,17 @@ var TimesheetApp = /** @class */ (function (_super) {
this.filter2_change();
}
};
TimesheetApp.prototype.observer = function (_msg, _app, _id, _type, _msg_type, _links) {
switch (_app) {
case 'timesheet':
switch (_type) {
case 'delete':
egw.dataStoreUID(_app + '::' + _id, null);
break;
}
break;
}
};
/**
*
*/
@ -198,4 +209,3 @@ var TimesheetApp = /** @class */ (function (_super) {
return TimesheetApp;
}(egw_app_1.EgwApp));
app.classes.timesheet = TimesheetApp;
//# sourceMappingURL=app.js.map

View File

@ -48,6 +48,22 @@ class TimesheetApp extends EgwApp
}
}
observer(_msg, _app, _id, _type, _msg_type, _links) {
switch(_app)
{
case 'timesheet':
switch(_type)
{
case 'delete':
egw.dataStoreUID(_app + '::' + _id, null);
break;
}
break;
}
}
/**
*
*/