Remove et2_types

This commit is contained in:
nathangray 2020-05-29 11:21:17 -06:00
parent 4d2d14dd99
commit ce393e0803
28 changed files with 63 additions and 288 deletions

View File

@ -363,7 +363,7 @@ declare class egwActionObjectInterface {
* The egwActionObjectManager is a dummy class which only contains a dummy * The egwActionObjectManager is a dummy class which only contains a dummy
* AOI. It may be used as root object or as object containers. * AOI. It may be used as root object or as object containers.
* *
* @param {egwAction} _id * @param {string} _id
* @param {string} _manager * @param {string} _manager
* @return {egwActionObjectManager} * @return {egwActionObjectManager}
*/ */

View File

@ -2516,7 +2516,7 @@ var egwActionObjectDummyInterface = egwActionObjectInterface;
* The egwActionObjectManager is a dummy class which only contains a dummy * The egwActionObjectManager is a dummy class which only contains a dummy
* AOI. It may be used as root object or as object containers. * AOI. It may be used as root object or as object containers.
* *
* @param {egwAction} _id * @param {string} _id
* @param {string} _manager * @param {string} _manager
* @return {egwActionObjectManager} * @return {egwActionObjectManager}
*/ */

View File

@ -32,7 +32,6 @@ require("./et2_core_interfaces");
require("./et2_core_common"); require("./et2_core_common");
var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_widget_1 = require("./et2_core_widget");
require("../egw_action/egw_action.js"); require("../egw_action/egw_action.js");
require("./et2_types");
/** /**
* Abstract widget class which can be inserted into the DOM. All widget classes * Abstract widget class which can be inserted into the DOM. All widget classes
* deriving from this class have to care about implementing the "getDOMNode" * deriving from this class have to care about implementing the "getDOMNode"

View File

@ -19,7 +19,7 @@ import './et2_core_interfaces';
import './et2_core_common'; import './et2_core_common';
import {et2_widget, WidgetConfig} from "./et2_core_widget"; import {et2_widget, WidgetConfig} from "./et2_core_widget";
import '../egw_action/egw_action.js'; import '../egw_action/egw_action.js';
import './et2_types';
/** /**
* Abstract widget class which can be inserted into the DOM. All widget classes * Abstract widget class which can be inserted into the DOM. All widget classes

View File

@ -30,7 +30,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
require("./et2_core_common"); require("./et2_core_common");
var et2_core_inheritance_1 = require("./et2_core_inheritance"); var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_valueWidget_1 = require("./et2_core_valueWidget"); var et2_core_valueWidget_1 = require("./et2_core_valueWidget");
require("./et2_types");
/** /**
* et2_inputWidget derrives from et2_simpleWidget and implements the IInput * et2_inputWidget derrives from et2_simpleWidget and implements the IInput
* interface. When derriving from this class, call setDOMNode with an input * interface. When derriving from this class, call setDOMNode with an input

View File

@ -19,7 +19,6 @@ import { ClassWithAttributes } from "./et2_core_inheritance";
import { et2_widget, et2_createWidget, et2_register_widget, WidgetConfig } from "./et2_core_widget"; import { et2_widget, et2_createWidget, et2_register_widget, WidgetConfig } from "./et2_core_widget";
import { et2_DOMWidget } from './et2_core_DOMWidget' import { et2_DOMWidget } from './et2_core_DOMWidget'
import { et2_valueWidget } from './et2_core_valueWidget' import { et2_valueWidget } from './et2_core_valueWidget'
import './et2_types';
/** /**
* et2_inputWidget derrives from et2_simpleWidget and implements the IInput * et2_inputWidget derrives from et2_simpleWidget and implements the IInput

View File

@ -19,7 +19,7 @@
* @param {object} _context for _callback * @param {object} _context for _callback
* @param {function} _fail_callback function(_xml) * @param {function} _fail_callback function(_xml)
*/ */
function et2_loadXMLFromURL(_url : string, _callback : Function, _context : object, _fail_callback : Function) function et2_loadXMLFromURL(_url : string, _callback : Function, _context : object, _fail_callback? : Function)
{ {
if (typeof _context == "undefined") if (typeof _context == "undefined")
{ {

View File

@ -1,216 +0,0 @@
declare module eT2
{
}
declare var etemplate2 : any;
declare class et2_widget{
destroy()
getWidgetById(string) : et2_widget;
}
declare class et2_DOMWidget extends et2_widget{
public set_class(value: string);
}
declare class et2_baseWidget extends et2_DOMWidget{}
declare class et2_valueWidget extends et2_baseWidget{}
declare class et2_inputWidget extends et2_valueWidget{
getInputNode() : HTMLElement;
public set_value(value: string | object | number);
public getValue() : any;
}
declare class et2_tabbox extends et2_valueWidget {
tabData : any;
activateTab(et2_widget);
}
declare class et2_button extends et2_DOMWidget {
click() : boolean;
onclick: Function;
set_disabled(b: boolean) : void;
}
declare var et2_surroundingsMgr : any;
declare var et2_arrayMgr : any;
declare var et2_readonlysArrayMgr : any;
declare var et2_container : any;
declare var et2_placeholder : any;
declare var et2_validTypes : string[];
declare var et2_typeDefaults : object;
//declare const et2_no_init : object;
declare class et2_editableWidget extends et2_inputWidget {
public set_readonly(value : boolean);
}
/*declare var et2_IDOMNode : any;
declare var et2_IInput : any;
declare var et2_IResizeable : any;
declare var et2_IAligned : any;
declare var et2_ISubmitListener : any;
declare var et2_IDetachedDOM : any;
declare var et2_IPrint : any;*/
declare var et2_registry : {};
declare var et2_dataview : any;
declare var et2_dataview_controller : any;
declare var et2_dataview_selectionManager : any;
declare var et2_dataview_IInvalidatable : any;
declare var et2_dataview_IViewRange : any;
declare var et2_IDataProvider : any;
declare var et2_dataview_column : any;
declare var et2_dataview_columns : any;
declare var et2_dataview_container : any;
declare var et2_dataview_grid : any;
declare var et2_dataview_row : any;
declare var et2_dataview_rowProvider : any;
declare var et2_dataview_spacer : any;
declare var et2_dataview_tile : any;
declare class et2_customfields_list extends et2_valueWidget {
constructor(_parent: any, _attrs: WidgetConfig, object: object);
public static readonly prefix : string;
public customfields : any;
set_visible(visible : boolean);
}
declare class et2_nextmatch extends et2_DOMWidget {
}
declare var et2_nextmatch_header_bar : any;
declare var et2_nextmatch_header : any;
declare var et2_nextmatch_customfields : any;
declare var et2_nextmatch_controller : any;
declare class et2_dynheight
{
constructor(_outerNode, _innerNode, _minHeight);
outerNode: any;
update: any;
destroy();
}
declare class et2_nextmatch_rowProvider
{
}
declare var et2_nextmatch_rowWidget : any;
declare var et2_nextmatch_rowTemplateWidget : any;
declare var et2_ajaxSelect : any;
declare var et2_ajaxSelect_ro : any;
declare var et2_barcode : any;
declare var et2_box : any;
declare var et2_details : any;
declare var et2_checkbox : any;
declare var et2_checkbox_ro : any;
declare var et2_color : any;
declare var et2_color_ro : any;
declare var et2_date : any;
declare var et2_date_duration : any;
declare var et2_date_duration_ro : any;
declare var et2_date_ro : any;
declare var et2_date_range : any;
declare var et2_description : any;
declare var et2_dialog : any;
declare var et2_diff : any;
declare var et2_dropdown_button : any;
declare var et2_entry : any;
declare var et2_favorites : any;
declare class et2_file extends et2_widget {}
declare var et2_grid : any;
declare var et2_groupbox : any;
declare var et2_groupbox_legend : any;
declare var et2_hbox : any;
declare var et2_historylog : any;
declare var et2_hrule : any;
declare var et2_html : any;
declare var et2_htmlarea : any;
declare class et2_iframe extends et2_valueWidget {
public set_src(string);
}
declare var et2_image : any;
declare var et2_appicon : any;
declare var et2_avatar : any;
declare var et2_avatar_ro : any;
declare var et2_lavatar : any;
declare var et2_itempicker : any;
declare var et2_link_to : any;
declare var et2_link_apps : any;
declare var et2_link_entry : any;
declare var et2_link_string : any;
declare var et2_link_list : any;
declare var et2_link_add : any;
declare var et2_number : any;
declare var et2_number_ro : any;
declare var et2_portlet : any;
declare var et2_progress : any;
declare var et2_radiobox : any;
declare var et2_radiobox_ro : any;
declare var et2_radioGroup : any;
declare var et2_script : any;
declare var et2_selectAccount : any;
declare var et2_selectAccount_ro : any;
declare class et2_selectbox extends et2_inputWidget {
protected options : any;
public createInputWidget();
public set_multiple(boolean);
public set_select_options(options: any);
}
declare var et2_selectbox_ro : any;
declare var et2_menulist : any;
declare var et2_split : any;
declare var et2_styles : any;
declare class et2_taglist extends et2_selectbox {
protected div : JQuery;
}
declare var et2_taglist_account : any;
declare var et2_taglist_email : any;
declare var et2_taglist_category : any;
declare var et2_taglist_thumbnail : any;
declare var et2_taglist_state : any;
declare var et2_taglist_ro : any;
declare var et2_template : any;
declare var et2_textbox : any;
declare var et2_textbox_ro : any;
declare var et2_searchbox : any;
declare var et2_timestamper : any;
declare class et2_toolbar extends et2_DOMWidget {}
declare var et2_tree : any;
declare var et2_url : any;
declare var et2_url_ro : any;
declare var et2_vfs : any;
declare var et2_vfsName : any;
declare var et2_vfsPath : any;
declare var et2_vfsName_ro : any;
declare var et2_vfsMime : any;
declare var et2_vfsSize : any;
declare var et2_vfsMode : any;
declare var et2_vfsUid : any;
declare var et2_vfsUpload : any;
declare var et2_vfsSelect : any;
declare var et2_video : any;
declare var tinymce : any;
declare var date : any;
declare var tinyMCE : any;
declare class et2_nextmatch_sortheader extends et2_nextmatch_header {}
declare class et2_nextmatch_filterheader extends et2_nextmatch_header {}
declare class et2_nextmatch_accountfilterheader extends et2_nextmatch_header {}
declare class et2_nextmatch_taglistheader extends et2_nextmatch_header {}
declare class et2_nextmatch_entryheader extends et2_nextmatch_header {}
declare class et2_nextmatch_customfilter extends et2_nextmatch_filterheader {}
declare function et2_createWidget(type : string, params? : {}, parent? : any) : any;
declare function nm_action(_action : {}, _senders : [], _target? : any, _ids? : any) : void;
declare function et2_compileLegacyJS(_code : string, _widget : et2_widget, _context? : HTMLElement) : Function;
// et2_core_xml.js
declare function et2_loadXMLFromURL(_url : string, _callback : Function, _context? : object, _fail_callback? : Function) : void;
declare function et2_directChildrenByTagName(_node, _tagName);
declare function et2_filteredNodeIterator(_node, _callback, _context);
declare function et2_readAttrWithDefault(_node, _name, _default?);
declare function sprintf(format : string, ...args : any) : string;
declare function fetchAll(ids, nextmatch, callback : Function) : boolean;
declare function doLongTask(idsArr : string[], all : boolean, _action : any, nextmatch : any) : boolean;
declare function nm_compare_field(_action, _senders, _target) : boolean;
declare function nm_open_popup(_action, _selected) : void;
declare function nm_submit_popup(button) : void;
declare function nm_hide_popup(element, div_id) : false;
declare function nm_activate_link(_action, _senders) : void;
declare function egw_seperateJavaScript(_html) : void;
declare class Resumable {
constructor(asyncOptions: any);
}
declare class dhtmlXTreeObject {
constructor(options : any);
}
declare function expose(widget:any) : any;

View File

@ -31,7 +31,6 @@ require("./et2_core_common");
var et2_core_inheritance_1 = require("./et2_core_inheritance"); var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_baseWidget_1 = require("./et2_core_baseWidget"); var et2_core_baseWidget_1 = require("./et2_core_baseWidget");
require("./et2_types");
/** /**
* Class which implements the "button" XET-Tag * Class which implements the "button" XET-Tag
*/ */

View File

@ -18,7 +18,6 @@ import './et2_core_common';
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
import {et2_createWidget, et2_register_widget, WidgetConfig} from "./et2_core_widget"; import {et2_createWidget, et2_register_widget, WidgetConfig} from "./et2_core_widget";
import {et2_baseWidget} from './et2_core_baseWidget' import {et2_baseWidget} from './et2_core_baseWidget'
import './et2_types';
/** /**
* Class which implements the "button" XET-Tag * Class which implements the "button" XET-Tag

View File

@ -204,6 +204,7 @@ var et2_checkbox = /** @class */ (function (_super) {
et2_checkbox.legacyOptions = ["selected_value", "unselected_value", "ro_true", "ro_false"]; et2_checkbox.legacyOptions = ["selected_value", "unselected_value", "ro_true", "ro_false"];
return et2_checkbox; return et2_checkbox;
}(et2_core_inputWidget_1.et2_inputWidget)); }(et2_core_inputWidget_1.et2_inputWidget));
exports.et2_checkbox = et2_checkbox;
et2_core_widget_1.et2_register_widget(et2_checkbox, ["checkbox"]); et2_core_widget_1.et2_register_widget(et2_checkbox, ["checkbox"]);
/** /**
* et2_checkbox_ro is the dummy readonly implementation of the checkbox * et2_checkbox_ro is the dummy readonly implementation of the checkbox

View File

@ -25,7 +25,7 @@ import {ClassWithAttributes} from "./et2_core_inheritance";
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
class et2_checkbox extends et2_inputWidget export class et2_checkbox extends et2_inputWidget
{ {
static readonly _attributes : any = { static readonly _attributes : any = {
"selected_value": { "selected_value": {

View File

@ -35,7 +35,6 @@ var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_valueWidget_1 = require("./et2_core_valueWidget"); var et2_core_valueWidget_1 = require("./et2_core_valueWidget");
var et2_core_inputWidget_1 = require("./et2_core_inputWidget"); var et2_core_inputWidget_1 = require("./et2_core_inputWidget");
require("./et2_types");
var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget"); var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget");
// all calls to jQueryUI.datetimepicker as jQuery.datepicker give errors which are currently suppressed with @ts-ignore // all calls to jQueryUI.datetimepicker as jQuery.datepicker give errors which are currently suppressed with @ts-ignore
// adding npm package @types/jquery.ui.datetimepicker did NOT help :( // adding npm package @types/jquery.ui.datetimepicker did NOT help :(

View File

@ -23,7 +23,6 @@ import {et2_createWidget, et2_register_widget, et2_widget, WidgetConfig} from ".
import {et2_valueWidget} from './et2_core_valueWidget' import {et2_valueWidget} from './et2_core_valueWidget'
import {et2_inputWidget} from './et2_core_inputWidget' import {et2_inputWidget} from './et2_core_inputWidget'
import {et2_selectbox} from './et2_widget_selectbox' import {et2_selectbox} from './et2_widget_selectbox'
import './et2_types';
import {et2_DOMWidget} from "./et2_core_DOMWidget"; import {et2_DOMWidget} from "./et2_core_DOMWidget";
// lib/date.js: // lib/date.js:

View File

@ -32,7 +32,6 @@ require("./et2_core_common");
var et2_core_inheritance_1 = require("./et2_core_inheritance"); var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_baseWidget_1 = require("./et2_core_baseWidget"); var et2_core_baseWidget_1 = require("./et2_core_baseWidget");
require("./et2_types");
/** /**
* Class which implements the "description" XET-Tag * Class which implements the "description" XET-Tag
*/ */

View File

@ -18,7 +18,6 @@ import './et2_core_common';
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
import {et2_register_widget, WidgetConfig} from "./et2_core_widget"; import {et2_register_widget, WidgetConfig} from "./et2_core_widget";
import {et2_baseWidget} from './et2_core_baseWidget' import {et2_baseWidget} from './et2_core_baseWidget'
import './et2_types';
/** /**
* Class which implements the "description" XET-Tag * Class which implements the "description" XET-Tag

View File

@ -31,7 +31,7 @@ require("./et2_core_common");
var et2_core_inheritance_1 = require("./et2_core_inheritance"); var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_valueWidget_1 = require("./et2_core_valueWidget"); var et2_core_valueWidget_1 = require("./et2_core_valueWidget");
require("./et2_types"); var et2_extension_nextmatch_1 = require("./et2_extension_nextmatch");
/** /**
* Class which implements the tabbox-tag * Class which implements the tabbox-tag
*/ */
@ -92,7 +92,7 @@ var et2_tabbox = /** @class */ (function (_super) {
var i = 0; var i = 0;
et2_filteredNodeIterator(tabs, function (node, nodeName) { et2_filteredNodeIterator(tabs, function (node, nodeName) {
if (nodeName == "tab") { if (nodeName == "tab") {
var index_name = et2_readAttrWithDefault(node, "id"); var index_name = et2_readAttrWithDefault(node, "id", '');
var hide = false; var hide = false;
var widget_options = {}; var widget_options = {};
if (index_name) { if (index_name) {
@ -102,7 +102,7 @@ var et2_tabbox = /** @class */ (function (_super) {
hide = true; hide = true;
} }
// Get the class attribute and add it as widget_options // Get the class attribute and add it as widget_options
var classAttr = et2_readAttrWithDefault(node, "class"); var classAttr = et2_readAttrWithDefault(node, "class", '');
if (classAttr) { if (classAttr) {
widget_options = { 'class': classAttr }; widget_options = { 'class': classAttr };
} }
@ -350,7 +350,7 @@ var et2_tabbox = /** @class */ (function (_super) {
this.tabData[_idx]['widget'].iterateOver(function (nm) { this.tabData[_idx]['widget'].iterateOver(function (nm) {
if (nm && nm._type == 'nextmatch') if (nm && nm._type == 'nextmatch')
nm.resize(); nm.resize();
}, this.tabData[_idx]['widget'], et2_nextmatch); }, this.tabData[_idx]['widget'], et2_extension_nextmatch_1.et2_nextmatch);
} }
}; };
/** /**

View File

@ -19,7 +19,7 @@ import { ClassWithAttributes } from "./et2_core_inheritance";
import { et2_widget, et2_createWidget, et2_register_widget, WidgetConfig } from "./et2_core_widget"; import { et2_widget, et2_createWidget, et2_register_widget, WidgetConfig } from "./et2_core_widget";
import { et2_DOMWidget } from './et2_core_DOMWidget' import { et2_DOMWidget } from './et2_core_DOMWidget'
import { et2_valueWidget } from './et2_core_valueWidget' import { et2_valueWidget } from './et2_core_valueWidget'
import './et2_types'; import {et2_nextmatch} from "./et2_extension_nextmatch";
/** /**
* Class which implements the tabbox-tag * Class which implements the tabbox-tag
@ -122,7 +122,7 @@ class et2_tabbox extends et2_valueWidget implements et2_IInput,et2_IResizeable,e
et2_filteredNodeIterator(tabs, function(node, nodeName) { et2_filteredNodeIterator(tabs, function(node, nodeName) {
if (nodeName == "tab") if (nodeName == "tab")
{ {
var index_name = et2_readAttrWithDefault(node, "id"); const index_name = et2_readAttrWithDefault(node, "id", '');
var hide = false; var hide = false;
var widget_options = {}; var widget_options = {};
if(index_name) { if(index_name) {
@ -131,7 +131,7 @@ class et2_tabbox extends et2_valueWidget implements et2_IInput,et2_IResizeable,e
hide = true; hide = true;
} }
// Get the class attribute and add it as widget_options // Get the class attribute and add it as widget_options
var classAttr = et2_readAttrWithDefault(node,"class"); const classAttr = et2_readAttrWithDefault(node, "class", '');
if (classAttr) if (classAttr)
{ {
widget_options = {'class':classAttr}; widget_options = {'class':classAttr};

View File

@ -31,7 +31,7 @@ require("./et2_core_common");
var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget"); var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget");
var et2_core_inheritance_1 = require("./et2_core_inheritance"); var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_widget_1 = require("./et2_core_widget");
require("./et2_types"); var etemplate2_1 = require("./etemplate2");
/** /**
* Class which implements the "template" XET-Tag. When the id parameter is set, * Class which implements the "template" XET-Tag. When the id parameter is set,
* the template class checks whether another template with this id already * the template class checks whether another template with this id already
@ -68,7 +68,7 @@ var et2_template = /** @class */ (function (_super) {
var template_name = parts.pop(); var template_name = parts.pop();
// Check to see if XML is known // Check to see if XML is known
var xml = null; var xml = null;
var templates = etemplate2.templates; // use global eTemplate cache var templates = etemplate2_1.etemplate2.templates; // use global eTemplate cache
if (!(xml = templates[template_name])) { if (!(xml = templates[template_name])) {
// Check to see if ID is short form --> prepend parent/top-level name // Check to see if ID is short form --> prepend parent/top-level name
if (template_name.indexOf('.') < 0) { if (template_name.indexOf('.') < 0) {

View File

@ -18,7 +18,7 @@ import './et2_core_common';
import {et2_DOMWidget} from './et2_core_DOMWidget'; import {et2_DOMWidget} from './et2_core_DOMWidget';
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
import {et2_register_widget, WidgetConfig} from "./et2_core_widget"; import {et2_register_widget, WidgetConfig} from "./et2_core_widget";
import './et2_types'; import {etemplate2} from "./etemplate2";
/** /**
* Class which implements the "template" XET-Tag. When the id parameter is set, * Class which implements the "template" XET-Tag. When the id parameter is set,

View File

@ -32,7 +32,6 @@ var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_valueWidget_1 = require("./et2_core_valueWidget"); var et2_core_valueWidget_1 = require("./et2_core_valueWidget");
var et2_core_inputWidget_1 = require("./et2_core_inputWidget"); var et2_core_inputWidget_1 = require("./et2_core_inputWidget");
require("./et2_types");
/** /**
* Class which implements the "textbox" XET-Tag * Class which implements the "textbox" XET-Tag
* *

View File

@ -20,7 +20,6 @@ import {et2_createWidget, et2_register_widget, WidgetConfig} from "./et2_core_wi
import {et2_valueWidget} from './et2_core_valueWidget' import {et2_valueWidget} from './et2_core_valueWidget'
import {et2_inputWidget} from './et2_core_inputWidget' import {et2_inputWidget} from './et2_core_inputWidget'
import {et2_button} from './et2_widget_button' import {et2_button} from './et2_widget_button'
import './et2_types';
/** /**
* Class which implements the "textbox" XET-Tag * Class which implements the "textbox" XET-Tag

View File

@ -33,7 +33,7 @@ var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget");
var et2_core_widget_1 = require("./et2_core_widget"); var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_inheritance_1 = require("./et2_core_inheritance"); var et2_core_inheritance_1 = require("./et2_core_inheritance");
require("../egw_action/egw_action.js"); require("../egw_action/egw_action.js");
require("./et2_types"); var et2_widget_dialog_1 = require("./et2_widget_dialog");
/** /**
* This toolbar gets its contents from its actions * This toolbar gets its contents from its actions
* *
@ -189,7 +189,7 @@ var et2_toolbar = /** @class */ (function (_super) {
}).sendRequest(true); }).sendRequest(true);
}); });
} }
var pref = (!egwIsMobile()) ? egw.preference(this.dom_id, this.egw().getAppName()) : undefined; var pref = (!egwIsMobile()) ? egw.preference(this.dom_id, this.egw().app_name()) : undefined;
if (pref && !jQuery.isArray(pref)) if (pref && !jQuery.isArray(pref))
this.preference = pref; this.preference = pref;
//Set the default actions for the first time //Set the default actions for the first time
@ -280,7 +280,7 @@ var et2_toolbar = /** @class */ (function (_super) {
if (this_1.options.flat_list && children) { if (this_1.options.flat_list && children) {
return "continue"; return "continue";
} }
var dropdown = et2_createWidget("dropdown_button", { var dropdown = et2_core_widget_1.et2_createWidget("dropdown_button", {
id: action.id id: action.id
}, this_1); }, this_1);
dropdown.set_select_options(children); dropdown.set_select_options(children);
@ -365,7 +365,7 @@ var et2_toolbar = /** @class */ (function (_super) {
ui.draggable.appendTo(menulist); ui.draggable.appendTo(menulist);
if (that.actionlist.find(".ui-draggable").length == 0) { if (that.actionlist.find(".ui-draggable").length == 0) {
that.preference = {}; that.preference = {};
egw.set_preference(that.egw().getAppName(), that.dom_id, that.preference); egw.set_preference(that.egw().app_name(), that.dom_id, that.preference);
} }
}, },
tolerance: "touch" tolerance: "touch"
@ -420,7 +420,7 @@ var et2_toolbar = /** @class */ (function (_super) {
this.preference[_action] = _state; this.preference[_action] = _state;
if (egwIsMobile()) if (egwIsMobile())
return; return;
egw.set_preference(this.egw().getAppName(), this.dom_id, this.preference); egw.set_preference(this.egw().app_name(), this.dom_id, this.preference);
}; };
/** /**
* Make a button based on the given action * Make a button based on the given action
@ -437,7 +437,7 @@ var et2_toolbar = /** @class */ (function (_super) {
this.egw().tooltipBind(button, action.hint ? action.hint : action.caption) + (action.shortcut ? ' (' + action.shortcut.caption + ')' : ''); this.egw().tooltipBind(button, action.hint ? action.hint : action.caption) + (action.shortcut ? ' (' + action.shortcut.caption + ')' : '');
if (action && action.checkbox) { if (action && action.checkbox) {
if (action.data.toggle_on || action.data.toggle_off) { if (action.data.toggle_on || action.data.toggle_off) {
var toggle = et2_createWidget('checkbox', { var toggle = et2_core_widget_1.et2_createWidget('checkbox', {
id: this.id + '-' + action.id, id: this.id + '-' + action.id,
toggle_on: action.data.toggle_on, toggle_on: action.data.toggle_on,
toggle_off: action.data.toggle_off toggle_off: action.data.toggle_off
@ -445,11 +445,11 @@ var et2_toolbar = /** @class */ (function (_super) {
toggle.doLoadingFinished(); toggle.doLoadingFinished();
toggle.set_value(action.checked); toggle.set_value(action.checked);
action.data.widget = toggle; action.data.widget = toggle;
toggle = toggle.toggle; var toggle_div = toggle.toggle;
toggle.appendTo(button.parent()) toggle_div.appendTo(button.parent())
.attr('id', this.id + '-' + action.id); .attr('id', this.id + '-' + action.id);
button.remove(); button.remove();
button = toggle; button = toggle_div;
} }
else { else {
if (this.checkbox(action.id)) if (this.checkbox(action.id))
@ -498,7 +498,7 @@ var et2_toolbar = /** @class */ (function (_super) {
et2_toolbar.prototype._link_actions = function (actions) { et2_toolbar.prototype._link_actions = function (actions) {
this._build_menu(actions); this._build_menu(actions);
var self = this; var self = this;
var gom = egw_getObjectManager(this.egw().appName, true, 1); var gom = egw_getObjectManager(this.egw().app_name(), true, 1);
if (this._objectManager == null) { if (this._objectManager == null) {
this._objectManager = gom.addObject(new egwActionObjectManager(this.id, this._actionManager)); this._objectManager = gom.addObject(new egwActionObjectManager(this.id, this._actionManager));
this._objectManager.handleKeyPress = function (_keyCode, _shift, _ctrl, _alt) { this._objectManager.handleKeyPress = function (_keyCode, _shift, _ctrl, _alt) {
@ -638,7 +638,7 @@ var et2_toolbar = /** @class */ (function (_super) {
} }
if (_default_prefs && _default_prefs.length > 0) if (_default_prefs && _default_prefs.length > 0)
content.actions = _default_prefs; content.actions = _default_prefs;
et2_createWidget("dialog", { et2_core_widget_1.et2_createWidget("dialog", {
callback: function (_button_id, _value) { callback: function (_button_id, _value) {
if (_button_id == 'save' && _value) { if (_button_id == 'save' && _value) {
if (_value.actions) { if (_value.actions) {
@ -662,7 +662,7 @@ var et2_toolbar = /** @class */ (function (_super) {
value: { content: content, sel_options: sel_options }, value: { content: content, sel_options: sel_options },
template: egw.webserverUrl + '/api/templates/default/toolbarAdminSettings.xet?1', template: egw.webserverUrl + '/api/templates/default/toolbarAdminSettings.xet?1',
resizable: false resizable: false
}, et2_dialog._create_parent('api')); }, et2_widget_dialog_1.et2_dialog._create_parent('api'));
}; };
et2_toolbar._attributes = { et2_toolbar._attributes = {
"view_range": { "view_range": {

View File

@ -17,11 +17,12 @@
*/ */
import {et2_DOMWidget} from "./et2_core_DOMWidget"; import {et2_DOMWidget} from "./et2_core_DOMWidget";
import {et2_register_widget, WidgetConfig} from "./et2_core_widget"; import {et2_createWidget, et2_register_widget, WidgetConfig} from "./et2_core_widget";
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
import '../egw_action/egw_action.js'; import '../egw_action/egw_action.js';
import './et2_types'; import {et2_dialog} from "./et2_widget_dialog";
import {et2_dropdown_button} from "./et2_widget_dropdown_button";
import {et2_checkbox} from "./et2_widget_checkbox";
/** /**
* This toolbar gets its contents from its actions * This toolbar gets its contents from its actions
* *
@ -72,7 +73,7 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput
private dropdowns : object = {}; private dropdowns : object = {};
private preference : object = {}; private preference : object = {};
menu : any = null; menu : any = null;
private _objectManager : egw_getObjectManager = null; private _objectManager : egwActionObject = null;
constructor(_parent, _attrs? : WidgetConfig, _child? : object) constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{ {
@ -232,7 +233,7 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput
}).sendRequest(true); }).sendRequest(true);
}); });
} }
let pref = (!egwIsMobile())? egw.preference(this.dom_id, this.egw().getAppName()): undefined; let pref = (!egwIsMobile())? egw.preference(this.dom_id, this.egw().app_name()): undefined;
if (pref && !jQuery.isArray(pref)) this.preference = pref; if (pref && !jQuery.isArray(pref)) this.preference = pref;
//Set the default actions for the first time //Set the default actions for the first time
@ -352,7 +353,7 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput
continue; continue;
} }
let dropdown = et2_createWidget("dropdown_button", { let dropdown = <et2_dropdown_button>et2_createWidget("dropdown_button", {
id: action.id id: action.id
},this); },this);
@ -451,7 +452,7 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput
if (that.actionlist.find(".ui-draggable").length == 0) if (that.actionlist.find(".ui-draggable").length == 0)
{ {
that.preference = {}; that.preference = {};
egw.set_preference(that.egw().getAppName(),that.dom_id,that.preference); egw.set_preference(that.egw().app_name(),that.dom_id,that.preference);
} }
}, },
tolerance:"touch" tolerance:"touch"
@ -511,7 +512,7 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput
{ {
this.preference[_action] = _state; this.preference[_action] = _state;
if (egwIsMobile()) return; if (egwIsMobile()) return;
egw.set_preference(this.egw().getAppName(),this.dom_id,this.preference); egw.set_preference(this.egw().app_name(),this.dom_id,this.preference);
} }
/** /**
@ -535,7 +536,7 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput
{ {
if (action.data.toggle_on || action.data.toggle_off) if (action.data.toggle_on || action.data.toggle_off)
{ {
let toggle = et2_createWidget('checkbox', { let toggle = <et2_checkbox>et2_createWidget('checkbox', {
id: this.id+'-'+action.id, id: this.id+'-'+action.id,
toggle_on: action.data.toggle_on, toggle_on: action.data.toggle_on,
toggle_off: action.data.toggle_off toggle_off: action.data.toggle_off
@ -543,11 +544,11 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput
toggle.doLoadingFinished(); toggle.doLoadingFinished();
toggle.set_value(action.checked); toggle.set_value(action.checked);
action.data.widget = toggle; action.data.widget = toggle;
toggle =toggle.toggle; let toggle_div = toggle.toggle;
toggle.appendTo(button.parent()) toggle_div.appendTo(button.parent())
.attr('id', this.id+'-'+action.id); .attr('id', this.id+'-'+action.id);
button.remove(); button.remove();
button = toggle; button = toggle_div;
} }
else else
@ -608,7 +609,7 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput
this._build_menu(actions); this._build_menu(actions);
let self = this; let self = this;
let gom = egw_getObjectManager(this.egw().appName,true,1); let gom = egw_getObjectManager(this.egw().app_name(),true,1);
if(this._objectManager == null) if(this._objectManager == null)
{ {
this._objectManager = gom.addObject( this._objectManager = gom.addObject(

View File

@ -28,7 +28,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
*/ */
var egw_app_1 = require("../jsapi/egw_app"); var egw_app_1 = require("../jsapi/egw_app");
require("../jsapi/egw_global"); require("../jsapi/egw_global");
require("../etemplate/et2_types"); var et2_widget_dialog_1 = require("./et2_widget_dialog");
var et2_widget_file_1 = require("./et2_widget_file");
var et2_widget_textbox_1 = require("./et2_widget_textbox");
var et2_widget_checkbox_1 = require("./et2_widget_checkbox");
/** /**
* UI for VFS Select widget * UI for VFS Select widget
* *
@ -129,7 +132,7 @@ var vfsSelectUI = /** @class */ (function (_super) {
]; ];
if (_data.uploaded[file].confirm === "is_dir") if (_data.uploaded[file].confirm === "is_dir")
buttons.shift(); buttons.shift();
var dialog = et2_dialog.show_prompt(function (_button_id, _value) { var dialog = et2_widget_dialog_1.et2_dialog.show_prompt(function (_button_id, _value) {
var uploaded = {}; var uploaded = {};
uploaded[this.my_data.file] = this.my_data.data; uploaded[this.my_data.file] = this.my_data.data;
switch (_button_id) { switch (_button_id) {
@ -146,7 +149,7 @@ var vfsSelectUI = /** @class */ (function (_super) {
// Remove that file from every file widget... // Remove that file from every file widget...
that.et2.iterateOver(function (_widget) { that.et2.iterateOver(function (_widget) {
_widget.remove_file(this.my_data.data.name); _widget.remove_file(this.my_data.data.name);
}, this, et2_file); }, this, et2_widget_file_1.et2_file);
} }
}, _data.uploaded[file].confirm === "is_dir" ? }, _data.uploaded[file].confirm === "is_dir" ?
this.egw.lang("There's already a directory with that name!") : this.egw.lang("There's already a directory with that name!") :
@ -171,7 +174,7 @@ var vfsSelectUI = /** @class */ (function (_super) {
*/ */
vfsSelectUI.prototype.createdir = function (action, selected) { vfsSelectUI.prototype.createdir = function (action, selected) {
var self = this; var self = this;
et2_dialog.show_prompt(function (button, dir) { et2_widget_dialog_1.et2_dialog.show_prompt(function (button, dir) {
if (button && dir) { if (button && dir) {
var path_1 = self.get_path(); var path_1 = self.get_path();
self.egw.json('EGroupware\\Api\\Etemplate\\Widget\\Vfs::ajax_create_dir', [dir, path_1], function (msg) { self.egw.json('EGroupware\\Api\\Etemplate\\Widget\\Vfs::ajax_create_dir', [dir, path_1], function (msg) {
@ -209,16 +212,13 @@ var vfsSelectUI = /** @class */ (function (_super) {
widget.getRoot().iterateOver(function (widget) { widget.getRoot().iterateOver(function (widget) {
if (widget.id == "path") if (widget.id == "path")
path_2 = widget; path_2 = widget;
}, null, et2_textbox); }, null, et2_widget_textbox_1.et2_textbox);
if (path_2) { if (path_2) {
path_2.set_value(widget.value.path); path_2.set_value(widget.value.path);
} }
} }
else if (this.et2 && this.et2.getArrayMgr('content').getEntry('mode') != 'open-multiple') { else if (this.et2 && this.et2.getArrayMgr('content').getEntry('mode') != 'open-multiple') {
var editfield = this.et2.getWidgetById('name'); this.et2.setValueById('name', widget.value.name);
if (editfield) {
editfield.set_value(widget.value.name);
}
} }
else { else {
var file_1 = widget.value.name; var file_1 = widget.value.name;
@ -226,7 +226,7 @@ var vfsSelectUI = /** @class */ (function (_super) {
if (widget.options.selected_value == file_1) { if (widget.options.selected_value == file_1) {
widget.set_value(widget.get_value() == file_1 ? widget.options.unselected_value : file_1); widget.set_value(widget.get_value() == file_1 ? widget.options.unselected_value : file_1);
} }
}, null, et2_checkbox); }, null, et2_widget_checkbox_1.et2_checkbox);
} }
// Stop event or it will toggle back off // Stop event or it will toggle back off
event.preventDefault(); event.preventDefault();

View File

@ -16,7 +16,13 @@
import {EgwApp} from "../jsapi/egw_app"; import {EgwApp} from "../jsapi/egw_app";
import {et2_vfs, et2_vfsPath, et2_vfsSelect} from "./et2_widget_vfs"; import {et2_vfs, et2_vfsPath, et2_vfsSelect} from "./et2_widget_vfs";
import '../jsapi/egw_global'; import '../jsapi/egw_global';
import '../etemplate/et2_types'; import {et2_dialog} from "./et2_widget_dialog";
import {et2_file} from "./et2_widget_file";
import {et2_textbox} from "./et2_widget_textbox";
import {et2_button} from "./et2_widget_button";
import {et2_selectbox} from "./et2_widget_selectbox";
import {et2_checkbox} from "./et2_widget_checkbox";
/** /**
* UI for VFS Select widget * UI for VFS Select widget
@ -62,7 +68,7 @@ export class vfsSelectUI extends EgwApp
*/ */
et2_ready(et2,name) et2_ready(et2,name)
{ {
this.path_widget = this.et2.getWidgetById('path'); this.path_widget = <et2_vfsPath>this.et2.getWidgetById('path');
this.dirContent = this.et2.getArrayMgr('content').data.dir; this.dirContent = this.et2.getArrayMgr('content').data.dir;
} }
@ -247,11 +253,7 @@ export class vfsSelectUI extends EgwApp
} }
else if (this.et2 && this.et2.getArrayMgr('content').getEntry('mode') != 'open-multiple') else if (this.et2 && this.et2.getArrayMgr('content').getEntry('mode') != 'open-multiple')
{ {
let editfield = this.et2.getWidgetById('name'); this.et2.setValueById('name', widget.value.name);
if(editfield)
{
editfield.set_value(widget.value.name);
}
} }
else else
{ {
@ -280,7 +282,7 @@ export class vfsSelectUI extends EgwApp
do_action(action : string, widget : et2_button | et2_selectbox | et2_vfsPath) do_action(action : string, widget : et2_button | et2_selectbox | et2_vfsPath)
{ {
if (!action) return; if (!action) return;
let field = '', value = ''; let field = '', value : string|string[] = '' ;
switch (action) switch (action)
{ {
case 'path': field = 'path'; value = (<et2_vfsPath>widget).getValue(); break; case 'path': field = 'path'; value = (<et2_vfsPath>widget).getValue(); break;
@ -323,7 +325,7 @@ export class vfsSelectUI extends EgwApp
*/ */
search(_widget) search(_widget)
{ {
let dir = this.et2.getWidgetById('dir'); let dir = <et2_vfsPath>this.et2.getWidgetById('dir');
let query = _widget.get_value(); let query = _widget.get_value();
if (query == "") if (query == "")
{ {

View File

@ -14,7 +14,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
require("jquery"); require("jquery");
require("jqueryui"); require("jqueryui");
require("../jsapi/egw_global"); require("../jsapi/egw_global");
require("../etemplate/et2_types");
var etemplate2_1 = require("../etemplate/etemplate2"); var etemplate2_1 = require("../etemplate/etemplate2");
/** /**
* Common base class for application javascript * Common base class for application javascript

View File

@ -13,7 +13,6 @@
import 'jquery'; import 'jquery';
import 'jqueryui'; import 'jqueryui';
import '../jsapi/egw_global'; import '../jsapi/egw_global';
import '../etemplate/et2_types';
import {etemplate2} from "../etemplate/etemplate2"; import {etemplate2} from "../etemplate/etemplate2";
import {et2_container} from "../etemplate/et2_core_baseWidget"; import {et2_container} from "../etemplate/et2_core_baseWidget";