some fixes on the TS interface of client-side api and TS conversation tool

This commit is contained in:
Ralf Becker
2020-02-09 12:27:39 +01:00
parent 46c66cc93e
commit 8dd03e3d07
4 changed files with 18 additions and 14 deletions

View File

@ -44,9 +44,6 @@ require("../etemplate/et2_types");
* // Underscore private by convention
* }
* });
*
* @class AppJS
* @augments Class
*/
var EgwApp = /** @class */ (function () {
/**
@ -263,6 +260,7 @@ var EgwApp = /** @class */ (function () {
* @return {boolean} false - Returns false to stop event propagation
*/
EgwApp.prototype.setState = function (state, template) {
var _a;
// State should be an object, not a string, but we'll parse
if (typeof state == "string") {
if (state.indexOf('{') != -1 || state == 'null') {
@ -310,7 +308,7 @@ var EgwApp = /** @class */ (function () {
url = egw.link('/index.php', jQuery.extend({ 'favorite': safe_name }, egw.link_get_registry(this.appname, 'list')));
}
// if no list try index value from application
else if (egw.app(this.appname).index) {
else if ((_a = egw.app(this.appname)) === null || _a === void 0 ? void 0 : _a.index) {
url = egw.link('/index.php', 'menuaction=' + egw.app(this.appname).index + '&favorite=' + safe_name);
}
egw.open_link(url, undefined, undefined, this.appname);