mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
Etemplate: Changes to adapt to get/set in valueWidget interface
This commit is contained in:
parent
94f5c437e8
commit
6790ffb273
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -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"]);
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -124,7 +124,6 @@ export class et2_tree extends et2_inputWidget
|
||||
* Regexp used by _htmlencode
|
||||
*/
|
||||
_lt_regexp : RegExp = /</g;
|
||||
private value: any;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
Loading…
Reference in New Issue
Block a user