Fix select options with ${row} were not always found

This commit is contained in:
Nathan Gray 2015-03-25 21:45:57 +00:00
parent ad070b221c
commit 9c28235334

View File

@ -815,10 +815,8 @@ jQuery.extend(et2_selectbox,
// Maybe in a row, and options got stuck in ${row} instead of top level
// not sure this code is still needed, as server-side no longer creates ${row} or {$row} for select-options
if(!content_options || content_options.length == 0)
{
var row_stuck = ['${row}','{$row}'];
for(var i = 0; i < row_stuck.length; i++)
for(var i = 0; i < row_stuck.length && (!content_options || content_options.length == 0); i++)
{
// perspectiveData.row in nm, data["${row}"] in an auto-repeat grid
if(widget.getArrayMgr("sel_options").perspectiveData.row || widget.getArrayMgr("sel_options").data[row_stuck[i]])
@ -831,7 +829,6 @@ jQuery.extend(et2_selectbox,
}
}
}
}
if(attr_options && !jQuery.isEmptyObject(attr_options) && content_options)
{
content_options = jQuery.extend(true, {},attr_options,content_options);