Convert etemplate2 to typescript

This commit is contained in:
nathangray 2020-02-24 15:16:40 -07:00
parent f0392bc4e8
commit 49493a6af8
7 changed files with 2346 additions and 1322 deletions

View File

@ -299,6 +299,7 @@ var et2_container = /** @class */ (function (_super) {
};
return et2_container;
}(et2_baseWidget));
exports.et2_container = et2_container;
// Register widget for attributes, but not for any xml tags
et2_core_widget_1.et2_register_widget(et2_container, []);
/**

View File

@ -328,7 +328,7 @@ export class et2_baseWidget extends et2_DOMWidget implements et2_IAligned
/**
* Simple container object
*/
class et2_container extends et2_baseWidget
export class et2_container extends et2_baseWidget
{
/**
* Constructor

View File

@ -68,7 +68,7 @@ var et2_template = /** @class */ (function (_super) {
var template_name = parts.pop();
// Check to see if XML is known
var xml = null;
var templates = etemplate2.prototype.templates; // use global eTemplate cache
var templates = etemplate2.templates; // use global eTemplate cache
if (!(xml = templates[template_name])) {
// Check to see if ID is short form --> prepend parent/top-level name
if (template_name.indexOf('.') < 0) {

View File

@ -15,9 +15,9 @@
import './et2_core_interfaces';
import './et2_core_common';
import { et2_DOMWidget } from './et2_core_DOMWidget';
import { ClassWithAttributes } from "./et2_core_inheritance";
import { et2_widget, et2_createWidget, et2_register_widget, WidgetConfig } from "./et2_core_widget";
import {et2_DOMWidget} from './et2_core_DOMWidget';
import {ClassWithAttributes} from "./et2_core_inheritance";
import {et2_register_widget, WidgetConfig} from "./et2_core_widget";
import './et2_types';
/**
@ -110,7 +110,7 @@ class et2_template extends et2_DOMWidget
// Check to see if XML is known
var xml = null;
var templates = etemplate2.prototype.templates; // use global eTemplate cache
var templates = etemplate2.templates; // use global eTemplate cache
if(!(xml = templates[template_name]))
{
// Check to see if ID is short form --> prepend parent/top-level name

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -744,7 +744,7 @@ declare interface IegwWndLocal extends IegwGlobal
* locally. Global handlers must stay around, so should be used
* for global modules.
*/
registerJSONPlugin(_callback : Function, _context, _type, _global);
registerJSONPlugin(_callback : Function, _context, _type?, _global?);
/**
* Removes a previously registered plugin.
*
@ -757,7 +757,7 @@ declare interface IegwWndLocal extends IegwGlobal
* handling.
* @param {boolean} [_global=false] Remove a global or local handler.
*/
unregisterJSONPlugin(_callback : Function, _context, _type : string, _global : boolean);
unregisterJSONPlugin(_callback : Function, _context, _type? : string, _global? : boolean);
/**
* implemented in egw_files.js