fix wrong class-name for attributes in constructor call

This commit is contained in:
Ralf Becker 2020-01-22 18:38:33 +01:00 committed by Hadi Nategh
parent 313693a42c
commit 05b92c97f2
14 changed files with 42 additions and 32 deletions

View File

@ -29,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
*/
require("./et2_core_common");
var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget");
var et2_core_valueWidget_1 = require("./et2_core_valueWidget");
require("./et2_types");
/**
@ -45,7 +44,7 @@ var et2_inputWidget = /** @class */ (function (_super) {
function et2_inputWidget(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_inputWidget._attributes, _child || {})) || this;
// mark value as not initialised, so set_value can determine if it is necessary to trigger change event
_this._oldValue = et2_no_init;
_this._labelContainer = null;

View File

@ -76,7 +76,7 @@ export class et2_inputWidget extends et2_valueWidget implements et2_IInput, et2_
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_inputWidget._attributes, _child || {}));
// mark value as not initialised, so set_value can determine if it is necessary to trigger change event
this._oldValue = et2_no_init;

View File

@ -30,6 +30,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
*/
var et2_core_baseWidget_1 = require("./et2_core_baseWidget");
require("./et2_core_common");
var et2_core_inheritance_1 = require("./et2_core_inheritance");
/**
* et2_valueWidget is the base class for et2_inputWidget - valueWidget introduces
* the "value" attribute and automatically loads it from the "content" array
@ -37,16 +38,19 @@ require("./et2_core_common");
*/
var et2_valueWidget = /** @class */ (function (_super) {
__extends(et2_valueWidget, _super);
function et2_valueWidget() {
var _this = _super !== null && _super.apply(this, arguments) || this;
/**
* Constructor
*/
function et2_valueWidget(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_valueWidget._attributes, _child || {})) || this;
_this.label = '';
_this._labelContainer = null;
return _this;
}
/**
*
*
* @memberOf et2_valueWidget
* @param _attrs
*/
et2_valueWidget.prototype.transformAttributes = function (_attrs) {

View File

@ -17,6 +17,8 @@
import { et2_baseWidget } from './et2_core_baseWidget'
import './et2_core_common';
import {WidgetConfig} from "./et2_core_widget";
import {ClassWithAttributes} from "./et2_core_inheritance";
/**
* et2_valueWidget is the base class for et2_inputWidget - valueWidget introduces
@ -44,10 +46,17 @@ export class et2_valueWidget extends et2_baseWidget
label: string = '';
protected _labelContainer: JQuery = null;
/**
* Constructor
*/
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_valueWidget._attributes, _child || {}));
}
/**
*
*
* @memberOf et2_valueWidget
* @param _attrs
*/
transformAttributes(_attrs : object)

View File

@ -30,7 +30,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
require("./et2_core_common");
var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget");
var et2_core_baseWidget_1 = require("./et2_core_baseWidget");
require("./et2_types");
/**
@ -44,7 +43,7 @@ var et2_button = /** @class */ (function (_super) {
function et2_button(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_button._attributes, _child || {})) || this;
_this.legacyOptions = ["image", "ro_image"];
_this.label = "";
_this.clicked = false;

View File

@ -120,7 +120,7 @@ export class et2_button extends et2_baseWidget implements et2_IInput, et2_IDetac
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_button._attributes, _child || {}));
if (!this.options.background_image && (this.options.image || this.options.ro_image))
{

View File

@ -56,7 +56,7 @@ var et2_date = /** @class */ (function (_super) {
function et2_date(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_date._attributes, _child || {})) || this;
_this.legacyOptions = ["data_format"];
_this.input_date = null;
_this.is_mobile = false;
@ -585,7 +585,7 @@ var et2_date_duration = /** @class */ (function (_super) {
function et2_date_duration(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_date_duration._attributes, _child || {})) || this;
_this.legacyOptions = ["data_format", "display_format", "hours_per_day", "empty_not_0", "short_labels"];
// Legacy option put percent in with display format
if (_this.options.display_format.indexOf("%") != -1) {
@ -897,7 +897,7 @@ var et2_date_ro = /** @class */ (function (_super) {
function et2_date_ro(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_date_ro._attributes, _child || {})) || this;
/**
* Internal container for working easily with dates
*/
@ -1102,7 +1102,7 @@ var et2_date_range = /** @class */ (function (_super) {
function et2_date_range(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_date_range._attributes, _child || {})) || this;
_this.div = jQuery(document.createElement('div'))
.attr({ class: 'et2_date_range' });
_this.from = null;

View File

@ -106,7 +106,7 @@ String: A string in the user\'s date format, or a relative date. Relative dates
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_date._attributes, _child || {}));
this.date = new Date();
this.date.setUTCHours(0);
@ -717,7 +717,7 @@ class et2_date_duration extends et2_date
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_date_duration._attributes, _child || {}));
// Legacy option put percent in with display format
if(this.options.display_format.indexOf("%") != -1)
@ -1073,7 +1073,7 @@ class et2_date_ro extends et2_valueWidget implements et2_IDetachedDOM
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_date_ro._attributes, _child || {}));
this._labelContainer = jQuery(document.createElement("label"))
.addClass("et2_label");
@ -1307,7 +1307,7 @@ class et2_date_range extends et2_inputWidget
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_date_range._attributes, _child || {}));
this.div = jQuery(document.createElement('div'))
.attr({ class:'et2_date_range'});

