From c19a3b6c5f09f26c276e77fd28e2c78ee250a862 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 5 Jul 2012 20:01:54 +0000 Subject: [PATCH] Row values can get put in [id] or {}[id] - look in both --- etemplate/js/et2_widget_selectbox.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index 7e168fa917..92c9d356c2 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -137,12 +137,16 @@ var et2_selectbox = et2_inputWidget.extend({ } // Maybe in a row, and options got stuck in ${row} instead of top level - if((!content_options || content_options.length == 0) && ( - // perspectiveData.row in nm, data["${row}"] in an auto-repeat grid - this.getArrayMgr("sel_options").perspectiveData.row || this.getArrayMgr("sel_options").data["${row}"])) + var row_stuck = ['${row}','{$row}']; + for(var i = 0; i < row_stuck.length; i++) { - var row_id = this.id.replace(/[0-9]+/,'${row}'); - content_options = this.getArrayMgr("sel_options").getEntry(row_id); + if((!content_options || content_options.length == 0) && ( + // perspectiveData.row in nm, data["${row}"] in an auto-repeat grid + this.getArrayMgr("sel_options").perspectiveData.row || this.getArrayMgr("sel_options").data[row_stuck[i]])) + { + var row_id = this.id.replace(/[0-9]+/,row_stuck[i]); + content_options = this.getArrayMgr("sel_options").getEntry(row_id); + } } if(_attrs["select_options"] && content_options) {