Changed docs/src/Roo_bootstrap_TimeField.js.htmlroojs-bootstrap-debug.jsroojs-bootstr...
authorAlan Knowles <alan@roojs.com>
Mon, 8 Feb 2021 02:23:35 +0000 (10:23 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 8 Feb 2021 02:23:35 +0000 (10:23 +0800)
docs/src/Roo_bootstrap_TimeField.js.html
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 33a1d42..8cdb762 100644 (file)
      */
     </span><span class="jsdoc-var">format </span><span class="jsdoc-syntax">: </span><span class="jsdoc-string">&quot;H:i&quot;</span><span class="jsdoc-syntax">,
 
+    </span><span class="jsdoc-var">getAutoCreate </span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">function</span><span class="jsdoc-syntax">()
+    {
+        </span><span class="jsdoc-var">this.after </span><span class="jsdoc-syntax">= </span><span class="jsdoc-string">'&lt;i class=&quot;fa far fa-clock&quot;&gt;&lt;/i&gt;'</span><span class="jsdoc-syntax">;
+        </span><span class="jsdoc-var">Roo.bootstrap.TimeField.superclass.getAutoCreate.call</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">this</span><span class="jsdoc-syntax">);
+
+
+    },
     </span><span class="jsdoc-var">onRender</span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">function</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">ct</span><span class="jsdoc-syntax">, </span><span class="jsdoc-var">position</span><span class="jsdoc-syntax">)
     {
 
index c032bc9..6569692 100644 (file)
@@ -21962,7 +21962,14 @@ Roo.extend(Roo.bootstrap.TimeField, Roo.bootstrap.Input,  {
      * valid according to {@link Date#parseDate} (defaults to 'H:i').
      */
     format : "H:i",
-       
+
+    getAutoCreate : function()
+    {
+        this.after = '<i class="fa far fa-clock"></i>';
+        Roo.bootstrap.TimeField.superclass.getAutoCreate.call(this);
+
+         
+    },
     onRender: function(ct, position)
     {
         
index 4939174..2193554 100644 (file)
@@ -917,13 +917,13 @@ if(B!==true){return false;}}if(this.regex&&!this.regex.test(A)){return false;}if
 ,Roo.bootstrap.DateField.footer]}]},{tag:'div',cls:'datepicker-months',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.DateField.head,Roo.bootstrap.DateField.content,Roo.bootstrap.DateField.footer]}]},{tag:'div',cls:'datepicker-years',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.DateField.head,Roo.bootstrap.DateField.content,Roo.bootstrap.DateField.footer]}
 ]}]}});
 // Roo/bootstrap/TimeField.js
