roojs-bootstrap.js
authoredward <edward@roojs.com>
Wed, 22 Jun 2016 02:49:41 +0000 (10:49 +0800)
committeredward <edward@roojs.com>
Wed, 22 Jun 2016 02:49:41 +0000 (10:49 +0800)
roojs-bootstrap-debug.js

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

index bd89f01..c8e1c42 100644 (file)
@@ -9051,7 +9051,7 @@ Roo.extend(Roo.bootstrap.TriggerField, Roo.bootstrap.Input,  {
         };
         
         if(this.multiple){
-            Roo.log('multiple');
+//            Roo.log('multiple');
             
             box = {
                 tag: 'div',
@@ -9131,7 +9131,7 @@ Roo.extend(Roo.bootstrap.TriggerField, Roo.bootstrap.Input,  {
         
         if (align ==='left' && this.fieldLabel.length) {
             
-                Roo.log("left and has label");
+//                Roo.log("left and has label");
                 cfg.cn = [
                     
                     {
@@ -9150,7 +9150,7 @@ Roo.extend(Roo.bootstrap.TriggerField, Roo.bootstrap.Input,  {
                     
                 ];
         } else if ( this.fieldLabel.length) {
-                Roo.log(" label");
+//                Roo.log(" label");
                  cfg.cn = [
                    
                     {
@@ -9166,7 +9166,7 @@ Roo.extend(Roo.bootstrap.TriggerField, Roo.bootstrap.Input,  {
 
         } else {
             
-                Roo.log(" no label && no align");
+//                Roo.log(" no label && no align");
                 cfg = combobox
                      
                 
@@ -16098,8 +16098,6 @@ Roo.extend(Roo.bootstrap.TabGroup, Roo.bootstrap.Column,  {
     
     initEvents:  function()
     {
-        Roo.log('-------- init events on tab group ---------');
-        
         if(Roo.isTouch && this.slideOnTouch){
             this.el.on("touchstart", this.onTouchStart, this);
         }
@@ -16444,8 +16442,6 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     
     initEvents:  function()
     {
-        Roo.log('-------- init events on tab panel ---------');
-        
         var p = this.parent();
         this.navId = this.navId || p.navId;
         
index 3f06213..1fe0500 100644 (file)
@@ -356,19 +356,18 @@ Roo.bootstrap.TriggerField=function(A){this.mimicing=false;Roo.bootstrap.Trigger
 var id=Roo.id();var B={cls:'form-group'};var C={tag:'input',id:id,type:this.inputType,cls:'form-control',autocomplete:'new-password',placeholder:this.placeholder||''};if(this.name){C.name=this.name;}if(this.size){C.cls+=' input-'+this.size;}if(this.disabled){C.disabled=true;
 }var D=C;if(this.hasFeedback&&!this.allowBlank){var E={tag:'span',cls:'glyphicon form-control-feedback'};if(this.removable&&!this.editable&&!this.tickable){D={cls:'has-feedback',cn:[D,{tag:'button',html:'x',cls:'roo-combo-removable-btn close'},E]};}else{D={cls:'has-feedback',cn:[D,E]}
 ;}}else{if(this.removable&&!this.editable&&!this.tickable){D={cls:'roo-removable',cn:[D,{tag:'button',html:'x',cls:'roo-combo-removable-btn close'}]};}}if(this.before||this.after){D={cls:'input-group',cn:[]};if(this.before){D.cn.push({tag:'span',cls:'input-group-addon',html:this.before}
-);}D.cn.push(C);if(this.hasFeedback&&!this.allowBlank){D.cls+=' has-feedback';D.cn.push(E);}if(this.after){D.cn.push({tag:'span',cls:'input-group-addon',html:this.after});}};var F={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},D]};if(this.multiple){Roo.log('multiple');
-F={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},{tag:'ul',cls:'select2-choices',cn:[{tag:'li',cls:'select2-search-field',cn:[D]}]}]}};var G={cls:'select2-container input-group',cn:[F]};if(!this.multiple&&this.showToggleBtn){var H={tag:'span',cls:'caret'}
-;if(this.caret!=false){H={tag:'i',cls:'fa fa-'+this.caret};}G.cn.push({tag:'span',cls:'input-group-addon btn dropdown-toggle',cn:[H,{tag:'span',cls:'combobox-clear',cn:[{tag:'i',cls:'icon-remove'}]}]})}if(this.multiple){G.cls+=' select2-container-multi';}
-if(A==='left'&&this.fieldLabel.length){Roo.log("left and has label");B.cn=[{tag:'label','for':id,cls:'control-label col-sm-'+this.labelWidth,html:this.fieldLabel},{cls:"col-sm-"+(12-this.labelWidth),cn:[G]}];}else if(this.fieldLabel.length){Roo.log(" label");
-B.cn=[{tag:'label',html:this.fieldLabel},G];}else{Roo.log(" no label && no align");B=G}var I=this;['xs','sm','md','lg'].map(function(J){if(I[J]){B.cls+=' col-'+J+'-'+I[J];}});Roo.log(B);return B;},onResize:function(w,h){},adjustSize:Roo.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.inputEl();
-},getPositionEl:function(){return this.inputEl();},alignErrorIcon:function(){this.errorIcon.alignTo(this.inputEl(),'tl-tr',[2,0]);},initEvents:function(){this.createList();Roo.bootstrap.TriggerField.superclass.initEvents.call(this);if(!this.multiple&&this.showToggleBtn){this.trigger=this.el.select('span.dropdown-toggle',true).first();
-if(this.hideTrigger){this.trigger.setDisplayed(false);}this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});}if(this.multiple){this.inputEl().on("click",this.onTriggerClick,this,{preventDefault:true});}if(this.removable&&!this.editable&&!this.tickable){var A=this.closeTriggerEl();
-if(A){A.setVisibilityMode(Roo.Element.DISPLAY).hide();A.on('click',this.removeBtnClick,this,A);}}},closeTriggerEl:function(){var A=this.el.select('.roo-combo-removable-btn',true).first();return A?A:false;},removeBtnClick:function(e,h,el){e.preventDefault();
-if(this.fireEvent("remove",this)!==false){this.reset();}},createList:function(){this.list=Roo.get(document.body).createChild({tag:'ul',cls:'typeahead typeahead-long dropdown-menu',style:'display:none'});this.list.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';
-;},initTrigger:function(){},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();}Roo.bootstrap.TriggerField.superclass.onDestroy.call(this);},onFocus:function(){Roo.bootstrap.TriggerField.superclass.onFocus.call(this);},checkTab:function(e){if(e.getKey()==e.TAB){this.triggerBlur();
-}},onBlur:function(){},mimicBlur:function(e,t){},triggerBlur:function(){this.mimicing=false;Roo.get(Roo.isIE?document.body:document).un("mousedown",this.mimicBlur);if(this.monitorTab){this.el.un("keydown",this.checkTab,this);}Roo.bootstrap.TriggerField.superclass.onBlur.call(this);
-},validateBlur:function(e,t){return true;},onDisable:function(){this.inputEl().dom.disabled=true;},onEnable:function(){this.inputEl().dom.disabled=false;},onShow:function(){var ae=this.getActionEl();if(ae){ae.dom.style.display='';ae.dom.style.visibility='visible';
-}},onHide:function(){var ae=this.getActionEl();ae.dom.style.display='none';},onTriggerClick:Roo.emptyFn});
+);}D.cn.push(C);if(this.hasFeedback&&!this.allowBlank){D.cls+=' has-feedback';D.cn.push(E);}if(this.after){D.cn.push({tag:'span',cls:'input-group-addon',html:this.after});}};var F={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},D]};if(this.multiple){F={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'}
+,{tag:'ul',cls:'select2-choices',cn:[{tag:'li',cls:'select2-search-field',cn:[D]}]}]}};var G={cls:'select2-container input-group',cn:[F]};if(!this.multiple&&this.showToggleBtn){var H={tag:'span',cls:'caret'};if(this.caret!=false){H={tag:'i',cls:'fa fa-'+this.caret}
+;}G.cn.push({tag:'span',cls:'input-group-addon btn dropdown-toggle',cn:[H,{tag:'span',cls:'combobox-clear',cn:[{tag:'i',cls:'icon-remove'}]}]})}if(this.multiple){G.cls+=' select2-container-multi';}if(A==='left'&&this.fieldLabel.length){B.cn=[{tag:'label','for':id,cls:'control-label col-sm-'+this.labelWidth,html:this.fieldLabel}
+,{cls:"col-sm-"+(12-this.labelWidth),cn:[G]}];}else if(this.fieldLabel.length){B.cn=[{tag:'label',html:this.fieldLabel},G];}else{B=G}var I=this;['xs','sm','md','lg'].map(function(J){if(I[J]){B.cls+=' col-'+J+'-'+I[J];}});Roo.log(B);return B;},onResize:function(w,h){}
+,adjustSize:Roo.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.inputEl();},getPositionEl:function(){return this.inputEl();},alignErrorIcon:function(){this.errorIcon.alignTo(this.inputEl(),'tl-tr',[2,0]);},initEvents:function(){this.createList();
+Roo.bootstrap.TriggerField.superclass.initEvents.call(this);if(!this.multiple&&this.showToggleBtn){this.trigger=this.el.select('span.dropdown-toggle',true).first();if(this.hideTrigger){this.trigger.setDisplayed(false);}this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true}
+);}if(this.multiple){this.inputEl().on("click",this.onTriggerClick,this,{preventDefault:true});}if(this.removable&&!this.editable&&!this.tickable){var A=this.closeTriggerEl();if(A){A.setVisibilityMode(Roo.Element.DISPLAY).hide();A.on('click',this.removeBtnClick,this,A);
+}}},closeTriggerEl:function(){var A=this.el.select('.roo-combo-removable-btn',true).first();return A?A:false;},removeBtnClick:function(e,h,el){e.preventDefault();if(this.fireEvent("remove",this)!==false){this.reset();}},createList:function(){this.list=Roo.get(document.body).createChild({tag:'ul',cls:'typeahead typeahead-long dropdown-menu',style:'display:none'}
+);this.list.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';;},initTrigger:function(){},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();}Roo.bootstrap.TriggerField.superclass.onDestroy.call(this);},onFocus:function(){Roo.bootstrap.TriggerField.superclass.onFocus.call(this);
+},checkTab:function(e){if(e.getKey()==e.TAB){this.triggerBlur();}},onBlur:function(){},mimicBlur:function(e,t){},triggerBlur:function(){this.mimicing=false;Roo.get(Roo.isIE?document.body:document).un("mousedown",this.mimicBlur);if(this.monitorTab){this.el.un("keydown",this.checkTab,this);
+}Roo.bootstrap.TriggerField.superclass.onBlur.call(this);},validateBlur:function(e,t){return true;},onDisable:function(){this.inputEl().dom.disabled=true;},onEnable:function(){this.inputEl().dom.disabled=false;},onShow:function(){var ae=this.getActionEl();
+if(ae){ae.dom.style.display='';ae.dom.style.visibility='visible';}},onHide:function(){var ae=this.getActionEl();ae.dom.style.display='none';},onTriggerClick:Roo.emptyFn});
 // Roo/data/SortTypes.js
 Roo.data.SortTypes={none:function(s){return s;},stripTagsRE:/<\/?[^>]+>/gi,asText:function(s){return String(s).replace(this.stripTagsRE,"");},asUCText:function(s){return String(s).toUpperCase().replace(this.stripTagsRE,"");},asUCString:function(s){return String(s).toUpperCase();
 },asDate:function(s){if(!s){return 0;}if(s instanceof Date){return s.getTime();}return Date.parse(String(s));},asFloat:function(s){var A=parseFloat(String(s).replace(/,/g,""));if(isNaN(A)){A=0;}return A;},asInt:function(s){var A=parseInt(String(s).replace(/,/g,""));
@@ -647,8 +646,8 @@ Roo.bootstrap.ProgressBar=function(A){Roo.bootstrap.ProgressBar.superclass.const
 // Roo/bootstrap/TabGroup.js
 Roo.bootstrap.TabGroup=function(A){Roo.bootstrap.TabGroup.superclass.constructor.call(this,A);if(!this.navId){this.navId=Roo.id();}this.tabs=[];Roo.bootstrap.TabGroup.register(this);};Roo.extend(Roo.bootstrap.TabGroup,Roo.bootstrap.Column,{carousel:false,transition:false,bullets:0,timer:0,autoslide:false,slideFn:false,slideOnTouch:false,getAutoCreate:function(){var A=Roo.apply({}
 ,Roo.bootstrap.TabGroup.superclass.getAutoCreate.call(this));A.cls+=' tab-content';if(this.carousel){A.cls+=' carousel slide';A.cn=[{cls:'carousel-inner'}];if(this.bullets&&!Roo.isTouch){var B={cls:'carousel-bullets',cn:[]};if(this.bullets_cls){B.cls=B.cls+' '+this.bullets_cls;
-}B.cn.push({cls:'clear'});A.cn[0].cn=B;}}return A;},initEvents:function(){Roo.log('-------- init events on tab group ---------');if(Roo.isTouch&&this.slideOnTouch){this.el.on("touchstart",this.onTouchStart,this);}if(this.autoslide){var A=this;this.slideFn=window.setInterval(function(){A.showPanelNext();
-},this.timer);}},onTouchStart:function(e,el,o){if(!this.slideOnTouch||!Roo.isTouch||Roo.get(e.getTarget()).hasClass('roo-button-text')){return;}this.showPanelNext();},getChildContainer:function(){return this.carousel?this.el.select('.carousel-inner',true).first():this.el;
+}B.cn.push({cls:'clear'});A.cn[0].cn=B;}}return A;},initEvents:function(){if(Roo.isTouch&&this.slideOnTouch){this.el.on("touchstart",this.onTouchStart,this);}if(this.autoslide){var A=this;this.slideFn=window.setInterval(function(){A.showPanelNext();},this.timer);
+}},onTouchStart:function(e,el,o){if(!this.slideOnTouch||!Roo.isTouch||Roo.get(e.getTarget()).hasClass('roo-button-text')){return;}this.showPanelNext();},getChildContainer:function(){return this.carousel?this.el.select('.carousel-inner',true).first():this.el;
 },register:function(A){this.tabs.push(A);A.navId=this.navId;this.addBullet();},getActivePanel:function(){var r=false;Roo.each(this.tabs,function(t){if(t.active){r=t;return false;}return null;});return r;},getPanelByName:function(n){var r=false;Roo.each(this.tabs,function(t){if(t.tabId==n){r=t;
 return false;}return null;});return r;},indexOfPanel:function(p){var r=false;Roo.each(this.tabs,function(t,i){if(t.tabId==p.tabId){r=i;return false;}return null;});return r;},showPanel:function(A){if(this.transition||typeof(A)=='undefined'){Roo.log("waiting for the transitionend");
 return;}if(typeof(A)=='number'){A=this.tabs[A];}if(typeof(A)=='string'){A=this.getPanelByName(A);}var B=this.getActivePanel();if(!A||!B){Roo.log('pan or acitve pan is undefined');return false;}if(A.tabId==this.getActivePanel().tabId){return true;}if(false===B.fireEvent('beforedeactivate')){return false;
@@ -662,9 +661,9 @@ this.slideFn=window.setInterval(function(){C.showPanelNext();},this.timer);}}).c
 ));}return this.groups[A];}});
 // Roo/bootstrap/TabPanel.js
 Roo.bootstrap.TabPanel=function(A){Roo.bootstrap.TabPanel.superclass.constructor.call(this,A);this.addEvents({'changed':true,'beforedeactivate':true});this.tabId=this.tabId||Roo.id();};Roo.extend(Roo.bootstrap.TabPanel,Roo.bootstrap.Component,{active:false,html:false,tabId:false,navId:false,getAutoCreate:function(){var A={tag:'div',cls:'tab-pane item',html:this.html||''}
-;if(this.active){A.cls+=' active';}if(this.tabId){A.tabId=this.tabId;}return A;},initEvents:function(){Roo.log('-------- init events on tab panel ---------');var p=this.parent();this.navId=this.navId||p.navId;if(typeof(this.navId)!='undefined'){var tg=Roo.bootstrap.TabGroup.get(this.navId);
-tg.register(this);var i=tg.tabs.length-1;if(this.active&&tg.bullets>0&&i<tg.bullets){tg.setActiveBullet(i);}}},onRender:function(ct,A){Roo.bootstrap.TabPanel.superclass.onRender.call(this,ct,A);},setActive:function(A){Roo.log("panel - set active "+this.tabId+"="+A);
-this.active=A;if(!A){this.el.removeClass('active');}else if(!this.el.hasClass('active')){this.el.addClass('active');}this.fireEvent('changed',this,A);}});
+;if(this.active){A.cls+=' active';}if(this.tabId){A.tabId=this.tabId;}return A;},initEvents:function(){var p=this.parent();this.navId=this.navId||p.navId;if(typeof(this.navId)!='undefined'){var tg=Roo.bootstrap.TabGroup.get(this.navId);tg.register(this);var i=tg.tabs.length-1;
+if(this.active&&tg.bullets>0&&i<tg.bullets){tg.setActiveBullet(i);}}},onRender:function(ct,A){Roo.bootstrap.TabPanel.superclass.onRender.call(this,ct,A);},setActive:function(A){Roo.log("panel - set active "+this.tabId+"="+A);this.active=A;if(!A){this.el.removeClass('active');
+}else if(!this.el.hasClass('active')){this.el.addClass('active');}this.fireEvent('changed',this,A);}});
 // Roo/bootstrap/DateField.js
 Roo.bootstrap.DateField=function(A){Roo.bootstrap.DateField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true,beforeselect:true});};Roo.extend(Roo.bootstrap.DateField,Roo.bootstrap.Input,{format:"m/d/y",altFormats:"m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d",weekStart:0,viewMode:'',minViewMode:'',todayHighlight:false,todayBtn:false,language:'en',keyboardNavigation:true,calendarWeeks:false,startDate:-Infinity,endDate:Infinity,daysOfWeekDisabled:[],_events:[],singleMode:false,UTCDate:function(){return new Date(Date.UTC.apply(Date,arguments));
 },UTCToday:function(){var A=new Date();return this.UTCDate(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate());},getDate:function(){var d=this.getUTCDate();return new Date(d.getTime()+(d.getTimezoneOffset()*60000));},getUTCDate:function(){return this.date;