libs/web: fix wrong default focus in dynlist widgets (#388)
[project/luci.git] / libs / web / htdocs / luci-static / resources / cbi.js
index 7171574..0a49a69 100644 (file)
@@ -269,6 +269,10 @@ var cbi_validators = {
                                return false;
 
                return true;
+       },
+       'phonedigit': function()
+       {
+               return (this.match(/^[0-9\*#]+$/) != null);
        }
 };
 
@@ -744,7 +748,7 @@ function cbi_dynlist_init(name, respath, datatype, optional, choices)
                return false;
        }
 
-       cbi_dynlist_redraw(-1, -1, -1);
+       cbi_dynlist_redraw(NaN, -1, -1);
 }
 
 //Hijacks the CBI form to send via XHR (requires Prototype)