From 4d26a36d090ed66fdbb525f4c74499b3f9c8c5d6 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 11 Jun 2013 22:51:45 +0000 Subject: [PATCH] Fix order of selectbox option detection so value is last choice --- etemplate/js/et2_widget_selectbox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index d86b8369c3..7d3a02c3b0 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -214,11 +214,11 @@ var et2_selectbox = et2_inputWidget.extend( // content array. if (jQuery.isEmptyObject(_attrs["select_options"])) { - // Again, try last name part at top level - var content_options = this.getArrayMgr('content').getRoot().getEntry(name_parts[name_parts.length-1]); // If that didn't work, check according to ID _attrs["select_options"] = content_options ? content_options : this.getArrayMgr('content') .getEntry("options-" + this.id); + // Again, try last name part at top level - this is usually just the value + var content_options = this.getArrayMgr('content').getRoot().getEntry(name_parts[name_parts.length-1]); } // Default to an empty object