forked from extern/egroupware
Change helper function getValueWidgetById() to the more useful getInputWidgetById()
This commit is contained in:
parent
c6d7cb2467
commit
bdbf28cd2c
@ -317,7 +317,7 @@ var et2_container = /** @class */ (function (_super) {
|
||||
*
|
||||
* @param _id is the id you're searching for
|
||||
*/
|
||||
et2_container.prototype.getValueWidgetById = function (_id) {
|
||||
et2_container.prototype.getInputWidgetById = function (_id) {
|
||||
var widget = this.getWidgetById(_id);
|
||||
if (widget && widget.instanceOf(et2_valueWidget)) {
|
||||
return widget;
|
||||
|
@ -387,12 +387,12 @@ export class et2_container extends et2_baseWidget
|
||||
*
|
||||
* @param _id is the id you're searching for
|
||||
*/
|
||||
getValueWidgetById(_id) : et2_valueWidget | null
|
||||
getInputWidgetById(_id) : et2_inputWidget | null
|
||||
{
|
||||
let widget = this.getWidgetById(_id);
|
||||
if(widget && widget.instanceOf(et2_valueWidget))
|
||||
{
|
||||
return <et2_valueWidget>widget;
|
||||
return <et2_inputWidget><unknown>widget;
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
4
api/js/etemplate/et2_types.d.ts
vendored
4
api/js/etemplate/et2_types.d.ts
vendored
@ -7,7 +7,9 @@ declare class et2_widget{
|
||||
destroy()
|
||||
getWidgetById(string) : et2_widget;
|
||||
}
|
||||
declare class et2_DOMWidget extends et2_widget{}
|
||||
declare class et2_DOMWidget extends et2_widget{
|
||||
public set_class(value: string);
|
||||
}
|
||||
declare class et2_baseWidget extends et2_DOMWidget{}
|
||||
declare class et2_valueWidget extends et2_baseWidget{}
|
||||
declare class et2_inputWidget extends et2_valueWidget{
|
||||
|
Loading…
Reference in New Issue
Block a user