Use an etemplate / top template level prefix to avoid DOM ID collisions

This commit is contained in:
Nathan Gray
2013-07-17 13:08:48 +00:00
parent 792f1b26cc
commit 1b270b2d6f
6 changed files with 12 additions and 8 deletions

View File

@@ -148,9 +148,10 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener],
var node = this.getInputNode();
if (node)
{
// Unique ID to prevent DOM collisions across multiple templates
if (_value != "")
{
node.setAttribute("id", _value);
node.setAttribute("id", this.getInstanceManager().uniqueId+'_'+this.id);
node.setAttribute("name", _value);
}
else