diff --git a/api/js/etemplate/et2_core_valueWidget.ts b/api/js/etemplate/et2_core_valueWidget.ts index 63aeb3d229..a988cd16ad 100644 --- a/api/js/etemplate/et2_core_valueWidget.ts +++ b/api/js/etemplate/et2_core_valueWidget.ts @@ -44,7 +44,7 @@ export class et2_valueWidget extends et2_baseWidget }; label: string = ''; - value: string|number|Object; + protected value: string|number|Object; protected _labelContainer: JQuery = null; /** diff --git a/api/js/etemplate/et2_widget_ajaxSelect.ts b/api/js/etemplate/et2_widget_ajaxSelect.ts index 617b21fc79..a9282b8676 100644 --- a/api/js/etemplate/et2_widget_ajaxSelect.ts +++ b/api/js/etemplate/et2_widget_ajaxSelect.ts @@ -87,7 +87,6 @@ class et2_ajaxSelect extends et2_inputWidget } }; private input: JQuery = null; - private value : any; /** * Constructor * @@ -215,7 +214,6 @@ class et2_ajaxSelect_ro extends et2_valueWidget implements et2_IDetachedDOM "ignore": true } }; - private value: string; private span: JQuery; /** diff --git a/api/js/etemplate/et2_widget_barcode.js b/api/js/etemplate/et2_widget_barcode.js index 3b4e56471f..d80d9adc43 100644 --- a/api/js/etemplate/et2_widget_barcode.js +++ b/api/js/etemplate/et2_widget_barcode.js @@ -94,9 +94,6 @@ var et2_barcode = /** @class */ (function (_super) { this.createWidget(); } }; - et2_barcode.prototype.get_value = function () { - return this.value; - }; // Class Constants /* * type const diff --git a/api/js/etemplate/et2_widget_barcode.ts b/api/js/etemplate/et2_widget_barcode.ts index d601d719b1..f28ac0116e 100644 --- a/api/js/etemplate/et2_widget_barcode.ts +++ b/api/js/etemplate/et2_widget_barcode.ts @@ -112,7 +112,6 @@ export class et2_barcode extends et2_valueWidget }, }; private div: JQuery; - private value: string; private settings: { output: string; barWidth: string; barHeight: string; bgColor: string; color: string }; /** @@ -157,10 +156,5 @@ export class et2_barcode extends et2_valueWidget this.createWidget(); } } - - get_value() - { - return this.value; - } } et2_register_widget(et2_barcode, ["barcode"]); \ No newline at end of file diff --git a/api/js/etemplate/et2_widget_color.ts b/api/js/etemplate/et2_widget_color.ts index 3c8a53872f..e07ea26e94 100644 --- a/api/js/etemplate/et2_widget_color.ts +++ b/api/js/etemplate/et2_widget_color.ts @@ -96,7 +96,7 @@ et2_register_widget(et2_color, ["colorpicker"]); */ export class et2_color_ro extends et2_valueWidget implements et2_IDetachedDOM { - private value: string; + protected value: string; private $node: JQuery; /** * Constructor @@ -115,7 +115,7 @@ export class et2_color_ro extends et2_valueWidget implements et2_IDetachedDOM this.setDOMNode(this.$node[0]); } - set_value( _value) + set_value( _value : string) { this.value = _value; diff --git a/api/js/etemplate/et2_widget_countdown.js b/api/js/etemplate/et2_widget_countdown.js index f52db3aea4..16747b83a0 100644 --- a/api/js/etemplate/et2_widget_countdown.js +++ b/api/js/etemplate/et2_widget_countdown.js @@ -70,6 +70,7 @@ var et2_countdown = /** @class */ (function (_super) { et2_countdown.prototype.set_value = function (_time) { if (isNaN(_time)) return; + _super.prototype.set_value.call(this, _time); this.time = new Date(); this.time.setSeconds(this.time.getSeconds() + parseInt(_time)); var self = this; diff --git a/api/js/etemplate/et2_widget_countdown.ts b/api/js/etemplate/et2_widget_countdown.ts index 6b20d4f4e8..97483d2ba4 100644 --- a/api/js/etemplate/et2_widget_countdown.ts +++ b/api/js/etemplate/et2_widget_countdown.ts @@ -101,6 +101,7 @@ export class et2_countdown extends et2_valueWidget { { if (isNaN(_time)) return; + super.set_value(_time); this.time = new Date(); this.time.setSeconds(this.time.getSeconds() + parseInt(_time)); diff --git a/api/js/etemplate/et2_widget_historylog.ts b/api/js/etemplate/et2_widget_historylog.ts index 3ce6d911f1..0a574673ff 100644 --- a/api/js/etemplate/et2_widget_historylog.ts +++ b/api/js/etemplate/et2_widget_historylog.ts @@ -88,7 +88,6 @@ export class et2_historylog extends et2_valueWidget implements et2_IDataProvider private controller: et2_dataview_controller; private fields: any; private diff: et2_diff; - private value: any; /** * Constructor diff --git a/api/js/etemplate/et2_widget_progress.js b/api/js/etemplate/et2_widget_progress.js index 1381d24675..dd2242147e 100644 --- a/api/js/etemplate/et2_widget_progress.js +++ b/api/js/etemplate/et2_widget_progress.js @@ -69,6 +69,7 @@ var et2_progress = /** @class */ (function (_super) { }; // setting the value as width of the progress-bar et2_progress.prototype.set_value = function (_value) { + _super.prototype.set_value.call(this, _value); _value = parseInt(_value) + "%"; // make sure we have percent attached this.progress.style.width = _value; if (!this.options.label) diff --git a/api/js/etemplate/et2_widget_progress.ts b/api/js/etemplate/et2_widget_progress.ts index fdf7f529f8..c6906567c2 100644 --- a/api/js/etemplate/et2_widget_progress.ts +++ b/api/js/etemplate/et2_widget_progress.ts @@ -94,6 +94,7 @@ class et2_progress extends et2_valueWidget implements et2_IDetachedDOM // setting the value as width of the progress-bar set_value(_value) { + super.set_value(_value); _value = parseInt(_value)+"%"; // make sure we have percent attached this.progress.style.width = _value; if (!this.options.label) this.set_label(_value); diff --git a/api/js/etemplate/et2_widget_tree.ts b/api/js/etemplate/et2_widget_tree.ts index ed971380fa..425d72ce47 100644 --- a/api/js/etemplate/et2_widget_tree.ts +++ b/api/js/etemplate/et2_widget_tree.ts @@ -124,7 +124,6 @@ export class et2_tree extends et2_inputWidget * Regexp used by _htmlencode */ _lt_regexp : RegExp = /