luci2: Add missing CSS classes to LuCI2.cbi.ComboBox widget, fix attaching of event...
[project/luci2/ui.git] / luci2 / htdocs / luci2 / luci2.js
index 45584e70485269a0e5a09b3897b6aac3f836d22f..c6c13a101d65b1360390010b69b39b5b16efbb5f 100644 (file)
@@ -5660,17 +5660,19 @@ function LuCI2()
                                .attr('id', this.id(sid));
 
                        var t = $('<input />')
+                               .addClass('form-control')
                                .attr('type', 'text')
                                .hide()
                                .appendTo(d);
 
                        var s = $('<select />')
+                               .addClass('form-control')
                                .appendTo(d);
 
                        var evdata = {
                                self: this,
-                               input: this.validator(sid, t),
-                               select: this.validator(sid, s)
+                               input: t,
+                               select: s
                        };
 
                        s.change(evdata, this._change);
@@ -5680,6 +5682,9 @@ function LuCI2()
                        t.val(this.ucivalue(sid));
                        t.blur();
 
+                       this.validator(sid, t);
+                       this.validator(sid, s);
+
                        return d;
                },