Roo/bootstrap/Input.js
authorEdward <edward@roojs.com>
Thu, 9 Aug 2018 05:22:55 +0000 (13:22 +0800)
committerEdward <edward@roojs.com>
Thu, 9 Aug 2018 05:22:55 +0000 (13:22 +0800)
Roo/bootstrap/Input.js

index cfa88f8..d7beada 100644 (file)
@@ -32,6 +32,7 @@
  * @cfg {String} autocomplete - default is new-password see: https://developers.google.com/web/fundamentals/input/form/label-and-name-inputs?hl=en
  * @cfg {String} indicatorpos (left|right) default left
  * @cfg {String} capture (user|camera) use for file input only. (default empty)
+ * @cfg {String} accept (image|video|audio) use for file input only. (default empty)
 
  * @cfg {String} align (left|center|right) Default left
  * @cfg {Boolean} forceFeedback (true|false) Default false
@@ -246,6 +247,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
     labelxs : 0,
     
     capture : '',
+    accept : '',
     
     parentLabelAlign : function()
     {
@@ -286,6 +288,10 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
             input.capture = this.capture;
         }
         
+        if(this.accept.length){
+            input.accept = this.accept + "/*";
+        }
+        
         if(this.align){
             input.style = (typeof(input.style) == 'undefined') ? ('text-align:' + this.align) : (input.style + 'text-align:' + this.align);
         }