fix #7444-New_Customer_Portal_200_Design
authorleon <leon@roojs.com>
Mon, 19 Dec 2022 07:31:09 +0000 (15:31 +0800)
committerleon <leon@roojs.com>
Mon, 19 Dec 2022 07:31:09 +0000 (15:31 +0800)
Roo/bootstrap/form/TimeField.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 4138a97..9a8d122 100644 (file)
@@ -9,6 +9,7 @@
  * @class Roo.bootstrap.form.TimeField
  * @extends Roo.bootstrap.form.Input
  * Bootstrap DateField class
+ * @cfg {Number} minuteStep the minutes goes up/down by a fixed number, default 1
  * 
  * 
  * @constructor
@@ -51,6 +52,7 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
      * valid according to {@link Date#parseDate} (defaults to 'H:i').
      */
     format : "H:i",
+    minuteStep : 1,
 
     getAutoCreate : function()
     {
@@ -431,14 +433,14 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
     onIncrementMinutes: function()
     {
         Roo.log('onIncrementMinutes');
-        this.time = this.time.add(Date.MINUTE, 1);
+        this.time = this.time.add(Date.MINUTE, this.minuteStep);
         this.update();
     },
     
     onDecrementMinutes: function()
     {
         Roo.log('onDecrementMinutes');
-        this.time = this.time.add(Date.MINUTE, -1);
+        this.time = this.time.add(Date.MINUTE, -1 * this.minuteStep);
         this.update();
     },
     
index add16b4..bba0922 100644 (file)
@@ -23973,6 +23973,7 @@ Roo.apply(Roo.bootstrap.form.DateField,  {
  * @class Roo.bootstrap.form.TimeField
  * @extends Roo.bootstrap.form.Input
  * Bootstrap DateField class
+ * @cfg {Number} minuteStep the minutes goes up/down by a fixed number, default 1
  * 
  * 
  * @constructor
@@ -24015,6 +24016,7 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
      * valid according to {@link Date#parseDate} (defaults to 'H:i').
      */
     format : "H:i",
+    minuteStep : 1,
 
     getAutoCreate : function()
     {
@@ -24395,14 +24397,14 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
     onIncrementMinutes: function()
     {
         Roo.log('onIncrementMinutes');
-        this.time = this.time.add(Date.MINUTE, 1);
+        this.time = this.time.add(Date.MINUTE, this.minuteStep);
         this.update();
     },
     
     onDecrementMinutes: function()
     {
         Roo.log('onDecrementMinutes');
-        this.time = this.time.add(Date.MINUTE, -1);
+        this.time = this.time.add(Date.MINUTE, -1 * this.minuteStep);
         this.update();
     },
     
index 2524b1a..427d550 100644 (file)
@@ -1015,7 +1015,7 @@ if(B!==true){return false;}}if(this.regex&&!this.regex.test(A)){return false;}if
 ,Roo.bootstrap.form.DateField.footer]}]},{tag:'div',cls:'datepicker-months',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.form.DateField.head,Roo.bootstrap.form.DateField.content,Roo.bootstrap.form.DateField.footer]}]},{tag:'div',cls:'datepicker-years',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.form.DateField.head,Roo.bootstrap.form.DateField.content,Roo.bootstrap.form.DateField.footer]}
 ]}]}});
 // Roo/bootstrap/form/TimeField.js
