Etemplate - getWidgetById() can handle nested[type][names]

This commit is contained in:
nathangray 2018-08-09 12:41:37 -06:00
parent 736b22ddde
commit 60e43ab60b

View File

@ -425,6 +425,16 @@ var et2_widget = (function(){ "use strict"; return ClassWithAttributes.extend(
return elem;
}
}
if(this.id && _id.indexOf('[') > -1 && this._children.length)
{
var ids = (new et2_arrayMgr()).explodeKey(_id);
var widget = this;
for(var i = 0; i < ids.length && widget !== null; i++)
{
widget = widget.getWidgetById(ids[i]);
}
return widget;
}
return null;
},