From a11abf641286e8b471508819e685849f5a2f84ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=B6ckel?= Date: Wed, 24 Aug 2011 11:31:30 +0000 Subject: [PATCH] Selectbox options now set themselves selected --- etemplate/js/et2_widget_selectbox.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index fcf32d2586..af0483959b 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -256,7 +256,9 @@ var et2_option = et2_baseWidget.extend({ this.supportedWidgetClasses = [et2_option]; this.option = $j(document.createElement("option")) - .attr("value", this.options.value); + .attr("value", this.options.value) + .attr("selected", this._parent.options.value == this.options.value ? + "selected" : ""); if (this.options.label) {