mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-17 20:11:23 +02:00
Etemplate: Changes to adapt to get/set in valueWidget interface
This commit is contained in:
@@ -44,7 +44,7 @@ export class et2_valueWidget extends et2_baseWidget
|
|||||||
};
|
};
|
||||||
|
|
||||||
label: string = '';
|
label: string = '';
|
||||||
value: string|number|Object;
|
protected value: string|number|Object;
|
||||||
protected _labelContainer: JQuery = null;
|
protected _labelContainer: JQuery = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -87,7 +87,6 @@ class et2_ajaxSelect extends et2_inputWidget
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
private input: JQuery = null;
|
private input: JQuery = null;
|
||||||
private value : any;
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@@ -215,7 +214,6 @@ class et2_ajaxSelect_ro extends et2_valueWidget implements et2_IDetachedDOM
|
|||||||
"ignore": true
|
"ignore": true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
private value: string;
|
|
||||||
private span: JQuery;
|
private span: JQuery;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -94,9 +94,6 @@ var et2_barcode = /** @class */ (function (_super) {
|
|||||||
this.createWidget();
|
this.createWidget();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
et2_barcode.prototype.get_value = function () {
|
|
||||||
return this.value;
|
|
||||||
};
|
|
||||||
// Class Constants
|
// Class Constants
|
||||||
/*
|
/*
|
||||||
* type const
|
* type const
|
||||||
|
@@ -112,7 +112,6 @@ export class et2_barcode extends et2_valueWidget
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
private div: JQuery;
|
private div: JQuery;
|
||||||
private value: string;
|
|
||||||
private settings: { output: string; barWidth: string; barHeight: string; bgColor: string; color: 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();
|
this.createWidget();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get_value()
|
|
||||||
{
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
et2_register_widget(et2_barcode, ["barcode"]);
|
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
|
export class et2_color_ro extends et2_valueWidget implements et2_IDetachedDOM
|
||||||
{
|
{
|
||||||
private value: string;
|
protected value: string;
|
||||||
private $node: JQuery;
|
private $node: JQuery;
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -115,7 +115,7 @@ export class et2_color_ro extends et2_valueWidget implements et2_IDetachedDOM
|
|||||||
this.setDOMNode(this.$node[0]);
|
this.setDOMNode(this.$node[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_value( _value)
|
set_value( _value : string)
|
||||||
{
|
{
|
||||||
this.value = _value;
|
this.value = _value;
|
||||||
|
|
||||||
|
@@ -70,6 +70,7 @@ var et2_countdown = /** @class */ (function (_super) {
|
|||||||
et2_countdown.prototype.set_value = function (_time) {
|
et2_countdown.prototype.set_value = function (_time) {
|
||||||
if (isNaN(_time))
|
if (isNaN(_time))
|
||||||
return;
|
return;
|
||||||
|
_super.prototype.set_value.call(this, _time);
|
||||||
this.time = new Date();
|
this.time = new Date();
|
||||||
this.time.setSeconds(this.time.getSeconds() + parseInt(_time));
|
this.time.setSeconds(this.time.getSeconds() + parseInt(_time));
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@@ -101,6 +101,7 @@ export class et2_countdown extends et2_valueWidget {
|
|||||||
{
|
{
|
||||||
if (isNaN(_time)) return;
|
if (isNaN(_time)) return;
|
||||||
|
|
||||||
|
super.set_value(_time);
|
||||||
this.time = new Date();
|
this.time = new Date();
|
||||||
this.time.setSeconds(this.time.getSeconds() + parseInt(_time));
|
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 controller: et2_dataview_controller;
|
||||||
private fields: any;
|
private fields: any;
|
||||||
private diff: et2_diff;
|
private diff: et2_diff;
|
||||||
private value: any;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@@ -69,6 +69,7 @@ var et2_progress = /** @class */ (function (_super) {
|
|||||||
};
|
};
|
||||||
// setting the value as width of the progress-bar
|
// setting the value as width of the progress-bar
|
||||||
et2_progress.prototype.set_value = function (_value) {
|
et2_progress.prototype.set_value = function (_value) {
|
||||||
|
_super.prototype.set_value.call(this, _value);
|
||||||
_value = parseInt(_value) + "%"; // make sure we have percent attached
|
_value = parseInt(_value) + "%"; // make sure we have percent attached
|
||||||
this.progress.style.width = _value;
|
this.progress.style.width = _value;
|
||||||
if (!this.options.label)
|
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
|
// setting the value as width of the progress-bar
|
||||||
set_value(_value)
|
set_value(_value)
|
||||||
{
|
{
|
||||||
|
super.set_value(_value);
|
||||||
_value = parseInt(_value)+"%"; // make sure we have percent attached
|
_value = parseInt(_value)+"%"; // make sure we have percent attached
|
||||||
this.progress.style.width = _value;
|
this.progress.style.width = _value;
|
||||||
if (!this.options.label) this.set_label(_value);
|
if (!this.options.label) this.set_label(_value);
|
||||||
|
@@ -124,7 +124,6 @@ export class et2_tree extends et2_inputWidget
|
|||||||
* Regexp used by _htmlencode
|
* Regexp used by _htmlencode
|
||||||
*/
|
*/
|
||||||
_lt_regexp : RegExp = /</g;
|
_lt_regexp : RegExp = /</g;
|
||||||
private value: any;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
Reference in New Issue
Block a user