mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
Etemplate: add get/set_value() to valueWidget interface
This commit is contained in:
parent
8ec590a068
commit
94f5c437e8
@ -114,6 +114,17 @@ var et2_valueWidget = /** @class */ (function (_super) {
|
|||||||
// Copy the given value
|
// Copy the given value
|
||||||
this.label = _value;
|
this.label = _value;
|
||||||
};
|
};
|
||||||
|
et2_valueWidget.prototype.get_value = function () {
|
||||||
|
return this.value;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Set value of widget
|
||||||
|
*
|
||||||
|
* @param {string} _value value to set
|
||||||
|
*/
|
||||||
|
et2_valueWidget.prototype.set_value = function (_value) {
|
||||||
|
this.value = _value;
|
||||||
|
};
|
||||||
et2_valueWidget._attributes = {
|
et2_valueWidget._attributes = {
|
||||||
"label": {
|
"label": {
|
||||||
"name": "Label",
|
"name": "Label",
|
||||||
|
@ -44,6 +44,7 @@ export class et2_valueWidget extends et2_baseWidget
|
|||||||
};
|
};
|
||||||
|
|
||||||
label: string = '';
|
label: string = '';
|
||||||
|
value: string|number|Object;
|
||||||
protected _labelContainer: JQuery = null;
|
protected _labelContainer: JQuery = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -143,5 +144,20 @@ export class et2_valueWidget extends et2_baseWidget
|
|||||||
// Copy the given value
|
// Copy the given value
|
||||||
this.label = _value;
|
this.label = _value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_value()
|
||||||
|
{
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set value of widget
|
||||||
|
*
|
||||||
|
* @param {string} _value value to set
|
||||||
|
*/
|
||||||
|
set_value(_value : any | null)
|
||||||
|
{
|
||||||
|
this.value = _value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user