Selectbox options now set themselves selected

This commit is contained in:
Andreas Stöckel 2011-08-24 11:31:30 +00:00
parent 6e33c99db0
commit a11abf6412

View File

@ -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)
{