roojs-bootstrap.js
authoredward <edward@roojs.com>
Fri, 28 Jul 2017 07:25:52 +0000 (15:25 +0800)
committeredward <edward@roojs.com>
Fri, 28 Jul 2017 07:25:52 +0000 (15:25 +0800)
roojs-bootstrap-debug.js

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

index e8cd359..877bdc7 100644 (file)
@@ -13877,7 +13877,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         };
         
         var combobox = {
-            cls: 'roo-select2-container input-group roo-touchview-combobox',
+            cls: 'roo-select2-container input-group roo-touchview-combobox ',
             cn: [
                 box
             ]
@@ -16843,6 +16843,7 @@ Roo.apply(Roo.bootstrap.TabGroup, {
  * @cfg {String} html panel content
  * @cfg {String} tabId  unique tab ID (will be autogenerated if not set. - used to match TabItem to Panel)
  * @cfg {String} navId The Roo.bootstrap.NavGroup which triggers show hide ()
+ * @cfg {String} href click to link..
  * 
  * 
  * @constructor
@@ -16881,6 +16882,7 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     html: false,
     tabId: false,
     navId : false,
+    href : '',
     
     getAutoCreate : function(){
         var cfg = {
@@ -16920,6 +16922,10 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
             }
         }
         
+        if(this.href.length){
+            this.el.on('click', this.onClick, this);
+        }
+        
     },
     
     
@@ -16948,6 +16954,13 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
         }
         
         this.fireEvent('changed', this, state);
+    },
+    
+    onClick: function(e)
+    {
+        e.preventDefault();
+        
+        window.location.href = this.href;
     }
     
     
index 9fa360f..3ac9fd5 100644 (file)
@@ -545,7 +545,7 @@ return true;}this.markInvalid();return false;},tickableInputEl:function(){if(!th
 var A={cls:'form-group'};var B={tag:'input',id:id,type:this.inputType,cls:'form-control x-combo-noedit',autocomplete:'new-password',placeholder:this.placeholder||'',readonly:true};if(this.name){B.name=this.name;}if(this.size){B.cls+=' input-'+this.size;}if(this.disabled){B.disabled=true;
 }var C={cls:'',cn:[B]};if(this.before){C.cls+=' input-group';C.cn.unshift({tag:'span',cls:'input-group-addon',html:this.before});}if(this.removable&&!this.multiple){C.cls+=' roo-removable';C.cn.push({tag:'button',html:'x',cls:'roo-combo-removable-btn close'}
 );}if(this.hasFeedback&&!this.allowBlank){C.cls+=' has-feedback';C.cn.push({tag:'span',cls:'glyphicon form-control-feedback'});}if(this.after){C.cls+=(this.before)?'':' input-group';C.cn.push({tag:'span',cls:'input-group-addon',html:this.after});}var D={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'}
-,C]};if(this.multiple){D={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},{tag:'ul',cls:'roo-select2-choices',cn:[{tag:'li',cls:'roo-select2-search-field',cn:[C]}]}]}};var E={cls:'roo-select2-container input-group roo-touchview-combobox',cn:[D]}
+,C]};if(this.multiple){D={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'},{tag:'ul',cls:'roo-select2-choices',cn:[{tag:'li',cls:'roo-select2-search-field',cn:[C]}]}]}};var E={cls:'roo-select2-container input-group roo-touchview-combobox ',cn:[D]}
 ;if(!this.multiple&&this.showToggleBtn){var F={tag:'span',cls:'caret'};if(this.caret!=false){F={tag:'i',cls:'fa fa-'+this.caret};}E.cn.push({tag:'span',cls:'input-group-addon btn dropdown-toggle',cn:[F,{tag:'span',cls:'combobox-clear',cn:[{tag:'i',cls:'icon-remove'}
 ]}]})}if(this.multiple){E.cls+=' roo-select2-container-multi';}var G=this.labelAlign||this.parentLabelAlign();A.cn=E;if(this.fieldLabel.length&&this.labelWidth){var lw=G==='left'?('col-sm'+this.labelWidth):'';var cw=G==='left'?('col-sm'+(12-this.labelWidth)):'';
 A.cn=[{tag:'label',cls:'control-label '+lw,html:this.fieldLabel},{cls:cw,cn:[E]}];}var H=this;['xs','sm','md','lg'].map(function(I){if(H[I]){A.cls+=' col-'+I+'-'+H[I];}});return A;},initTouchView:function(){this.renderTouchView();this.touchViewEl.on('scroll',function(){this.el.dom.scrollTop=0;
@@ -679,10 +679,10 @@ this.slideFn=window.setInterval(function(){C.showPanelNext();},this.timer);}}).c
 });var A=this.el.select('.bullet-'+i,true).first();if(!A){return;}A.addClass('selected');}});Roo.apply(Roo.bootstrap.TabGroup,{groups:{},register:function(A){this.groups[A.navId]=A;},get:function(A){if(typeof(this.groups[A])=='undefined'){this.register(new Roo.bootstrap.TabGroup({navId:A}
 ));}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||''}
+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,href:'',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(){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&&tg.bullets>0&&i<tg.bullets){tg.setActiveBullet(i);}}if(this.href.length){this.el.on('click',this.onClick,this);}},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);},onClick:function(e){e.preventDefault();window.location.href=this.href;}});
 // 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;