View File

@ -30,7 +30,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
require("./et2_core_common");
var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget");
var et2_core_valueWidget_1 = require("./et2_core_valueWidget");
require("./et2_types");
/**
@ -44,7 +43,7 @@ var et2_tabbox = /** @class */ (function (_super) {
function et2_tabbox(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_tabbox._attributes, _child || {})) || this;
/**
* Currently selected tab
*/
@ -482,3 +481,4 @@ var et2_tabbox = /** @class */ (function (_super) {
return et2_tabbox;
}(et2_core_valueWidget_1.et2_valueWidget));
et2_core_widget_1.et2_register_widget(et2_tabbox, ["tabbox"]);
//# sourceMappingURL=et2_widget_tabs.js.map

View File

@ -67,7 +67,7 @@ class et2_tabbox extends et2_valueWidget implements et2_IInput,et2_IResizeable,e
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_tabbox._attributes, _child || {}));
// Create the outer tabbox container
this.container = jQuery(document.createElement("div"))

View File

@ -46,7 +46,7 @@ var et2_template = /** @class */ (function (_super) {
function et2_template(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_template._attributes, _child || {})) || this;
_this.createNamespace = true;
// Set this early, so it's available for creating namespace
if (_attrs.content) {

View File

@ -81,7 +81,7 @@ class et2_template extends et2_DOMWidget
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_template._attributes, _child || {}));
// Set this early, so it's available for creating namespace
if(_attrs.content)

View File

@ -30,7 +30,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
require("./et2_core_common");
var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_DOMWidget_1 = require("./et2_core_DOMWidget");
var et2_core_valueWidget_1 = require("./et2_core_valueWidget");
var et2_core_inputWidget_1 = require("./et2_core_inputWidget");
require("./et2_types");
@ -47,7 +46,7 @@ var et2_textbox = /** @class */ (function (_super) {
function et2_textbox(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_textbox._attributes, _child || {})) || this;
_this.legacyOptions = ["size", "maxlength", "validator"];
_this.input = null;
_this.input = null;
@ -301,7 +300,7 @@ var et2_textbox_ro = /** @class */ (function (_super) {
function et2_textbox_ro(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_textbox_ro._attributes, _child || {})) || this;
_this.value = "";
_this.span = jQuery(document.createElement("label"))
.addClass("et2_label");
@ -397,7 +396,7 @@ var et2_searchbox = /** @class */ (function (_super) {
function et2_searchbox(_parent, _attrs, _child) {
var _this =
// Call the inherited constructor
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_core_DOMWidget_1.et2_DOMWidget._attributes, _child || {})) || this;
_super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_searchbox._attributes, _child || {})) || this;
_this.value = "";
_this.value = "";
_this.div = jQuery(document.createElement('div'))

View File

@ -99,7 +99,7 @@ export class et2_textbox extends et2_inputWidget implements et2_IResizeable
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_textbox._attributes, _child || {}));
this.input = null;
@ -359,7 +359,7 @@ class et2_textbox_ro extends et2_valueWidget implements et2_IDetachedDOM
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_textbox_ro._attributes, _child || {}));
this.span = jQuery(document.createElement("label"))
.addClass("et2_label");
@ -472,7 +472,7 @@ class et2_searchbox extends et2_textbox
constructor(_parent, _attrs? : WidgetConfig, _child? : object)
{
// Call the inherited constructor
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_DOMWidget._attributes, _child || {}));
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_searchbox._attributes, _child || {}));
this.value = "";
this.div = jQuery(document.createElement('div'))