Fix the regular expresion to get the right key for nested Ids using [], textbox_widget

This commit is contained in:
Hadi Nategh 2013-10-01 15:06:56 +00:00
parent 18285429e9
commit 2445bfc22b

View File

@ -27,7 +27,7 @@ var et2_arrayMgr = Class.extend(
/** /**
* Constructor * Constructor
* *
* @memberOf et2_arrayMgr * @memberOf et2_arrayMgr
* @param _data * @param _data
* @param _parentMgr * @param _parentMgr
@ -110,7 +110,7 @@ var et2_arrayMgr = Class.extend(
/** /**
* Returns the path to this content array manager perspective as an array * Returns the path to this content array manager perspective as an array
* containing the key values * containing the key values
* *
* @param _path is used internally, do not supply it manually. * @param _path is used internally, do not supply it manually.
*/ */
getPath : function(_path) { getPath : function(_path) {
@ -161,7 +161,7 @@ var et2_arrayMgr = Class.extend(
{ {
if(typeof _key === "string") if(typeof _key === "string")
{ {
_key = _key.replace("[","[").replace("]","]"); _key = _key.replace(/[/g,"[").replace(/]/g,"]");
indexes = _key.split('['); indexes = _key.split('[');
} }
if (indexes.length > 1) if (indexes.length > 1)