roojs-bootstrap.js
authorleon <leon@roojs.com>
Wed, 9 Aug 2023 07:17:29 +0000 (15:17 +0800)
committerleon <leon@roojs.com>
Wed, 9 Aug 2023 07:17:29 +0000 (15:17 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 2c2c4da..5970545 100644 (file)
@@ -24500,7 +24500,7 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
         this.update();
         this.place();
         
-        this.fireEvent('show', this, this.date);
+        this.fireEvent('show', this, this.time);
     },
     
     hide : function()
@@ -24508,7 +24508,7 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
         this.picker().hide();
         this.pop.hide();
         
-        this.fireEvent('hide', this, this.date);
+        this.fireEvent('hide', this, this.time);
     },
     
     setTime : function()
@@ -24516,7 +24516,7 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
         this.hide();
         this.setValue(this.time);
         
-        this.fireEvent('select', this, this.date);
+        this.fireEvent('select', this, this.time);
         
         
     },
@@ -24545,7 +24545,7 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
                     hour12 : true
                 }).format(time);
             default :
-                return this.time.format(this.format);
+                return time.format(this.format);
         }
     },
 
index 901102c..d573af2 100644 (file)
@@ -1043,15 +1043,15 @@ A.dom.innerHTML='';A.createChild({tag:'tr',cn:[{tag:'td',cn:[{tag:'a',href:'#',c
 },place:function(){this.picker().removeClass(['bottom-left','bottom-right','top-left','top-right']);var A=['bottom'];if((Roo.lib.Dom.getViewHeight()+Roo.get(document.body).getScroll().top)-(this.inputEl().getBottom()+this.picker().getHeight())<0){A.pop();
 A.push('top');}A.push('right');if((Roo.lib.Dom.getViewWidth()+Roo.get(document.body).getScroll().left)-(this.inputEl().getLeft()+this.picker().getWidth())<0){A.pop();A.push('left');}this.picker().addClass(A.join('-'));var B=this;Roo.each(A,function(c){if(c=='bottom'){(function(){}
 ).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);this.fireEvent('select',this,this.date);},parseTime:function(A){if(!A){return false;}if(A instanceof Date){return A;}var v=Date.parseDate(A,'H:i:s');return (typeof(v)=='undefined')?false:v;},translateTime:function(A){switch(this.language){case 'zh_CN':return new Intl.DateTimeFormat('zh-CN',{hour:'numeric',minute:'numeric',hour12:true}
-).format(A);default:return this.time.format(this.format);}},setValue:function(v){var t=this.parseTime(v);if(!t){this.time=this.value=this.hiddenField.value='';if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);this.validate();}return;
-}this.value=this.hiddenField.value=t.dateFormat('H:i:s');v=this.translateTime(t);if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);this.validate();}this.time=t;this.update();},setRawValue:function(v){var t=this.parseTime(v);if(!t){this.time=this.value=this.hiddenField.value='';
-if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);}return;}this.value=this.hiddenField.value=t.dateFormat('H:i:s');v=this.translateTime(t);if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);}this.time=t;this.update();
-},getValue:function(){return this.value;},getRawValue:function(){return this.getValue();},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');var A=Math.round((parseInt(this.time.format('i'))+this.minuteStep)/this.minuteStep)*this.minuteStep-parseInt(this.time.format('i'));
-this.time=this.time.add(Date.MINUTE,A);this.update();},onDecrementMinutes:function(){Roo.log('onDecrementMinutes');var A=parseInt(this.time.format('i'))-Math.round((parseInt(this.time.format('i'))-this.minuteStep)/this.minuteStep)*this.minuteStep;this.time=this.time.add(Date.MINUTE,-1*A);
-this.update();},onTogglePeriod:function(){Roo.log('onTogglePeriod');this.time=this.time.add(Date.HOUR,12);this.update();}});Roo.apply(Roo.bootstrap.form.TimeField,{okText:'OK',periodText:{en:{am:'AM',pm:'PM'},zh_CN:{am:'上午',pm:'下午'}}});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'}
+this.hide();},show:function(){this.picker().show();this.pop.show();this.update();this.place();this.fireEvent('show',this,this.time);},hide:function(){this.picker().hide();this.pop.hide();this.fireEvent('hide',this,this.time);},setTime:function(){this.hide();
+this.setValue(this.time);this.fireEvent('select',this,this.time);},parseTime:function(A){if(!A){return false;}if(A instanceof Date){return A;}var v=Date.parseDate(A,'H:i:s');return (typeof(v)=='undefined')?false:v;},translateTime:function(A){switch(this.language){case 'zh_CN':return new Intl.DateTimeFormat('zh-CN',{hour:'numeric',minute:'numeric',hour12:true}
+).format(A);default:return A.format(this.format);}},setValue:function(v){var t=this.parseTime(v);if(!t){this.time=this.value=this.hiddenField.value='';if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);this.validate();}return;}this.value=this.hiddenField.value=t.dateFormat('H:i:s');
+v=this.translateTime(t);if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);this.validate();}this.time=t;this.update();},setRawValue:function(v){var t=this.parseTime(v);if(!t){this.time=this.value=this.hiddenField.value='';if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);
+}return;}this.value=this.hiddenField.value=t.dateFormat('H:i:s');v=this.translateTime(t);if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);}this.time=t;this.update();},getValue:function(){return this.value;},getRawValue:function(){return this.getValue();
+},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');var A=Math.round((parseInt(this.time.format('i'))+this.minuteStep)/this.minuteStep)*this.minuteStep-parseInt(this.time.format('i'));this.time=this.time.add(Date.MINUTE,A);this.update();
+},onDecrementMinutes:function(){Roo.log('onDecrementMinutes');var A=parseInt(this.time.format('i'))-Math.round((parseInt(this.time.format('i'))-this.minuteStep)/this.minuteStep)*this.minuteStep;this.time=this.time.add(Date.MINUTE,-1*A);this.update();},onTogglePeriod:function(){Roo.log('onTogglePeriod');
+this.time=this.time.add(Date.HOUR,12);this.update();}});Roo.apply(Roo.bootstrap.form.TimeField,{okText:'OK',periodText:{en:{am:'AM',pm:'PM'},zh_CN:{am:'上午',pm:'下午'}}});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);