Permalink
Browse files

Added HTML5 input types

  • Loading branch information...
1 parent a3ab1ec commit 37fafee87f1c8884a75bbaf45905b468e2c8e953 @hofmeister committed Feb 21, 2014
Showing with 33 additions and 0 deletions.
  1. +33 −0 js/lib/form.js
View
@@ -592,6 +592,39 @@ $wb.ui.form.TextField = $wb.Class('TextField',{
}
});
+$wb.ui.form.NumberField = $wb.Class('NumberField',{
+ __extends:[$wb.ui.form.InputField],
+ __construct:function(opts) {
+ if (!opts) opts = {};
+ opts = $.extend({
+ type:'number'
+ },opts);
+ this.__super(opts);
+ }
+});
+
+$wb.ui.form.EmailField = $wb.Class('EmailField',{
+ __extends:[$wb.ui.form.InputField],
+ __construct:function(opts) {
+ if (!opts) opts = {};
+ opts = $.extend({
+ type:'email'
+ },opts);
+ this.__super(opts);
+ }
+});
+
+$wb.ui.form.UrlField = $wb.Class('UrlField',{
+ __extends:[$wb.ui.form.InputField],
+ __construct:function(opts) {
+ if (!opts) opts = {};
+ opts = $.extend({
+ type:'url'
+ },opts);
+ this.__super(opts);
+ }
+});
+
$wb.ui.form.CheckBox = $wb.Class('CheckBox',{
__extends:[$wb.ui.form.InputField],

0 comments on commit 37fafee

Please sign in to comment.