-Roo.bootstrap.form.TimeField=function(A){Roo.bootstrap.form.TimeField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true});};Roo.extend(Roo.bootstrap.form.TimeField,Roo.bootstrap.form.Input,{format:"H:i",getAutoCreate:function(){this.after='<i class="fa far fa-clock"></i>';
+Roo.bootstrap.form.TimeField=function(A){Roo.bootstrap.form.TimeField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true});};Roo.extend(Roo.bootstrap.form.TimeField,Roo.bootstrap.form.Input,{format:"H:i",minuteStep:1,getAutoCreate:function(){this.after='<i class="fa far fa-clock"></i>';
 return Roo.bootstrap.form.TimeField.superclass.getAutoCreate.call(this);},onRender:function(ct,A){Roo.bootstrap.form.TimeField.superclass.onRender.call(this,ct,A);this.pickerEl=Roo.get(document.body).createChild(Roo.bootstrap.form.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('.hours-up',true).first().on('click',this.onIncrementHours,this);this.pop.select('.hours-down',true).first().on('click',this.onDecrementHours,this);this.pop.select('.minutes-up',true).first().on('click',this.onIncrementMinutes,this);
@@ -1031,8 +1031,8 @@ A.push('top');}A.push('right');if((Roo.lib.Dom.getViewWidth()+Roo.get(document.b
 ).defer(200);B.picker().alignTo(B.inputEl(),"tr-br",[0,10],false);return;}if(c=='top'){B.picker().alignTo(B.inputEl(),"br-tr",[0,10],false);return;}});},onFocus:function(){Roo.bootstrap.form.TimeField.superclass.onFocus.call(this);this.show();},onBlur:function(){Roo.bootstrap.form.TimeField.superclass.onBlur.call(this);
 this.hide();},show:function(){this.picker().show();this.pop.show();this.update();this.place();this.fireEvent('show',this,this.date);},hide:function(){this.picker().hide();this.pop.hide();this.fireEvent('hide',this,this.date);},setTime:function(){this.hide();
 this.setValue(this.time.format(this.format));this.fireEvent('select',this,this.date);},onMousedown:function(e){e.stopPropagation();e.preventDefault();},onIncrementHours:function(){Roo.log('onIncrementHours');this.time=this.time.add(Date.HOUR,1);this.update();
-},onDecrementHours:function(){Roo.log('onDecrementHours');this.time=this.time.add(Date.HOUR,-1);this.update();},onIncrementMinutes:function(){Roo.log('onIncrementMinutes');this.time=this.time.add(Date.MINUTE,1);this.update();},onDecrementMinutes:function(){Roo.log('onDecrementMinutes');
-this.time=this.time.add(Date.MINUTE,-1);this.update();},onTogglePeriod:function(){Roo.log('onTogglePeriod');this.time=this.time.add(Date.HOUR,12);this.update();}});Roo.apply(Roo.bootstrap.form.TimeField,{template:{tag:'div',cls:'datepicker dropdown-menu',cn:[{tag:'div',cls:'datepicker-time',cn:[{tag:'table',cls:'table-condensed',cn:[{tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:'7'}
+},onDecrementHours:function(){Roo.log('onDecrementHours');this.time=this.time.add(Date.HOUR,-1);this.update();},onIncrementMinutes:function(){Roo.log('onIncrementMinutes');this.time=this.time.add(Date.MINUTE,this.minuteStep);this.update();},onDecrementMinutes:function(){Roo.log('onDecrementMinutes');
+this.time=this.time.add(Date.MINUTE,-1*this.minuteStep);this.update();},onTogglePeriod:function(){Roo.log('onTogglePeriod');this.time=this.time.add(Date.HOUR,12);this.update();}});Roo.apply(Roo.bootstrap.form.TimeField,{template:{tag:'div',cls:'datepicker dropdown-menu',cn:[{tag:'div',cls:'datepicker-time',cn:[{tag:'table',cls:'table-condensed',cn:[{tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:'7'}
 ]}]},{tag:'tfoot',cn:[{tag:'tr',cn:[{tag:'th',colspan:'7',cls:'',cn:[{tag:'button',cls:'btn btn-info ok',html:'OK'}]}]}]}]}]}]}});
 // Roo/bootstrap/form/MonthField.js
 Roo.bootstrap.form.MonthField=function(A){Roo.bootstrap.form.MonthField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true});};Roo.extend(Roo.bootstrap.form.MonthField,Roo.bootstrap.form.Input,{onRender:function(ct,A){Roo.bootstrap.form.MonthField.superclass.onRender.call(this,ct,A);