luci2: Add missing CSS classes to LuCI2.cbi.ComboBox widget, fix attaching of event...
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 1 Feb 2014 18:03:55 +0000 (18:03 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 1 Feb 2014 18:03:55 +0000 (18:03 +0000)
luci2/htdocs/luci2/luci2.js

index 45584e7..c6c13a1 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;
                },