-Roo.bootstrap.TimeField=function(A){Roo.bootstrap.TimeField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true});};Roo.extend(Roo.bootstrap.TimeField,Roo.bootstrap.Input,{format:"H:i",onRender:function(ct,A){Roo.bootstrap.TimeField.superclass.onRender.call(this,ct,A);
-this.el.select('>.input-group',true).first().createChild(Roo.bootstrap.TimeField.template);this.picker().setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.pop=this.picker().select('>.datepicker-time',true).first();this.pop.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';
-this.picker().on('mousedown',this.onMousedown,this);this.picker().on('click',this.onClick,this);this.picker().addClass('datepicker-dropdown');this.fillTime();this.update();this.pop.select('span.hours-up',true).first().on('click',this.onIncrementHours,this);
-this.pop.select('span.hours-down',true).first().on('click',this.onDecrementHours,this);this.pop.select('span.minutes-up',true).first().on('click',this.onIncrementMinutes,this);this.pop.select('span.minutes-down',true).first().on('click',this.onDecrementMinutes,this);
-this.pop.select('button.period',true).first().on('click',this.onTogglePeriod,this);this.pop.select('button.ok',true).first().on('click',this.setTime,this);},fireKey:function(e){if(!this.picker().isVisible()){if(e.keyCode==27){this.show();}return;}e.preventDefault();
-switch(e.keyCode){case 27:this.hide();break;case 37:case 39:this.onTogglePeriod();break;case 38:this.onIncrementMinutes();break;case 40:this.onDecrementMinutes();break;case 13:case 9:this.setTime();break;}},onClick:function(e){e.stopPropagation();e.preventDefault();
-},picker:function(){return this.el.select('.datepicker',true).first();},fillTime:function(){var A=this.pop.select('tbody',true).first();A.dom.innerHTML='';A.createChild({tag:'tr',cn:[{tag:'td',cn:[{tag:'a',href:'#',cls:'btn',cn:[{tag:'span',cls:'hours-up glyphicon glyphicon-chevron-up'}
+Roo.bootstrap.TimeField=function(A){Roo.bootstrap.TimeField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true});};Roo.extend(Roo.bootstrap.TimeField,Roo.bootstrap.Input,{format:"H:i",getAutoCreate:function(){this.after='<i class="fa far fa-clock"></i>';
+Roo.bootstrap.TimeField.superclass.getAutoCreate.call(this);},onRender:function(ct,A){Roo.bootstrap.TimeField.superclass.onRender.call(this,ct,A);this.el.select('>.input-group',true).first().createChild(Roo.bootstrap.TimeField.template);this.picker().setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';
+this.pop=this.picker().select('>.datepicker-time',true).first();this.pop.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.picker().on('mousedown',this.onMousedown,this);this.picker().on('click',this.onClick,this);this.picker().addClass('datepicker-dropdown');
+this.fillTime();this.update();this.pop.select('span.hours-up',true).first().on('click',this.onIncrementHours,this);this.pop.select('span.hours-down',true).first().on('click',this.onDecrementHours,this);this.pop.select('span.minutes-up',true).first().on('click',this.onIncrementMinutes,this);
+this.pop.select('span.minutes-down',true).first().on('click',this.onDecrementMinutes,this);this.pop.select('button.period',true).first().on('click',this.onTogglePeriod,this);this.pop.select('button.ok',true).first().on('click',this.setTime,this);},fireKey:function(e){if(!this.picker().isVisible()){if(e.keyCode==27){this.show();
+}return;}e.preventDefault();switch(e.keyCode){case 27:this.hide();break;case 37:case 39:this.onTogglePeriod();break;case 38:this.onIncrementMinutes();break;case 40:this.onDecrementMinutes();break;case 13:case 9:this.setTime();break;}},onClick:function(e){e.stopPropagation();
+e.preventDefault();},picker:function(){return this.el.select('.datepicker',true).first();},fillTime:function(){var A=this.pop.select('tbody',true).first();A.dom.innerHTML='';A.createChild({tag:'tr',cn:[{tag:'td',cn:[{tag:'a',href:'#',cls:'btn',cn:[{tag:'span',cls:'hours-up glyphicon glyphicon-chevron-up'}
 ]}]},{tag:'td',cls:'separator'},{tag:'td',cn:[{tag:'a',href:'#',cls:'btn',cn:[{tag:'span',cls:'minutes-up glyphicon glyphicon-chevron-up'}]}]},{tag:'td',cls:'separator'}]});A.createChild({tag:'tr',cn:[{tag:'td',cn:[{tag:'span',cls:'timepicker-hour',html:'00'}
 ]},{tag:'td',cls:'separator',html:':'},{tag:'td',cn:[{tag:'span',cls:'timepicker-minute',html:'00'}]},{tag:'td',cls:'separator'},{tag:'td',cn:[{tag:'button',type:'button',cls:'btn btn-primary period',html:'AM'}]}]});A.createChild({tag:'tr',cn:[{tag:'td',cn:[{tag:'a',href:'#',cls:'btn',cn:[{tag:'span',cls:'hours-down glyphicon glyphicon-chevron-down'}
 ]}]},{tag:'td',cls:'separator'},{tag:'td',cn:[{tag:'a',href:'#',cls:'btn',cn:[{tag:'span',cls:'minutes-down glyphicon glyphicon-chevron-down'}]}]},{tag:'td',cls:'separator'}]});},update:function(){this.time=(typeof(this.time)==='undefined')?new Date():this.time;