Move special path handling from nextmatch up to top level so it can work for all widgets with a namespace and their own value

This commit is contained in:
Nathan Gray 2014-05-27 20:16:02 +00:00
parent 07ec496a8e
commit bff821e300
2 changed files with 6 additions and 7 deletions

View File

@ -1032,7 +1032,12 @@ var et2_widget = ClassWithAttributes.extend(
* this, but some extensions need to override this
*/
getPath: function() {
return this.getArrayMgr("content").getPath();
var path = this.getArrayMgr("content").getPath();
// Prevent namespaced widgets with value from going an extra layer deep
if(this.id && this.createNamespace && path[path.length -1] == this.id) path.pop();
return path;
}
});

View File

@ -1674,12 +1674,6 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
return null;
},
getPath: function() {
var path = this._super.apply(this,arguments);
if(this.id && path[path.length -1] == this.id) path.pop();
return path;
},
// Input widget
/**