Fix #6883 - image loading tidy up
[roojs1] / roojs-bootstrap.js
index b2bb8a3..6fadcc4 100644 (file)
@@ -13,21 +13,22 @@ return {pull:function(){var sh=p.shift();if(!sh){sh=Roo.get(Roo.DomHelper.insert
 Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Component=function(A){Roo.bootstrap.Component.superclass.constructor.call(this,A);this.addEvents({"childrenrendered":true});};Roo.extend(Roo.bootstrap.Component,Roo.BoxComponent,{allowDomMove:false,cls:false,style:false,autoCreate:false,tooltip:null,initEvents:function(){}
 ,xattr:false,parentId:false,can_build_overlaid:true,container_method:false,dataId:false,name:false,parent:function(){return Roo.ComponentMgr.get(this.parentId)},onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(this.el){if(this.el.attr('xtype')){this.el.attr('xtypex',this.el.attr('xtype'));
 this.el.dom.removeAttribute('xtype');this.initEvents();}return;}var B=Roo.apply({},this.getAutoCreate());B.id=this.id||Roo.id();if(this.xattr&&typeof(this.xattr)=='object'){for(var i in this.xattr){B[i]=this.xattr[i];}}if(this.dataId){B.dataId=this.dataId;
-}if(this.cls){B.cls=(typeof(B.cls)=='undefined')?this.cls:B.cls+' '+this.cls;}if(this.style){B.style=this.style;}if(this.name){B.name=this.name;}this.el=ct.createChild(B,A);if(this.tooltip){this.tooltipEl().attr('tooltip',this.tooltip);}if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);
-}this.initEvents();},getChildContainer:function(){return this.el;},tooltipEl:function(){return this.el;},addxtype:function(A,B){var cn=this;cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;B=(typeof(B)=='undefined')?'getChildContainer':B;if(typeof(cn.container_method)=='string'){B=cn.container_method;
-}var C=(typeof(A['flexy:foreach'])!='undefined');var D=(typeof(A['flexy:if'])!='undefined');var E=Roo.XComponent.build_from_html;var F=(A.xtype=='Body');var G=(Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body');var H=Roo.get(this[B](false));if((C||D||this.can_build_overlaid==false)&&E){return false;
-}if(!C||!E||F||!G){if(!D||typeof(A.name)=='undefined'||!E||F||!G){return this.addxtypeChild(A,B,F);}var I=H?H.child('>*[name='+A.name+']'):false;if(I){return this.addxtypeChild(Roo.apply({},A),B);}Roo.log('skipping render');return cn;}var J=false;if(!E){return false;
-}while(true){var I=H?H.child('>*[xtype]'):false;if(!I){break;}if(I&&I.attr('xtype').split('.').pop()!=cn.xtype){break;}J=this.addxtypeChild(Roo.apply({},A),B);}return J;},addxtypeChild:function(A,B,C){Roo.debug&&Roo.log('addxtypeChild:'+B);var cn=this;B=(typeof(B)=='undefined')?'getChildContainer':B;
-var D=(typeof(A['flexy:if'])!='undefined')||(typeof(A['flexy:foreach'])!='undefined');skip_children=false;if(!C){if(!this[B](true)){A.items=[];return A;}cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;var E=Roo.XComponent.build_from_html;if(E&&Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var F=Roo.get(this[B](false));
+}if(this.cls){B.cls=(typeof(B.cls)=='undefined'?this.cls:B.cls)+' '+this.cls;}if(this.style){B.style=(typeof(B.style)=='undefined'?this.style:B.style)+'; '+this.style;}if(this.name){B.name=this.name;}this.el=ct.createChild(B,A);if(this.tooltip){this.tooltipEl().attr('tooltip',this.tooltip);
+}if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);}this.initEvents();},getChildContainer:function(){return this.el;},getDocumentBody:function(){return Roo.get(document.body);},tooltipEl:function(){return this.el;},addxtype:function(A,B){var cn=this;
+cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;B=(typeof(B)=='undefined')?'getChildContainer':B;if(typeof(cn.container_method)=='string'){B=cn.container_method;}var C=(typeof(A['flexy:foreach'])!='undefined');var D=(typeof(A['flexy:if'])!='undefined');
+var E=Roo.XComponent.build_from_html;var F=(A.xtype=='Body');var G=(Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body');var H=Roo.get(this[B](false));if((C||D||this.can_build_overlaid==false)&&E){return false;}if(!C||!E||F||!G){if(!D||typeof(A.name)=='undefined'||!E||F||!G){return this.addxtypeChild(A,B,F);
+}var I=H?H.child('>*[name='+A.name+']'):false;if(I){return this.addxtypeChild(Roo.apply({},A),B);}Roo.log('skipping render');return cn;}var J=false;if(!E){return false;}while(true){var I=H?H.child('>*[xtype]'):false;if(!I){break;}if(I&&I.attr('xtype').split('.').pop()!=cn.xtype){break;
+}J=this.addxtypeChild(Roo.apply({},A),B);}return J;},addxtypeChild:function(A,B,C){Roo.debug&&Roo.log('addxtypeChild:'+B);var cn=this;B=(typeof(B)=='undefined')?'getChildContainer':B;var D=(typeof(A['flexy:if'])!='undefined')||(typeof(A['flexy:foreach'])!='undefined');
+skip_children=false;if(!C){if(!this[B](true)){A.items=[];return A;}cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;var E=Roo.XComponent.build_from_html;if(E&&Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var F=Roo.get(this[B](false));
 var G=F?F.child('>*[xtype]'):false;if(G){}if(G&&G.attr('xtype').split('.').pop()==cn.xtype){cn.el=G;}else{Roo.debug&&Roo.log("MISSING "+cn.xtype+" on child of "+(this.el?this.el.attr('xbuilderid'):'no parent'));Roo.debug&&Roo.log(F);Roo.debug&&Roo.log(G);
 Roo.debug&&Roo.log(cn);}}if(E&&D&&!cn.el&&cn.can_build_overlaid){Roo.debug&&Roo.log('skipping render');Roo.debug&&Roo.log(A);if(!cn.el){Roo.debug&&Roo.log('skipping all children');skip_children=true;}}else{cn.render&&cn.render(this[B](true));}}var H=[];if(!A.items||!A.items.length){cn.items=H;
 return cn;}var I=A.items;delete A.items;if(!skip_children){for(var i=0;i<I.length;i++){H.push(cn.addxtype(Roo.apply({},I[i])));}}cn.items=H;cn.fireEvent('childrenrendered',this);return cn;},setVisibilityEl:function(el){this.visibilityEl=el;},getVisibilityEl:function(){if(typeof(this.visibilityEl)=='object'){return this.visibilityEl;
 }if(typeof(this.visibilityEl)=='string'){return this.visibilityEl=='parent'?this.parent().getEl():this.getEl();}return this.getEl();},show:function(){if(!this.getVisibilityEl()){return;}this.getVisibilityEl().removeClass(['hidden','d-none']);this.fireEvent('show',this);
 },hide:function(){if(!this.getVisibilityEl()){return;}this.getVisibilityEl().addClass(['hidden','d-none']);this.fireEvent('hide',this);}});
 // Roo/bootstrap/Element.js
-Roo.bootstrap.Element=function(A){Roo.bootstrap.Element.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Element,Roo.bootstrap.Component,{tag:'div',cls:'',html:'',preventDefault:false,clickable:false,getAutoCreate:function(){var A={tag:this.tag,html:this.html}
-;return A;},initEvents:function(){Roo.bootstrap.Element.superclass.initEvents.call(this);if(this.clickable){this.el.on('click',this.onClick,this);}},onClick:function(e){if(this.preventDefault){e.preventDefault();}this.fireEvent('click',this,e);},getValue:function(){return this.el.dom.innerHTML;
-},setValue:function(A){this.el.dom.innerHTML=A;}});
+Roo.bootstrap.Element=function(A){Roo.bootstrap.Element.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Element,Roo.bootstrap.Component,{tag:'div',cls:'',html:'',preventDefault:false,clickable:false,tapedTwice:false,role:false,getAutoCreate:function(){var A={tag:this.tag,html:this.html}
+;if(this.role!==false){A.role=this.role;}return A;},initEvents:function(){Roo.bootstrap.Element.superclass.initEvents.call(this);if(this.clickable){this.el.on('click',this.onClick,this);}},onClick:function(e){if(this.preventDefault){e.preventDefault();}this.fireEvent('click',this,e);
+},getValue:function(){return this.el.dom.innerHTML;},setValue:function(A){this.el.dom.innerHTML=A;}});
 // Roo/bootstrap/DropTarget.js
 Roo.bootstrap.DropTarget=function(A){Roo.bootstrap.DropTarget.superclass.constructor.call(this,A);this.addEvents({"drop":true});};Roo.extend(Roo.bootstrap.DropTarget,Roo.bootstrap.Element,{getAutoCreate:function(){},initEvents:function(){Roo.bootstrap.DropTarget.superclass.initEvents.call(this);
 this.dropZone=new Roo.dd.DropTarget(this.getEl(),{ddGroup:this.name,listeners:{drop:this.dragDrop.createDelegate(this),enter:this.dragEnter.createDelegate(this),out:this.dragOut.createDelegate(this),over:this.dragOver.createDelegate(this)}});this.dropZone.DDM.useCache=false}
@@ -55,10 +56,11 @@ this.menu.triggerEl=this.el;this.addxtype(Roo.apply({},this.menu));}if(this.el.h
 }if(this.removeClass){this.el.on('click',this.onClick,this);}if(this.group===true){if(this.pressed===false||this.pressed===true){}else{this.pressed=false;this.setActive(this.pressed);}}this.el.enableDisplayMode();},onClick:function(e){if(this.disabled){return;
 }Roo.log('button on click ');if(this.preventDefault){e.preventDefault();}if(this.group){if(this.pressed){return;}this.setActive(true);var pi=this.parent().items;for(var i=0;i<pi.length;i++){if(this==pi[i]){continue;}if(pi[i].el.hasClass('roo-button')){pi[i].setActive(false);
 }}this.fireEvent('click',this,e);return;}if(this.pressed===true||this.pressed===false){this.toggleActive(e);}this.fireEvent('click',this,e);},onDblClick:function(e){if(this.disabled){return;}if(this.preventDefault){e.preventDefault();}this.fireEvent('dblclick',this,e);
-},enable:function(){this.disabled=false;this.el.removeClass('disabled');},disable:function(){this.disabled=true;this.el.addClass('disabled');},setActive:function(v){this.el[v?'addClass':'removeClass']('active');this.pressed=v;},toggleActive:function(e){this.setActive(!this.pressed);
-this.fireEvent('toggle',this,e,this.pressed);},isActive:function(){return this.el.hasClass('active');},setText:function(A){this.el.select('.roo-button-text',true).first().dom.innerHTML=A;},getText:function(){return this.el.select('.roo-button-text',true).first().dom.innerHTML;
-},setWeight:function(A){this.el.removeClass(Roo.bootstrap.Button.weights.map(function(w){return 'btn-'+w;}));this.el.removeClass(Roo.bootstrap.Button.weights.map(function(w){return 'btn-outline-'+w;}));this.weight=A;var B=this.outline?'outline-':'';if(A=='default'){this.el.addClass('btn-default btn-outline-secondary');
-return;}this.el.addClass('btn-'+B+A);}});Roo.bootstrap.Button.weights=['default','secondary','primary','success','info','warning','danger','link','light','dark'];
+},enable:function(){this.disabled=false;this.el.removeClass('disabled');this.el.dom.removeAttribute("disabled");},disable:function(){this.disabled=true;this.el.addClass('disabled');this.el.attr("disabled","disabled")},setActive:function(v){this.el[v?'addClass':'removeClass']('active');
+this.pressed=v;},toggleActive:function(e){this.setActive(!this.pressed);this.fireEvent('toggle',this,e,this.pressed);},isActive:function(){return this.el.hasClass('active');},setText:function(A){this.el.select('.roo-button-text',true).first().dom.innerHTML=A;
+},getText:function(){return this.el.select('.roo-button-text',true).first().dom.innerHTML;},setWeight:function(A){this.el.removeClass(Roo.bootstrap.Button.weights.map(function(w){return 'btn-'+w;}));this.el.removeClass(Roo.bootstrap.Button.weights.map(function(w){return 'btn-outline-'+w;
+}));this.weight=A;var B=this.outline?'outline-':'';if(A=='default'){this.el.addClass('btn-default btn-outline-secondary');return;}this.el.addClass('btn-'+B+A);}});Roo.bootstrap.Button.weights=['default','secondary','primary','success','info','warning','danger','link','light','dark'];
+
 // Roo/bootstrap/Column.js
 Roo.bootstrap.Column=function(A){Roo.bootstrap.Column.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Column,Roo.bootstrap.Component,{xs:false,sm:false,md:false,lg:false,xsoff:false,smoff:false,mdoff:false,lgoff:false,html:'',offset:0,alert:false,fa:false,icon:false,hidden:false,fasize:1,getAutoCreate:function(){var A=Roo.apply({}
 ,Roo.bootstrap.Column.superclass.getAutoCreate.call(this));A={tag:'div',cls:'column'};var B=this;var C=['xs','sm','md','lg'];C.map(function(E,ix){if(B[E+'off']!==false){A.cls+=' col-'+E+'-offset-'+B[E+'off'];}if(B[E]===false){return;}if(!B[E]){A.cls+=' hidden-'+E+' hidden-'+E+'-down';
@@ -80,7 +82,7 @@ return this.el.select('.panel-body',true).first()},titleEl:function(){if(!this.e
 },getTitle:function(){var A=this.titleEl();if(!A){return '';}return A.dom.innerHTML;},setRightTitle:function(v){var t=this.el.select('.panel-header-right',true).first();if(!t){return;}t.dom.innerHTML=v;},onClick:function(e){e.preventDefault();this.fireEvent('click',this,e);
 }});
 // Roo/bootstrap/Card.js
-Roo.bootstrap.Card=function(A){Roo.bootstrap.Card.superclass.constructor.call(this,A);this.addEvents({'drop':true,'rotate':true});};Roo.extend(Roo.bootstrap.Card,Roo.bootstrap.Component,{weight:'',margin:'',margin_top:'',margin_bottom:'',margin_left:'',margin_right:'',margin_x:'',margin_y:'',padding:'',padding_top:'',padding_bottom:'',padding_left:'',padding_right:'',padding_x:'',padding_y:'',display:'',display_xs:'',display_sm:'',display_lg:'',display_xl:'',header_image:'',header:'',header_size:0,title:'',subtitle:'',html:'',footer:'',collapsable:false,collapsed:false,rotateable:false,rotated:false,dragable:false,drag_group:false,dropable:false,drop_group:false,childContainer:false,dropEl:false,containerEl:false,bodyEl:false,headerContainerEl:false,headerEl:false,layoutCls:function(){var A='';
+Roo.bootstrap.Card=function(A){Roo.bootstrap.Card.superclass.constructor.call(this,A);this.addEvents({'drop':true,'rotate':true,'cardover':true});};Roo.extend(Roo.bootstrap.Card,Roo.bootstrap.Component,{weight:'',margin:'',margin_top:'',margin_bottom:'',margin_left:'',margin_right:'',margin_x:'',margin_y:'',padding:'',padding_top:'',padding_bottom:'',padding_left:'',padding_right:'',padding_x:'',padding_y:'',display:'',display_xs:'',display_sm:'',display_lg:'',display_xl:'',header_image:'',header:'',header_size:0,title:'',subtitle:'',html:'',footer:'',collapsable:false,collapsed:false,rotateable:false,rotated:false,dragable:false,drag_group:false,dropable:false,drop_group:false,childContainer:false,dropEl:false,containerEl:false,bodyEl:false,headerContainerEl:false,headerEl:false,header_imageEl:false,layoutCls:function(){var A='';
 var t=this;Roo.log(this.margin_bottom.length);['','top','bottom','left','right','x','y'].forEach(function(v){if((''+t['margin'+(v.length?'_':'')+v]).length){A+=' m'+(v.length?v[0]:'')+'-'+t['margin'+(v.length?'_':'')+v];}if((''+t['padding'+(v.length?'_':'')+v]).length){A+=' p'+(v.length?v[0]:'')+'-'+t['padding'+(v.length?'_':'')+v];
 }});['','xs','sm','lg','xl'].forEach(function(v){if((''+t['display'+(v.length?'_':'')+v]).length){A+=' d'+(v.length?'-':'')+v+'-'+t['display'+(v.length?'_':'')+v]}});if(this.hidden){A+=' d-none';}return A;},getAutoCreate:function(){var A={tag:'div',cls:'card',cn:[]}
 ;if(this.weight.length&&this.weight!='light'){A.cls+=' text-white';}else{A.cls+=' text-dark';}if(this.weight.length){A.cls+=' bg-'+this.weight;}A.cls+=' '+this.layoutCls();var B=false;var C=false;if(this.header.length){B={tag:this.header_size>0?'h'+this.header_size:'div',cls:'card-header '+(this.header_weight?'bg-'+this.header_weight:''),cn:[]}
@@ -89,42 +91,51 @@ var t=this;Roo.log(this.margin_bottom.length);['','top','bottom','left','right',
 );}var D={tag:'div',cls:'card-body'+(this.html===false?' d-none':''),cn:[]};var E=D;if(this.collapsable||this.rotateable){E={tag:'div',cls:'roo-collapsable collapse '+(this.collapsed||this.rotated?'':'show'),cn:[D]};}A.cn.push(E);if(this.title.length){D.cn.push({tag:'div',cls:'card-title',src:this.title}
 );}if(this.subtitle.length){D.cn.push({tag:'div',cls:'card-title',src:this.subtitle});}D.cn.push({tag:'div',cls:'roo-card-body-ctr'});if(this.html.length){D.cn.push({tag:'div',html:this.html});}if(this.footer.length){A.cn.push({cls:'card-footer '+(this.rotated?'d-none':''),html:this.footer}
 );}else{A.cn.push({cls:'card-footer d-none'});}return A;},getCardHeader:function(){var A=this.el.select('.card-header',true).first();if(A.hasClass('d-none')){A.removeClass('d-none');}return A;},getCardFooter:function(){var A=this.el.select('.card-footer',true).first();
-if(A.hasClass('d-none')){A.removeClass('d-none');}return A;},getCardImageTop:function(){var A=this.el.select('.card-img-top',true).first();if(A.hasClass('d-none')){A.removeClass('d-none');}return A;},getChildContainer:function(){if(!this.el){return false;
-}return this.el.select('.roo-card-body-ctr',true).first();},initEvents:function(){this.bodyEl=this.el.select('.card-body',true).first();this.containerEl=this.getChildContainer();if(this.dragable){this.dragZone=new Roo.dd.DragZone(this.getEl(),{containerScroll:true,ddGroup:this.drag_group||'default_card_drag_group'}
+if(A.hasClass('d-none')){A.removeClass('d-none');}return A;},getCardImageTop:function(){var A=this.header_imageEl;if(A.hasClass('d-none')){A.removeClass('d-none');}return A;},getChildContainer:function(){if(!this.el){return false;}return this.el.select('.roo-card-body-ctr',true).first();
+},initEvents:function(){this.bodyEl=this.el.select('.card-body',true).first();this.containerEl=this.getChildContainer();if(this.dragable){this.dragZone=new Roo.dd.DragZone(this.getEl(),{containerScroll:true,ddGroup:this.drag_group||'default_card_drag_group'}
 );this.dragZone.getDragData=this.getDragData.createDelegate(this);}if(this.dropable){this.dropZone=new Roo.dd.DropZone(this.el.select('.card-body',true).first(),{containerScroll:true,ddGroup:this.drop_group||'default_card_drag_group'});this.dropZone.getTargetFromEvent=this.getTargetFromEvent.createDelegate(this);
 this.dropZone.onNodeEnter=this.onNodeEnter.createDelegate(this);this.dropZone.onNodeOver=this.onNodeOver.createDelegate(this);this.dropZone.onNodeOut=this.onNodeOut.createDelegate(this);this.dropZone.onNodeDrop=this.onNodeDrop.createDelegate(this);}if(this.collapsable){this.el.select('.card-header',true).on('click',this.onToggleCollapse,this);
-}if(this.rotateable){this.el.select('.card-header',true).on('click',this.onToggleRotate,this);}this.collapsableEl=this.el.select('.roo-collapsable').first();this.footerEl=this.el.select('.card-footer').first();this.collapsableToggleEl=this.el.select('.roo-collapse-toggle');
-this.headerContainerEl=this.el.select('.roo-card-header-ctr').first();this.headerEl=this.el.select('.card-header',true).first();if(this.rotated){this.el.addClass('roo-card-rotated');this.fireEvent('rotate',this,true);}},getDragData:function(e){var A=this.getEl();
-if(A){var B={source:this,copy:false,nodes:this.getEl(),records:[]};B.ddel=A.dom;Roo.log(A.getWidth());B.ddel.style.width=A.getWidth()+'px';return B;}return false;},getTargetFromEvent:function(e,A){var B=e.getTarget();while((B!==null)&&(B.parentNode!=this.containerEl.dom)){B=B.parentNode;
-}var C={position:'',cards:[],card_n:-1,items_n:-1,card:false};var D=false;var E=0;var F=0;for(var i=0;i<this.items.length;i++){if(!this.items[i].el.hasClass('card')){continue;}D=this.getDropPoint(e,this.items[i].el.dom);F=C.cards.length;C.cards.push(this.items[i]);
-E=i;if(C.card_n<0&&D=='above'){C.position=F>0?'below':D;C.items_n=i>0?i-1:0;C.card_n=F>0?F-1:0;C.card=C.cards[C.card_n];}}if(!C.cards.length){C.card=true;C.position='below';C.items_n;return C;}if(C.card_n<0){C.card_n=E;C.card=C.cards[E];C.items_n=this.items.indexOf(C.cards[E]);
-C.position='below';}if(this.items[C.items_n].el==A){return false;}if(C.position=='below'){var G=C.card_n+1==C.cards.length?false:C.cards[C.card_n+1];if(G&&G.el==A){return false;}return C;}var H=C.card_n>0?C.cards[C.card_n-1]:false;if(H&&H.el==A){return false;
-}return C;},onNodeEnter:function(n,dd,e,A){return false;},onNodeOver:function(n,dd,e,A){var B=this.getTargetFromEvent(e,A.source.el);if(B===false){this.dropPlaceHolder('hide');return false;}Roo.log(['getTargetFromEvent',B]);this.dropPlaceHolder('show',B,A);
-return false;},onNodeOut:function(n,dd,e,A){this.dropPlaceHolder('hide');},onNodeDrop:function(n,dd,e,A){var B=this.getTargetFromEvent(e,A.source.el);if(B===false){return false;}this.dropPlaceHolder('hide');this.acceptCard(A.source,B.position,B.card,B.items_n);
-return true;},firstChildCard:function(){for(var i=0;i<this.items.length;i++){if(!this.items[i].el.hasClass('card')){continue;}return this.items[i];}return this.items.length?this.items[this.items.length-1]:false;},acceptCard:function(A,B,C){if(this.fireEvent("drop",this,A,B,C)===false){return false;
-}var D=C?this.items.indexOf(C):0;A.parent().removeCard(A);var E=A.el.dom;E.style.width='';if(C!==false&&C!==true&&C.el.dom.parentNode){var F=C.el.dom;if(B=='above'){F.parentNode.insertBefore(E,F);}else if(F.nextSibling){F.parentNode.insertBefore(E,F.nextSibling);
-}else{F.parentNode.append(E);}}else{this.containerEl.dom.append(E);}if(this.items.length){var G=[];for(var i=0;i<this.items.length;i++){if(i==D&&B=='above'){G.push(A);}G.push(this.items[i]);if(i==D&&B=='below'){G.push(A);}}this.items=G;Roo.log(this.items);
-}else{this.items.push(A);}A.parentId=this.id;return true;},removeCard:function(c){this.items=this.items.filter(function(e){return e!=c});var A=c.el.dom;A.parentNode.removeChild(A);A.style.width='';c.parentId=false;},getDropPoint:function(e,n,dd){if(dd){return false;
-}if(n==this.containerEl.dom){return "above";}var t=Roo.lib.Dom.getY(n),b=t+n.offsetHeight;var c=t+(b-t)/2;var y=Roo.lib.Event.getPageY(e);if(y<=c){return "above";}else{return "below";}},onToggleCollapse:function(e){if(this.collapsed){this.el.select('.roo-collapse-toggle').removeClass('collapsed');
-this.collapsableEl.addClass('show');this.collapsed=false;return;}this.el.select('.roo-collapse-toggle').addClass('collapsed');this.collapsableEl.removeClass('show');this.collapsed=true;},onToggleRotate:function(e){this.collapsableEl.removeClass('show');this.footerEl.removeClass('d-none');
-this.el.removeClass('roo-card-rotated');this.el.removeClass('d-none');if(this.rotated){this.collapsableEl.addClass('show');this.rotated=false;this.fireEvent('rotate',this,this.rotated);return;}this.el.addClass('roo-card-rotated');this.footerEl.addClass('d-none');
-this.el.select('.roo-collapsable').removeClass('show');this.rotated=true;this.fireEvent('rotate',this,this.rotated);},dropPlaceHolder:function(A,B,C){if(this.dropEl===false){this.dropEl=Roo.DomHelper.append(this.containerEl,{cls:'d-none'},true);}this.dropEl.removeClass(['d-none','d-block']);
-if(A=='hide'){this.dropEl.addClass('d-none');return;}this.dropEl.dom.parentNode.removeChild(this.dropEl.dom);if(B.card!==true){var D=B.card.el.dom;if(B.position=='above'){D.parentNode.insertBefore(this.dropEl.dom,D);}else if(D.nextSibling){D.parentNode.insertBefore(this.dropEl.dom,D.nextSibling);
-}else{D.parentNode.append(this.dropEl.dom);}}else{this.containerEl.dom.append(this.dropEl.dom);}this.dropEl.addClass('d-block roo-card-dropzone');this.dropEl.setHeight(Roo.get(C.ddel).getHeight());},setHeaderText:function(A){this.header=A;if(this.headerContainerEl){this.headerContainerEl.dom.innerHTML=A;
-}}});
+}if(this.rotateable){this.el.select('.card-header',true).on('click',this.onToggleRotate,this);}this.collapsableEl=this.el.select('.roo-collapsable',true).first();this.footerEl=this.el.select('.card-footer',true).first();this.collapsableToggleEl=this.el.select('.roo-collapse-toggle',true).first();
+this.headerContainerEl=this.el.select('.roo-card-header-ctr',true).first();this.headerEl=this.el.select('.card-header',true).first();if(this.rotated){this.el.addClass('roo-card-rotated');this.fireEvent('rotate',this,true);}this.header_imageEl=this.el.select('.card-img-top',true).first();
+this.header_imageEl.on('load',this.onHeaderImageLoad,this);},getDragData:function(e){var A=this.getEl();if(A){var B={source:this,copy:false,nodes:this.getEl(),records:[]};B.ddel=A.dom;Roo.log(A.getWidth());B.ddel.style.width=A.getWidth()+'px';return B;}return false;
+},getTargetFromEvent:function(e,A){var B=e.getTarget();while((B!==null)&&(B.parentNode!=this.containerEl.dom)){B=B.parentNode;}var C={position:'',cards:[],card_n:-1,items_n:-1,card:false};var D=false;var E=0;var F=0;for(var i=0;i<this.items.length;i++){if(!this.items[i].el.hasClass('card')){continue;
+}D=this.getDropPoint(e,this.items[i].el.dom);F=C.cards.length;C.cards.push(this.items[i]);E=i;if(C.card_n<0&&D=='above'){C.position=F>0?'below':D;C.items_n=i>0?i-1:0;C.card_n=F>0?F-1:0;C.card=C.cards[C.card_n];}}if(!C.cards.length){C.card=true;C.position='below';
+C.items_n;return C;}if(C.card_n<0){C.card_n=E;C.card=C.cards[E];C.items_n=this.items.indexOf(C.cards[E]);C.position='below';}if(this.items[C.items_n].el==A){return false;}if(C.position=='below'){var G=C.card_n+1==C.cards.length?false:C.cards[C.card_n+1];if(G&&G.el==A){return false;
+}return C;}var H=C.card_n>0?C.cards[C.card_n-1]:false;if(H&&H.el==A){return false;}return C;},onNodeEnter:function(n,dd,e,A){return false;},onNodeOver:function(n,dd,e,A){var B=this.getTargetFromEvent(e,A.source.el);if(B===false){this.dropPlaceHolder('hide');
+return false;}Roo.log(['getTargetFromEvent',B]);if(this.fireEvent('cardover',this,[A])===false){return false;}this.dropPlaceHolder('show',B,A);return false;},onNodeOut:function(n,dd,e,A){this.dropPlaceHolder('hide');},onNodeDrop:function(n,dd,e,A){var B=this.getTargetFromEvent(e,A.source.el);
+if(B===false){return false;}this.dropPlaceHolder('hide');this.acceptCard(A.source,B.position,B.card,B.items_n);return true;},firstChildCard:function(){for(var i=0;i<this.items.length;i++){if(!this.items[i].el.hasClass('card')){continue;}return this.items[i];
+}return this.items.length?this.items[this.items.length-1]:false;},acceptCard:function(A,B,C){if(this.fireEvent("drop",this,A,B,C)===false){return false;}var D=C?this.items.indexOf(C):0;A.parent().removeCard(A);var E=A.el.dom;E.style.width='';if(C!==false&&C!==true&&C.el.dom.parentNode){var F=C.el.dom;
+if(B=='above'){F.parentNode.insertBefore(E,F);}else if(F.nextSibling){F.parentNode.insertBefore(E,F.nextSibling);}else{F.parentNode.append(E);}}else{this.containerEl.dom.append(E);}if(this.items.length){var G=[];for(var i=0;i<this.items.length;i++){if(i==D&&B=='above'){G.push(A);
+}G.push(this.items[i]);if(i==D&&B=='below'){G.push(A);}}this.items=G;Roo.log(this.items);}else{this.items.push(A);}A.parentId=this.id;return true;},removeCard:function(c){this.items=this.items.filter(function(e){return e!=c});var A=c.el.dom;A.parentNode.removeChild(A);
+A.style.width='';c.parentId=false;},getDropPoint:function(e,n,dd){if(dd){return false;}if(n==this.containerEl.dom){return "above";}var t=Roo.lib.Dom.getY(n),b=t+n.offsetHeight;var c=t+(b-t)/2;var y=Roo.lib.Event.getPageY(e);if(y<=c){return "above";}else{return "below";
+}},onToggleCollapse:function(e){if(this.collapsed){this.el.select('.roo-collapse-toggle').removeClass('collapsed');this.collapsableEl.addClass('show');this.collapsed=false;return;}this.el.select('.roo-collapse-toggle').addClass('collapsed');this.collapsableEl.removeClass('show');
+this.collapsed=true;},onToggleRotate:function(e){this.collapsableEl.removeClass('show');this.footerEl.removeClass('d-none');this.el.removeClass('roo-card-rotated');this.el.removeClass('d-none');if(this.rotated){this.collapsableEl.addClass('show');this.rotated=false;
+this.fireEvent('rotate',this,this.rotated);return;}this.el.addClass('roo-card-rotated');this.footerEl.addClass('d-none');this.el.select('.roo-collapsable').removeClass('show');this.rotated=true;this.fireEvent('rotate',this,this.rotated);},dropPlaceHolder:function(A,B,C){if(this.dropEl===false){this.dropEl=Roo.DomHelper.append(this.containerEl,{cls:'d-none'}
+,true);}this.dropEl.removeClass(['d-none','d-block']);if(A=='hide'){this.dropEl.addClass('d-none');return;}this.dropEl.dom.parentNode.removeChild(this.dropEl.dom);if(B.card!==true){var D=B.card.el.dom;if(B.position=='above'){D.parentNode.insertBefore(this.dropEl.dom,D);
+}else if(D.nextSibling){D.parentNode.insertBefore(this.dropEl.dom,D.nextSibling);}else{D.parentNode.append(this.dropEl.dom);}}else{this.containerEl.dom.append(this.dropEl.dom);}this.dropEl.addClass('d-block roo-card-dropzone');this.dropEl.setHeight(Roo.get(C.ddel).getHeight());
+},setHeaderText:function(A){this.header=A;if(this.headerContainerEl){this.headerContainerEl.dom.innerHTML=A;}},onHeaderImageLoad:function(ev,he){if(!this.header_image_fit_square){return;}var hw=he.naturalHeight/he.naturalWidth;var ww=he.width;he.style.left=0;
+he.style.position='relative';if(hw>1){var nw=(ww*(1/hw));Roo.get(he).setSize(ww*(1/hw),ww);he.style.left=((ww-nw)/2)+'px';he.style.position='relative';}}});
 // Roo/bootstrap/CardHeader.js
 Roo.bootstrap.CardHeader=function(A){Roo.bootstrap.CardHeader.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.CardHeader,Roo.bootstrap.Element,{container_method:'getCardHeader'});
 // Roo/bootstrap/CardFooter.js
 Roo.bootstrap.CardFooter=function(A){Roo.bootstrap.CardFooter.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.CardFooter,Roo.bootstrap.Element,{container_method:'getCardFooter'});
 // Roo/bootstrap/CardImageTop.js
 Roo.bootstrap.CardImageTop=function(A){Roo.bootstrap.CardImageTop.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.CardImageTop,Roo.bootstrap.Element,{container_method:'getCardImageTop'});
+// Roo/bootstrap/ButtonUploader.js
+Roo.bootstrap.ButtonUploader=function(A){Roo.bootstrap.ButtonUploader.superclass.constructor.call(this,A);this.addEvents({'beforeselect':true,'uploaded':true});};Roo.extend(Roo.bootstrap.ButtonUploader,Roo.bootstrap.Button,{errorTimeout:3000,images:false,fileCollection:false,allowBlank:true,multiple:true,getAutoCreate:function(){var im={tag:'input',type:'file',cls:'d-none  roo-card-upload-selector'}
+;if(this.multiple){im.multiple='multiple';}return {cls:'div',cn:[Roo.bootstrap.Button.prototype.getAutoCreate.call(this),im]};},initEvents:function(){Roo.bootstrap.Button.prototype.initEvents.call(this);this.urlAPI=(window.createObjectURL&&window)||(window.URL&&URL.revokeObjectURL&&URL)||(window.webkitURL&&webkitURL);
+this.selectorEl=this.el.select('.roo-card-upload-selector',true).first();this.selectorEl.on('change',this.onFileSelected,this);},onClick:function(e){e.preventDefault();if(this.fireEvent('beforeselect',this)===false){return;}this.selectorEl.dom.click();},onFileSelected:function(e){e.preventDefault();
+if(typeof(this.selectorEl.dom.files)=='undefined'||!this.selectorEl.dom.files.length){return;}var A=Array.prototype.slice.call(this.selectorEl.dom.files);this.selectorEl.dom.value='';this.fireEvent('uploaded',this,A);},reset:function(){this.selectorEl}});
+
 // Roo/bootstrap/Img.js
-Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Img,Roo.bootstrap.Component,{imgResponsive:true,border:'',src:'about:blank',href:false,target:false,xsUrl:'',smUrl:'',mdUrl:'',lgUrl:'',getAutoCreate:function(){if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){return this.createSingleImg();
+Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this,A);this.addEvents({"click":true,"load":true});};Roo.extend(Roo.bootstrap.Img,Roo.bootstrap.Component,{imgResponsive:true,border:'',src:'about:blank',href:false,target:false,xsUrl:'',smUrl:'',mdUrl:'',lgUrl:'',backgroundContain:false,getAutoCreate:function(){if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){return this.createSingleImg();
 }var A={tag:'div',cls:'roo-image-responsive-group',cn:[]};var B=this;Roo.each(['xs','sm','md','lg'],function(C){if(!B[C+'Url']){return;}var D={tag:'img',cls:(B.imgResponsive)?'img-responsive':'',html:B.html||A.html,src:B[C+'Url']};D.cls+=' roo-image-responsive-'+C;
 var s=['xs','sm','md','lg'];s.splice(s.indexOf(C),1);Roo.each(s,function(ss){D.cls+=' hidden-'+ss;});if(['rounded','circle','thumbnail'].indexOf(B.border)>-1){A.cls+=' img-'+B.border;}if(B.alt){A.alt=B.alt;}if(B.href){var a={tag:'a',href:B.href,cn:[D]};if(this.target){a.target=B.target;
-}}A.cn.push((B.href)?a:D);});return A;},createSingleImg:function(){var A={tag:'img',cls:(this.imgResponsive)?'img-responsive':'',html:null,src:'about:blank'};A.html=this.html||A.html;A.src=this.src||A.src;if(['rounded','circle','thumbnail'].indexOf(this.border)>-1){A.cls+=' img-'+this.border;
-}if(this.alt){A.alt=this.alt;}if(this.href){var a={tag:'a',href:this.href,cn:[A]};if(this.target){a.target=this.target;}}return (this.href)?a:A;},initEvents:function(){if(!this.href){this.el.on('click',this.onClick,this);}},onClick:function(e){Roo.log('img onclick');
-this.fireEvent('click',this,e);},setSrc:function(A){this.src=A;if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){this.el.dom.src=A;return;}this.el.select('img',true).first().dom.src=A;}});
+}}A.cn.push((B.href)?a:D);});return A;},createSingleImg:function(){var A={tag:'img',cls:(this.imgResponsive)?'img-responsive':'',html:null,src:Roo.BLANK_IMAGE_URL};if(this.backgroundContain){A.cls+=' background-contain';}A.html=this.html||A.html;if(this.backgroundContain){A.style="background-image: url("+this.src+')';
+}else{A.src=this.src||A.src;}if(['rounded','circle','thumbnail'].indexOf(this.border)>-1){A.cls+=' img-'+this.border;}if(this.alt){A.alt=this.alt;}if(this.href){var a={tag:'a',href:this.href,cn:[A]};if(this.target){a.target=this.target;}}return (this.href)?a:A;
+},initEvents:function(){if(!this.href){this.el.on('click',this.onClick,this);}if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){this.el.on('load',this.onImageLoad,this);}else{this.el.select('img',true).on('load',this.onImageLoad,this);}},onClick:function(e){Roo.log('img onclick');
+this.fireEvent('click',this,e);},onImageLoad:function(e){Roo.log('img load');this.fireEvent('load',this,e);},setSrc:function(A){this.src=A;if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){if(this.backgroundContain){this.el.dom.style.backgroundImage='url('+A+')';
+}else{this.el.dom.src=A;}return;}this.el.select('img',true).first().dom.src=A;}});
 // Roo/bootstrap/Link.js
 Roo.bootstrap.Link=function(A){Roo.bootstrap.Link.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.Link,Roo.bootstrap.Component,{href:false,target:false,preventDefault:false,anchor:false,alt:false,fa:false,getAutoCreate:function(){var A=this.html||'';
 if(this.fa!==false){A='<i class="fa fa-'+this.fa+'"></i>';}var B={tag:'a'};if(this.anchor===false){B.html=A;B.href=this.href||'#';}else{B.name=this.anchor;if(this.html!==false||this.fa!==false){B.html=A;}if(this.href!==false){B.href=this.href;}}if(this.alt!==false){B.alt=this.alt;
@@ -143,22 +154,23 @@ i<l;i++){if(g[i]!=mi){g[i].setChecked(false);}}}}return {hideAll:function(){hide
 F.un("show",onShow);var g=F.group;if(g&&F.events["checkchange"]){C[g].remove(F);F.un("checkchange",onCheck);}},registerCheckable:function(F){var g=F.group;if(g){if(!C[g]){C[g]=[];}C[g].push(F);F.on("beforecheckchange",onBeforeCheck);}},unregisterCheckable:function(F){var g=F.group;
 if(g){C[g].remove(F);F.un("beforecheckchange",onBeforeCheck);}}};}();
 // Roo/bootstrap/Menu.js
-Roo.bootstrap.Menu=function(A){Roo.bootstrap.Menu.superclass.constructor.call(this,A);if(this.registerMenu&&this.type!='treeview'){Roo.bootstrap.MenuMgr.register(this);}this.addEvents({beforeshow:true,beforehide:true,show:true,hide:true,click:true,mouseover:true,mouseout:true,itemclick:true}
-);this.menuitems=new Roo.util.MixedCollection(false,function(o){return o.el.id;});};Roo.extend(Roo.bootstrap.Menu,Roo.bootstrap.Component,{triggerEl:false,type:false,registerMenu:true,menuItems:false,hidden:true,parentMenu:false,stopEvent:true,isLink:false,getChildContainer:function(){return this.el;
-},getAutoCreate:function(){var A={tag:'ul',cls:'dropdown-menu',style:'z-index:1000'};if(this.type==='submenu'){A.cls='submenu active';}if(this.type==='treeview'){A.cls='treeview-menu';}return A;},initEvents:function(){this.triggerEl.on('click',this.onTriggerClick,this);
-this.triggerEl.on(Roo.isTouch?'touchstart':'mouseup',this.onTriggerPress,this);if(this.triggerEl.hasClass('nav-item')){this.triggerEl.select('.nav-link',true).first().addClass('dropdown-toggle');}else{this.triggerEl.addClass('dropdown-toggle');}if(Roo.isTouch){this.el.on('touchstart',this.onTouch,this);
-}this.el.on('click',this.onClick,this);this.el.on("mouseover",this.onMouseOver,this);this.el.on("mouseout",this.onMouseOut,this);},findTargetItem:function(e){var t=e.getTarget(".dropdown-menu-item",this.el,true);if(!t){return false;}if(t&&t.id){return this.menuitems.get(t.id);
-}return false;},onTouch:function(e){Roo.log("menu.onTouch");this.onClick(e);},onClick:function(e){Roo.log("menu.onClick");var t=this.findTargetItem(e);if(!t||t.isContainer){return;}Roo.log(e);Roo.log('pass click event');t.onClick(e);this.fireEvent("click",this,t,e);
-var A=this;if(!t.href.length||t.href=='#'){(function(){A.hide();}).defer(100);}},onMouseOver:function(e){var t=this.findTargetItem(e);this.fireEvent("mouseover",this,e,t);},isVisible:function(){return !this.hidden;},onMouseOut:function(e){var t=this.findTargetItem(e);
-this.fireEvent("mouseout",this,e,t);},show:function(el,A,B){if(false===this.fireEvent("beforeshow",this)){Roo.log("show canceled");return;}this.parentMenu=B;if(!this.el){this.render();}this.showAt(this.el.getAlignToXY(el,A||this.defaultAlign),B,false);},showAt:function(xy,A,_e){this.parentMenu=A;
-if(!this.el){this.render();}if(_e!==false){this.fireEvent("beforeshow",this);}this.hideMenuItems();this.hidden=false;this.triggerEl.addClass('open');this.el.addClass('show');if(this.el.getWidth()+xy[0]>=Roo.lib.Dom.getViewWidth()){xy[0]=xy[0]-this.el.getWidth()+this.triggerEl.getWidth();
-}if(this.el.getHeight()+xy[1]>=Roo.lib.Dom.getViewHeight()){xy[1]=xy[1]-this.el.getHeight()-this.triggerEl.getHeight();}if(this.el.getStyle('top')!='auto'&&this.el.getStyle('top').slice(-1)!="%"){this.el.setXY(xy);}this.focus();this.fireEvent("show",this);
-},focus:function(){return;if(!this.hidden){this.doFocus.defer(50,this);}},doFocus:function(){if(!this.hidden){this.focusEl.focus();}},hide:function(A){if(false===this.fireEvent("beforehide",this)){Roo.log("hide canceled");return;}this.hideMenuItems();if(this.el&&this.isVisible()){if(this.activeItem){this.activeItem.deactivate();
-this.activeItem=null;}this.triggerEl.removeClass('open');;this.el.removeClass('show');this.hidden=true;this.fireEvent("hide",this);}if(A===true&&this.parentMenu){this.parentMenu.hide(true);}},onTriggerClick:function(e){Roo.log('trigger click');var A=e.getTarget();
-Roo.log(A.nodeName.toLowerCase());if(A.nodeName.toLowerCase()==='i'){e.preventDefault();}},onTriggerPress:function(e){Roo.log('trigger press');var A=Roo.get(e.getTarget());if(A.findParent('.dropdown-menu')||A.findParent('.treeview-menu')){Roo.log('is treeview or dropdown?');
-return;}if(e.getTarget().nodeName.toLowerCase()!=='i'&&this.isLink){return;}if(this.isVisible()){Roo.log('hide');this.hide();}else{Roo.log('show');this.show(this.triggerEl,'?',false);}if(this.stopEvent||e.getTarget().nodeName.toLowerCase()==='i'){e.stopEvent();
-}},hideMenuItems:function(){Roo.log("hide Menu Items");if(!this.el){return;}this.el.select('.open',true).each(function(aa){aa.removeClass('open');});},addxtypeChild:function(A,B){var C=Roo.bootstrap.Menu.superclass.addxtypeChild.call(this,A,B);this.menuitems.add(C);
-return C;},getEl:function(){Roo.log(this.el);return this.el;},clear:function(){this.getEl().dom.innerHTML='';this.menuitems.clear();}});
+Roo.bootstrap.Menu=function(A){if(A.type=='treeview'){this.container_method='getChildContainer';}Roo.bootstrap.Menu.superclass.constructor.call(this,A);if(this.registerMenu&&this.type!='treeview'){Roo.bootstrap.MenuMgr.register(this);}this.addEvents({beforeshow:true,beforehide:true,show:true,hide:true,click:true,mouseover:true,mouseout:true,itemclick:true}
+);this.menuitems=new Roo.util.MixedCollection(false,function(o){return o.el.id;});};Roo.extend(Roo.bootstrap.Menu,Roo.bootstrap.Component,{triggerEl:false,type:false,registerMenu:true,menuItems:false,hidden:true,parentMenu:false,stopEvent:true,isLink:false,container_method:'getDocumentBody',hideTrigger:false,align:'tl-bl?',getChildContainer:function(){return this.el;
+},getAutoCreate:function(){var A={tag:'ul',cls:'dropdown-menu shadow',style:'z-index:1000'};if(this.type==='submenu'){A.cls='submenu active';}if(this.type==='treeview'){A.cls='treeview-menu';}return A;},initEvents:function(){if(this.triggerEl){this.triggerEl.on('click',this.onTriggerClick,this);
+this.triggerEl.on(Roo.isTouch?'touchstart':'mouseup',this.onTriggerPress,this);if(!this.hideTrigger){if(this.triggerEl.hasClass('nav-item')&&this.triggerEl.select('.nav-link',true).length){this.triggerEl.select('.nav-link',true).first().addClass('dropdown-toggle');
+}else{this.triggerEl.addClass('dropdown-toggle');}}}if(Roo.isTouch){this.el.on('touchstart',this.onTouch,this);}this.el.on('click',this.onClick,this);this.el.on("mouseover",this.onMouseOver,this);this.el.on("mouseout",this.onMouseOut,this);},findTargetItem:function(e){var t=e.getTarget(".dropdown-menu-item",this.el,true);
+if(!t){return false;}if(t&&t.id){return this.menuitems.get(t.id);}return false;},onTouch:function(e){Roo.log("menu.onTouch");this.onClick(e);},onClick:function(e){Roo.log("menu.onClick");var t=this.findTargetItem(e);if(!t||t.isContainer){return;}Roo.log(e);
+Roo.log('pass click event');t.onClick(e);this.fireEvent("click",this,t,e);var A=this;if(!t.href.length||t.href=='#'){(function(){A.hide();}).defer(100);}},onMouseOver:function(e){var t=this.findTargetItem(e);this.fireEvent("mouseover",this,e,t);},isVisible:function(){return !this.hidden;
+},onMouseOut:function(e){var t=this.findTargetItem(e);this.fireEvent("mouseout",this,e,t);},show:function(el,A,B){if(false===this.fireEvent("beforeshow",this)){Roo.log("show canceled");return;}this.parentMenu=B;if(!this.el){this.render();}this.el.addClass('show');
+var xy=this.el.getAlignToXY(el,A);if(this.el.getWidth()+xy[0]>=Roo.lib.Dom.getViewWidth()){xy=this.el.getAlignToXY(el,this.align.replace('/l/g','r'))}if(xy[0]<0){xy=this.el.getAlignToXY(el,this.align.replace('/r/g','l'))}if(this.el.getHeight()+xy[1]>=Roo.lib.Dom.getViewHeight()||xy[1]<0){var a=this.align.replace('?','').split('-');
+xy=this.el.getAlignToXY(el,a[1]+'-'+a[0]+'?')}this.showAt(xy,B,false);},showAt:function(xy,A,_e){this.parentMenu=A;if(!this.el){this.render();}if(_e!==false){this.fireEvent("beforeshow",this);}this.hideMenuItems();this.hidden=false;if(this.triggerEl){this.triggerEl.addClass('open');
+}this.el.addClass('show');if(this.el.getStyle('top')!='auto'&&this.el.getStyle('top').slice(-1)!="%"){this.el.setXY(xy);}this.focus();this.fireEvent("show",this);},focus:function(){return;if(!this.hidden){this.doFocus.defer(50,this);}},doFocus:function(){if(!this.hidden){this.focusEl.focus();
+}},hide:function(A){if(false===this.fireEvent("beforehide",this)){Roo.log("hide canceled");return;}this.hideMenuItems();if(this.el&&this.isVisible()){if(this.activeItem){this.activeItem.deactivate();this.activeItem=null;}if(this.triggerEl){this.triggerEl.removeClass('open');
+}this.el.removeClass('show');this.hidden=true;this.fireEvent("hide",this);}if(A===true&&this.parentMenu){this.parentMenu.hide(true);}},onTriggerClick:function(e){Roo.log('trigger click');var A=e.getTarget();Roo.log(A.nodeName.toLowerCase());if(A.nodeName.toLowerCase()==='i'){e.preventDefault();
+}},onTriggerPress:function(e){Roo.log('trigger press');var A=Roo.get(e.getTarget());if(A.findParent('.dropdown-menu')||A.findParent('.treeview-menu')){Roo.log('is treeview or dropdown?');return;}if(e.getTarget().nodeName.toLowerCase()!=='i'&&this.isLink){return;
+}if(this.isVisible()){Roo.log('hide');this.hide();}else{Roo.log('show');this.show(this.triggerEl,this.align,false);}if(this.stopEvent||e.getTarget().nodeName.toLowerCase()==='i'){e.stopEvent();}},hideMenuItems:function(){Roo.log("hide Menu Items");if(!this.el){return;
+}this.el.select('.open',true).each(function(aa){aa.removeClass('open');});},addxtypeChild:function(A,B){var C=Roo.bootstrap.Menu.superclass.addxtypeChild.call(this,A,B);this.menuitems.add(C);return C;},getEl:function(){Roo.log(this.el);return this.el;},clear:function(){this.getEl().dom.innerHTML='';
+this.menuitems.clear();}});
 // Roo/bootstrap/MenuItem.js
 Roo.bootstrap.MenuItem=function(A){Roo.bootstrap.MenuItem.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.MenuItem,Roo.bootstrap.Component,{href:false,html:false,preventDefault:false,isContainer:false,active:false,fa:false,getAutoCreate:function(){if(this.isContainer){return {tag:'li',cls:'dropdown-menu-item '}
 ;}var A={tag:'span',html:'Link'};var B={tag:'a',cls:'dropdown-item',href:'#',cn:[]};if(this.fa!==false){B.cn.push({tag:'i',cls:'fa fa-'+this.fa});}B.cn.push(A);var C={tag:'li',cls:'dropdown-menu-item',cn:[B]};if(this.parent().type=='treeview'){C.cls='treeview-menu';
@@ -251,10 +263,11 @@ return false;}return true;});return r;}});Roo.apply(Roo.bootstrap.NavGroup,{grou
 // Roo/bootstrap/NavItem.js
 Roo.bootstrap.NavItem=function(A){Roo.bootstrap.NavItem.superclass.constructor.call(this,A);this.addEvents({"click":true,'changed':true,'scrollto':true});};Roo.extend(Roo.bootstrap.NavItem,Roo.bootstrap.Component,{href:false,html:'',badge:'',icon:false,fa:false,glyphicon:false,active:false,preventDefault:false,tabId:false,tagtype:'a',tag:'li',disabled:false,animateRef:false,was_active:false,button_weight:'',button_outline:false,linkcls:'',navLink:false,getAutoCreate:function(){var A={tag:this.tag,cls:'nav-item'}
 ;A.cls=typeof(A.cls)=='undefined'?'':A.cls;if(this.active){A.cls+=' active';}if(this.disabled){A.cls+=' disabled';}if(this.button_weight.length){A.tag=this.href?'a':'button';A.html=this.html||'';A.cls+=' btn btn'+(this.button_outline?'-outline':'')+'-'+this.button_weight;
-if(this.href){A.href=this.href;}if(this.fa){A.html='<i class="fa fas fa-'+this.fa+'"></i> <span>'+this.html+'</span>';}if(this.badge!==''){A.html+=' <span class="badge badge-secondary">'+this.badge+'</span>';}return A;}if(this.href||this.html||this.glyphicon||this.icon||this.fa){A.cn=[{tag:this.tagtype,href:this.href||"#",html:this.html||''}
-];if(this.tagtype=='a'){A.cn[0].cls='nav-link'+(this.active?' active':'')+' '+this.linkcls;}if(this.icon){A.cn[0].html='<i class="'+this.icon+'"></i> <span>'+A.cn[0].html+'</span>';}if(this.fa){A.cn[0].html='<i class="fa fas fa-'+this.fa+'"></i> <span>'+A.cn[0].html+'</span>';
-}if(this.glyphicon){A.cn[0].html='<span class="glyphicon glyphicon-'+this.glyphicon+'"></span> '+A.cn[0].html;}if(this.menu){A.cn[0].html+=" <span class='caret'></span>";}if(this.badge!==''){A.cn[0].html+=' <span class="badge badge-secondary">'+this.badge+'</span>';
-}}return A;},onRender:function(ct,A){if(Roo.bootstrap.version==4&&ct.dom.type!='ul'){this.tag='div';}var B=Roo.bootstrap.NavItem.superclass.onRender.call(this,ct,A);this.navLink=this.el.select('.nav-link',true).first();return B;},initEvents:function(){if(typeof(this.menu)!='undefined'){this.menu.parentType=this.xtype;
+if(this.href){A.href=this.href;}if(this.fa){A.html='<i class="fa fas fa-'+this.fa+'"></i> <span class="nav-html">'+this.html+'</span>';}else{A.cls+=" nav-html";}if(this.badge!==''){A.html+=' <span class="badge badge-secondary">'+this.badge+'</span>';}return A;
+}if(this.href||this.html||this.glyphicon||this.icon||this.fa){A.cn=[{tag:this.tagtype,href:this.href||"#",html:this.html||'',cls:''}];if(this.tagtype=='a'){A.cn[0].cls='nav-link'+(this.active?' active':'')+' '+this.linkcls;}if(this.icon){A.cn[0].html='<i class="'+this.icon+'"></i> <span class="nav-html">'+A.cn[0].html+'</span>';
+}else if(this.fa){A.cn[0].html='<i class="fa fas fa-'+this.fa+'"></i> <span class="nav-html">'+A.cn[0].html+'</span>';}else if(this.glyphicon){A.cn[0].html='<span class="glyphicon glyphicon-'+this.glyphicon+'"></span> '+A.cn[0].html;}else{A.cn[0].cls+=" nav-html";
+}if(this.menu){A.cn[0].html+=" <span class='caret'></span>";}if(this.badge!==''){A.cn[0].html+=' <span class="badge badge-secondary">'+this.badge+'</span>';}}return A;},onRender:function(ct,A){if(Roo.bootstrap.version==4&&ct.dom.type!='ul'){this.tag='div';
+}var B=Roo.bootstrap.NavItem.superclass.onRender.call(this,ct,A);this.navLink=this.el.select('.nav-link',true).first();this.htmlEl=this.el.hasClass('nav-html')?this.el:this.el.select('.nav-html',true).first();return B;},initEvents:function(){if(typeof(this.menu)!='undefined'){this.menu.parentType=this.xtype;
 this.menu.triggerEl=this.el;this.menu=this.addxtype(Roo.apply({},this.menu));}this.el.on('click',this.onClick,this);this.parent().register(this);},onClick:function(e){if(e.getTarget('.dropdown-menu-item')){return;}if(this.preventDefault||this.href=='#'){Roo.log("NavItem - prevent Default?");
 e.preventDefault();}if(this.disabled){return;}var tg=Roo.bootstrap.TabGroup.get(this.navId);if(tg&&tg.transition){Roo.log("waiting for the transitionend");return;}if(this.fireEvent('click',this,e)===false){return;};if(this.tagtype=='span'){return;}var A=this.el.select('a',true).first();
 if(A&&this.animateRef&&this.href.indexOf('#')>-1){if(A.dom.href.split("#")[0]!=document.location.toString().split("#")[0]){return;}Roo.log("NavItem - prevent Default?");e.preventDefault();this.scrollToElement(e);}var p=this.parent();if(['tabs','pills'].indexOf(p.type)!==-1&&p.pilltype){if(typeof(p.setActiveItem)!=='undefined'){p.setActiveItem(this);
@@ -263,7 +276,7 @@ if(nv){nv.clearWasActive(this);}}this.active=A;if(!A){this.el.removeClass('activ
 }}if(B){this.fireEvent('changed',this,A);}if(!this.navId||!this.tabId||!A||C){return;}var tg=Roo.bootstrap.TabGroup.get(this.navId);if(!tg){return;}var D=tg.getPanelByName(this.tabId);if(!D){return;}if(false==tg.showPanel(D)){var nv=Roo.bootstrap.NavGroup.get(this.navId);
 if(nv){var E=nv.getWasActive();if(E){E.setActive(true,false,true);}}}},setDisabled:function(A){this.disabled=A;if(!A){this.el.removeClass('disabled');}else if(!this.el.hasClass('disabled')){this.el.addClass('disabled');}},tooltipEl:function(){return this.el;
 },scrollToElement:function(e){var c=document.body;if(Roo.isFirefox||Roo.isIE||Roo.isIE11){c=document.documentElement;}var A=Roo.get(c).select('a[name='+this.href.split('#')[1]+']',true).first();if(!A){return;}var o=A.calcOffsetsTo(c);var B={target:A,value:o[1]}
-;this.fireEvent('scrollto',this,B,e);Roo.get(c).scrollTo('top',B.value,true);return;}});
+;this.fireEvent('scrollto',this,B,e);Roo.get(c).scrollTo('top',B.value,true);return;},setHtml:function(A){this.html=A;this.htmlEl.dom.innerHTML=A;}});
 // Roo/bootstrap/NavSidebarItem.js
 Roo.bootstrap.NavSidebarItem=function(A){Roo.bootstrap.NavSidebarItem.superclass.constructor.call(this,A);this.addEvents({"click":true,'changed':true});};Roo.extend(Roo.bootstrap.NavSidebarItem,Roo.bootstrap.NavItem,{badgeWeight:'default',open:false,buttonView:false,buttonWeight:'default',buttonSize:'md',showArrow:true,getAutoCreate:function(){var a={tag:'a',href:this.href||'#',cls:'',html:'',cn:[]}
 ;if(this.buttonView){a={tag:'button',href:this.href||'#',cls:'btn btn-'+this.buttonWeight+' btn-'+this.buttonSize+'roo-button-dropdown-toggle',html:this.html,cn:[]};}var A={tag:'li',cls:'',cn:[a]};if(this.active){A.cls+=' active';}if(this.disabled){A.cls+=' disabled';
@@ -293,8 +306,7 @@ Roo.bootstrap.PaginationItem=function(A){Roo.bootstrap.PaginationItem.superclass
 Roo.bootstrap.Slider=function(A){Roo.bootstrap.Slider.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Slider,Roo.bootstrap.Component,{getAutoCreate:function(){var A={tag:'div',cls:'slider slider-sample1 vertical-handler ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all',cn:[{tag:'a',cls:'ui-slider-handle ui-state-default ui-corner-all'}
 ]};return A;}});
 // Roo/grid/ColumnModel.js
-Roo.grid.ColumnModel=function(A){this.config=A;this.lookup={};for(var i=0,B=A.length;i<B;i++){var c=A[i];if(typeof c.dataIndex=="undefined"){c.dataIndex=i;}if(typeof c.renderer=="string"){c.renderer=Roo.util.Format[c.renderer];}if(typeof c.id=="undefined"){c.id=Roo.id();
-}if(c.editor&&c.editor.xtype){c.editor=Roo.factory(c.editor,Roo.grid);}if(c.editor&&c.editor.isFormField){c.editor=new Roo.grid.GridEditor(c.editor);}this.lookup[c.id]=c;}this.defaultWidth=100;this.defaultSortable=false;this.addEvents({"widthchange":true,"headerchange":true,"hiddenchange":true,"columnmoved":true,"columnlockchange":true}
+Roo.grid.ColumnModel=function(A){this.config=[];this.lookup={};for(var i=0,B=A.length;i<B;i++){this.addColumn(A[i]);}this.defaultWidth=100;this.defaultSortable=false;this.addEvents({"widthchange":true,"headerchange":true,"hiddenchange":true,"columnmoved":true,"columnlockchange":true}
 );Roo.grid.ColumnModel.superclass.constructor.call(this);};Roo.extend(Roo.grid.ColumnModel,Roo.util.Observable,{getColumnId:function(A){return this.config[A].id;},getColumnById:function(id){return this.lookup[id];},getColumnByDataIndex:function(A){var B=this.findColumnIndex(A);
 return B>-1?this.config[B]:false;},getIndexById:function(id){for(var i=0,A=this.config.length;i<A;i++){if(this.config[i].id==id){return i;}}return -1;},findColumnIndex:function(A){for(var i=0,B=this.config.length;i<B;i++){if(this.config[i].dataIndex==A){return i;
 }}return -1;},moveColumn:function(A,B){var c=this.config[A];this.config.splice(A,1);this.config.splice(B,0,c);this.dataMap=null;this.fireEvent("columnmoved",this,A,B);},isLocked:function(A){return this.config[A].locked===true;},setLocked:function(A,B,C){if(this.isLocked(A)==B){return;
@@ -306,8 +318,9 @@ for(var i=0,B=this.config.length;i<B;i++){var c=this.config[i];if(fn.call(A||thi
 },setColumnHeader:function(A,B){this.config[A].header=B;this.fireEvent("headerchange",this,A,B);},getColumnTooltip:function(A){return this.config[A].tooltip;},setColumnTooltip:function(A,B){this.config[A].tooltip=B;},getDataIndex:function(A){return this.config[A].dataIndex;
 },setDataIndex:function(A,B){this.config[A].dataIndex=B;},isCellEditable:function(A,B){return (this.config[A].editable||(typeof this.config[A].editable=="undefined"&&this.config[A].editor))?true:false;},getCellEditor:function(A,B){return this.config[A].editor;
 },setEditable:function(A,B){this.config[A].editable=B;},isHidden:function(A){return this.config[A].hidden;},isFixed:function(A){return this.config[A].fixed;},isResizable:function(A){return A>=0&&this.config[A].resizable!==false&&this.config[A].fixed!==true;
-},setHidden:function(A,B){this.config[A].hidden=B;this.totalWidth=null;this.fireEvent("hiddenchange",this,A,B);},setEditor:function(A,B){this.config[A].editor=B;}});Roo.grid.ColumnModel.defaultRenderer=function(A){if(typeof A=="object"){return A;}if(typeof A=="string"&&A.length<1){return "&#160;";
-}return String.format("{0}",A);};Roo.grid.DefaultColumnModel=Roo.grid.ColumnModel;
+},setHidden:function(A,B){this.config[A].hidden=B;this.totalWidth=null;this.fireEvent("hiddenchange",this,A,B);},setEditor:function(A,B){this.config[A].editor=B;},addColumn:function(c){var i=this.config.length;this.config[i]=c;if(typeof c.dataIndex=="undefined"){c.dataIndex=i;
+}if(typeof c.renderer=="string"){c.renderer=Roo.util.Format[c.renderer];}if(typeof c.id=="undefined"){c.id=Roo.id();}if(c.editor&&c.editor.xtype){c.editor=Roo.factory(c.editor,Roo.grid);}if(c.editor&&c.editor.isFormField){c.editor=new Roo.grid.GridEditor(c.editor);
+}this.lookup[c.id]=c;}});Roo.grid.ColumnModel.defaultRenderer=function(A){if(typeof A=="object"){return A;}if(typeof A=="string"&&A.length<1){return "&#160;";}return String.format("{0}",A);};Roo.grid.DefaultColumnModel=Roo.grid.ColumnModel;
 // Roo/LoadMask.js
 Roo.LoadMask=function(el,A){this.el=Roo.get(el);Roo.apply(this,A);if(this.store){this.store.on('beforeload',this.onBeforeLoad,this);this.store.on('load',this.onLoad,this);this.store.on('loadexception',this.onLoadException,this);this.removeMask=false;}else{var um=this.el.getUpdateManager();
 um.showLoadIndicator=false;um.on('beforeupdate',this.onBeforeLoad,this);um.on('update',this.onLoad,this);um.on('failure',this.onLoad,this);this.removeMask=true;}};Roo.LoadMask.prototype={msg:'Loading...',msgCls:'x-mask-loading',disabled:false,disable:function(){this.disabled=true;
@@ -324,7 +337,7 @@ this.ds=this.store;this.ds.xmodule=this.xmodule||false;}if(this.footer&&this.sto
 }if(this.condensed){A.cls+=' table-condensed';}if(this.responsive){A.cls+=' table-responsive';}if(this.cls){A.cls+=' '+this.cls;}var _t=this;var cp=['align','bgcolor','border','cellpadding','cellspacing','frame','rules','sortable','summary','width'].forEach(function(k){if(_t[k]){A[k]=_t[k];
 }});if(this.layout){A.style=(typeof(A.style)=='undefined')?('table-layout:'+this.layout+';'):(A.style+('table-layout:'+this.layout+';'));}if(this.store||this.cm){if(this.headerShow){A.cn.push(this.renderHeader());}A.cn.push(this.renderBody());if(this.footerShow){A.cn.push(this.renderFooter());
 }}return {cn:[A]};},initEvents:function(){if(!this.store||!this.cm){return;}if(this.selModel){this.selModel.initEvents();}this.mainBody=this.el.select('tbody',true).first();this.mainHead=this.el.select('thead',true).first();this.mainFoot=this.el.select('tfoot',true).first();
-var A=this;Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.on('click',A.sort,A);});this.mainBody.on("click",this.onClick,this);this.mainBody.on("dblclick",this.onDblClick,this);if(this.footer){this.footer.parentId=this.id;this.footer.onRender(this.el.select('tfoot tr td').first(),null);
+Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.on('click',this.sort,this);},this);this.mainBody.on("click",this.onClick,this);this.mainBody.on("dblclick",this.onDblClick,this);if(this.footer){this.footer.parentId=this.id;this.footer.onRender(this.el.select('tfoot tr td').first(),null);
 if(this.lazyLoad){this.el.select('tfoot tr td').first().addClass('hide');}}if(this.loadMask){this.maskEl=new Roo.LoadMask(this.el,{store:this.ds,msgCls:'roo-el-mask-msg'});}this.store.on('load',this.onLoad,this);this.store.on('beforeload',this.onBeforeLoad,this);
 this.store.on('update',this.onUpdate,this);this.store.on('add',this.onAdd,this);this.store.on("clear",this.clear,this);this.el.on("contextmenu",this.onContextMenu,this);this.mainBody.on('scroll',this.onBodyScroll,this);this.cm.on("headerchange",this.onHeaderChange,this);
 this.cm.on("hiddenchange",this.onHiddenChange,this,arguments);},onContextMenu:function(e,t){this.processEvent("contextmenu",e);},processEvent:function(A,e){if(A!='touchstart'){this.fireEvent(A,e);}var t=e.getTarget();var B=Roo.get(t);if(!B){return;}if(B.findParent('tfoot',false,true)){return;
@@ -333,18 +346,18 @@ this.fireEvent("header"+D,this,C,e);return;}if(e.getTarget().nodeName.toLowerCas
 var F=E.dom.rowIndex-1;if(E!==false){this.fireEvent("row"+A,this,F,e);if(B!==false){this.fireEvent("cell"+A,this,F,C,e);}}},onMouseover:function(e,el){var A=Roo.get(el);if(!A){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);
 }var B=A.findParent('tr',false,true);var C=A.dom.cellIndex;var D=B.dom.rowIndex-1;this.fireEvent('mouseover',this,A,D,C,e);},onMouseout:function(e,el){var A=Roo.get(el);if(!A){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);
 }var B=A.findParent('tr',false,true);var C=A.dom.cellIndex;var D=B.dom.rowIndex-1;this.fireEvent('mouseout',this,A,D,C,e);},onClick:function(e,el){var A=Roo.get(el);if(!A||(!this.cellSelection&&!this.rowSelection)){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);
-}if(!A||typeof(A)=='undefined'){return;}var B=A.findParent('tr',false,true);if(!B||typeof(B)=='undefined'){return;}var C=A.dom.cellIndex;var D=this.getRowIndex(B);if(this.cellSelection){this.fireEvent('cellclick',this,A,D,C,e);}if(this.rowSelection){this.fireEvent('rowclick',this,B,D,e);
-}},onDblClick:function(e,el){var A=Roo.get(el);if(!A||(!this.cellSelection&&!this.rowSelection)){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);}if(!A||typeof(A)=='undefined'){return;}var B=A.findParent('tr',false,true);
-if(!B||typeof(B)=='undefined'){return;}var C=A.dom.cellIndex;var D=this.getRowIndex(B);if(this.cellSelection){this.fireEvent('celldblclick',this,A,D,C,e);}if(this.rowSelection){this.fireEvent('rowdblclick',this,B,D,e);}},sort:function(e,el){var A=Roo.get(el);
-if(!A.hasClass('sortable')){return;}var B=A.attr('sort');var C='ASC';if(A.select('i',true).first().hasClass('glyphicon-arrow-up')){C='DESC';}this.store.sortInfo={field:B,direction:C};if(this.footer){Roo.log("calling footer first");this.footer.onClick('first');
-}else{this.store.load({params:{start:0}});}},renderHeader:function(){var A={tag:'thead',cn:[]};var cm=this.cm;this.totalWidth=0;for(var i=0,B=cm.getColumnCount();i<B;i++){var C=cm.config[i];var c={tag:'th',cls:'x-hcol-'+i,style:'',html:cm.getColumnHeader(i)}
-;var hh='';if(typeof(C.sortable)!='undefined'&&C.sortable){c.cls='sortable';c.html='<i class="glyphicon"></i>'+c.html;}if(typeof(C.lgHeader)!='undefined'){hh+='<span class="hidden-xs hidden-sm hidden-md ">'+C.lgHeader+'</span>';}if(typeof(C.mdHeader)!='undefined'){hh+='<span class="hidden-xs hidden-sm hidden-lg">'+C.mdHeader+'</span>';
-}if(typeof(C.smHeader)!='undefined'){hh+='<span class="hidden-xs hidden-md hidden-lg">'+C.smHeader+'</span>';}if(typeof(C.xsHeader)!='undefined'){hh+='<span class="hidden-sm hidden-md hidden-lg">'+C.xsHeader+'</span>';}if(hh.length){c.html=hh;}if(typeof(C.tooltip)!='undefined'){c.tooltip=C.tooltip;
+}if(!A||typeof(A)=='undefined'){return;}var B=A.findParent('tr',false,true);if(!B||typeof(B)=='undefined'){return;}var C=A.dom.cellIndex;var D=this.getRowIndex(B);this.fireEvent('cellclick',this,A,D,C,e);this.fireEvent('rowclick',this,B,D,e);},onDblClick:function(e,el){var A=Roo.get(el);
+if(!A||(!this.cellSelection&&!this.rowSelection)){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);}if(!A||typeof(A)=='undefined'){return;}var B=A.findParent('tr',false,true);if(!B||typeof(B)=='undefined'){return;}var C=A.dom.cellIndex;
+var D=this.getRowIndex(B);if(this.cellSelection){this.fireEvent('celldblclick',this,A,D,C,e);}if(this.rowSelection){this.fireEvent('rowdblclick',this,B,D,e);}},sort:function(e,el){var A=Roo.get(el);if(!A.hasClass('sortable')){return;}var B=A.attr('sort');
+var C='ASC';if(A.select('i',true).first().hasClass('fa-arrow-up')){C='DESC';}this.store.sortInfo={field:B,direction:C};if(this.footer){Roo.log("calling footer first");this.footer.onClick('first');}else{this.store.load({params:{start:0}});}},renderHeader:function(){var A={tag:'thead',cn:[]}
+;var cm=this.cm;this.totalWidth=0;for(var i=0,B=cm.getColumnCount();i<B;i++){var C=cm.config[i];var c={tag:'th',cls:'x-hcol-'+i,style:'',html:cm.getColumnHeader(i)};var D=cm.getColumnTooltip(i);if(D){c.tooltip=D;}var hh='';if(typeof(C.sortable)!='undefined'&&C.sortable){c.cls='sortable';
+c.html='<i class="fa"></i>'+c.html;}if(typeof(C.lgHeader)!='undefined'){hh+='<span class="hidden-xs hidden-sm hidden-md ">'+C.lgHeader+'</span>';}if(typeof(C.mdHeader)!='undefined'){hh+='<span class="hidden-xs hidden-sm hidden-lg">'+C.mdHeader+'</span>';}
+if(typeof(C.smHeader)!='undefined'){hh+='<span class="hidden-xs hidden-md hidden-lg">'+C.smHeader+'</span>';}if(typeof(C.xsHeader)!='undefined'){hh+='<span class="hidden-sm hidden-md hidden-lg">'+C.xsHeader+'</span>';}if(hh.length){c.html=hh;}if(typeof(C.tooltip)!='undefined'){c.tooltip=C.tooltip;
 }if(typeof(C.colspan)!='undefined'){c.colspan=C.colspan;}if(typeof(C.hidden)!='undefined'&&C.hidden){c.style+=' display:none;';}if(typeof(C.dataIndex)!='undefined'){c.sort=C.dataIndex;}if(typeof(C.align)!='undefined'&&C.align.length){c.style+=' text-align:'+C.align+';';
-}if(typeof(C.width)!='undefined'){c.style+=' width:'+C.width+'px;';this.totalWidth+=C.width;}else{this.totalWidth+=100;}if(typeof(C.cls)!='undefined'){c.cls=(typeof(c.cls)=='undefined')?C.cls:(c.cls+' '+C.cls);}['xs','sm','md','lg'].map(function(D){if(typeof(C[D])=='undefined'){return;
-}if(!C[D]){c.cls+=' hidden-'+D+' hidden'+D+'-down';return;}c.cls+=' col-'+D+'-'+C[D]+(D=='xs'?(' col-'+C[D]):'');});A.cn.push(c)}return A;},renderBody:function(){var A={tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}]}]};return A;
-},renderFooter:function(){var A={tag:'tfoot',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}]}]};return A;},onLoad:function(){this.clear();var A=this;var cm=this.cm;var ds=this.store;Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.select('i',true).removeClass(['glyphicon-arrow-up','glyphicon-arrow-down']);
-if(A.store.sortInfo){if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='ASC'){e.select('i',true).addClass(['glyphicon-arrow-up']);}if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='DESC'){e.select('i',true).addClass(['glyphicon-arrow-down']);
+}if(typeof(C.width)!='undefined'){c.style+=' width:'+C.width+'px;';this.totalWidth+=C.width;}else{this.totalWidth+=100;}if(typeof(C.cls)!='undefined'){c.cls=(typeof(c.cls)=='undefined')?C.cls:(c.cls+' '+C.cls);}['xs','sm','md','lg'].map(function(E){if(typeof(C[E])=='undefined'){return;
+}if(!C[E]){c.cls+=' hidden-'+E+' hidden'+E+'-down';return;}c.cls+=' col-'+E+'-'+C[E]+(E=='xs'?(' col-'+C[E]):'');});A.cn.push(c)}return A;},renderBody:function(){var A={tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}]}]};return A;
+},renderFooter:function(){var A={tag:'tfoot',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}]}]};return A;},onLoad:function(){this.clear();var A=this;var cm=this.cm;var ds=this.store;Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.select('i',true).removeClass(['fa-arrow-up','fa-arrow-down']);
+if(A.store.sortInfo){if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='ASC'){e.select('i',true).addClass(['fa-arrow-up']);}if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='DESC'){e.select('i',true).addClass(['fa-arrow-down']);
 }}});var B=this.mainBody;if(ds.getCount()>0){ds.data.each(function(d,E){var F=this.renderRow(cm,ds,E);B.createChild(F);var G=this;if(F.cellObjects.length){Roo.each(F.cellObjects,function(r){G.renderCellObject(r);})}},this);}var C=this.el.select('tfoot',true).first();
 if(this.footerShow&&this.auto_hide_footer&&this.mainFoot){this.mainFoot.setVisibilityMode(Roo.Element.DISPLAY).hide();var D=this.ds.getTotalCount();if(this.footer.pageSize<D){this.mainFoot.show();}}Roo.each(this.el.select('tbody td',true).elements,function(e){e.on('mouseover',A.onMouseover,A);
 });Roo.each(this.el.select('tbody td',true).elements,function(e){e.on('mouseout',A.onMouseout,A);});this.fireEvent('rowsrendered',this);this.autoSize();},onUpdate:function(ds,A){this.refreshRow(A);this.autoSize();},onRemove:function(ds,A,B,C){if(C!==true){this.fireEvent("beforerowremoved",this,B,A);
@@ -363,11 +376,12 @@ var t=r.cfg.render(r.container);if(r.cfg.cn){Roo.each(r.cfg.cn,function(c){var B
 var cw=A.getWidth();this.getGridEl().select('tfoot tr, tfoot  td',true).setWidth(cw);if(C){C.setWidth(A.getWidth());var E=(C.dom.offsetWidth-C.dom.clientWidth);cw-=E;}cw=Math.max(cw,this.totalWidth);this.getGridEl().select('tbody tr',true).setWidth(cw);return;
 },onBodyScroll:function(){if(this.mainHead){this.mainHead.setStyle({'position':'relative','left':(-1*this.mainBody.dom.scrollLeft)+'px'});}if(this.lazyLoad){var A=this.mainBody.dom.scrollHeight;var B=Math.ceil(this.mainBody.getScroll().top);var C=this.mainBody.getHeight();
 if(A-C==B){var D=this.ds.getTotalCount();if(this.footer.cursor+this.footer.pageSize<D){this.footer.ds.load({params:{start:this.footer.cursor+this.footer.pageSize,limit:this.footer.pageSize},add:true});}}}},onHeaderChange:function(){var A=this.renderHeader();
-var B=this.el.select('table',true).first();this.mainHead.remove();this.mainHead=B.createChild(A,this.mainBody,false);},onHiddenChange:function(A,B,C){var D='#'+this.id+' .x-hcol-'+B;var E='#'+this.id+' .x-col-'+B;this.CSS.updateRule(D,"display","");this.CSS.updateRule(E,"display","");
-if(C){this.CSS.updateRule(D,"display","none");this.CSS.updateRule(E,"display","none");}this.onHeaderChange();this.onLoad();},setColumnWidth:function(A,B){if(!this.colModel.config[A]){return;}var w=B.split(" ");var C=this.el.dom.getElementsByClassName("x-col-"+A);
-var D=this.el.dom.getElementsByClassName("x-hcol-"+A);for(var j=0;j<w.length;j++){if(!w[j]){continue;}var E=w[j].split("-");if(!Number.isInteger(E[1]*1)){continue;}if(!this.colModel.config[A][E[0]]){continue;}if(!D[0].classList.contains("col-"+E[0]+"-"+this.colModel.config[A][E[0]])){continue;
-}D[0].classList.replace("col-"+E[0]+"-"+this.colModel.config[A][E[0]],"col-"+E[0]+"-"+E[1]);for(var i=0;i<C.length;i++){var E=w[j].split("-");if(!Number.isInteger(E[1]*1)){continue;}if(!this.colModel.config[A][E[0]]){continue;}if(!C[i].classList.contains("col-"+E[0]+"-"+this.colModel.config[A][E[0]])){continue;
-}C[i].classList.replace("col-"+E[0]+"-"+this.colModel.config[A][E[0]],"col-"+E[0]+"-"+E[1]);}this.colModel.config[A][E[0]]=E[1];}}});
+var B=this.el.select('table',true).first();this.mainHead.remove();this.mainHead=B.createChild(A,this.mainBody,false);Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.on('click',this.sort,this);},this);},onHiddenChange:function(A,B,C){var D='#'+this.id+' .x-hcol-'+B;
+var E='#'+this.id+' .x-col-'+B;this.CSS.updateRule(D,"display","");this.CSS.updateRule(E,"display","");if(C){this.CSS.updateRule(D,"display","none");this.CSS.updateRule(E,"display","none");}this.onHeaderChange();this.onLoad();},setColumnWidth:function(A,B){if(!this.colModel.config[A]){return;
+}var w=B.split(" ");var C=this.el.dom.getElementsByClassName("x-col-"+A);var D=this.el.dom.getElementsByClassName("x-hcol-"+A);for(var j=0;j<w.length;j++){if(!w[j]){continue;}var E=w[j].split("-");if(!Number.isInteger(E[1]*1)){continue;}if(!this.colModel.config[A][E[0]]){continue;
+}if(!D[0].classList.contains("col-"+E[0]+"-"+this.colModel.config[A][E[0]])){continue;}D[0].classList.replace("col-"+E[0]+"-"+this.colModel.config[A][E[0]],"col-"+E[0]+"-"+E[1]);for(var i=0;i<C.length;i++){var E=w[j].split("-");if(!Number.isInteger(E[1]*1)){continue;
+}if(!this.colModel.config[A][E[0]]){continue;}if(!C[i].classList.contains("col-"+E[0]+"-"+this.colModel.config[A][E[0]])){continue;}C[i].classList.replace("col-"+E[0]+"-"+this.colModel.config[A][E[0]],"col-"+E[0]+"-"+E[1]);}this.colModel.config[A][E[0]]=E[1];
+}}});
 // Roo/bootstrap/TableCell.js
 Roo.bootstrap.TableCell=function(A){Roo.bootstrap.TableCell.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.TableCell,Roo.bootstrap.Component,{html:false,cls:false,tag:false,abbr:false,align:false,axis:false,bgcolor:false,charoff:false,colspan:false,headers:false,height:false,nowrap:false,rowspan:false,scope:false,valign:false,width:false,getAutoCreate:function(){var A=Roo.apply({}
 ,Roo.bootstrap.TableCell.superclass.getAutoCreate.call(this));A={tag:'td'};if(this.tag){A.tag=this.tag;}if(this.html){A.html=this.html}if(this.cls){A.cls=this.cls}if(this.abbr){A.abbr=this.abbr}if(this.align){A.align=this.align}if(this.axis){A.axis=this.axis}
@@ -435,7 +449,7 @@ Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^
 },'emailText':'This field should be an e-mail address in the format "user@domain.com"','emailMask':/[a-z0-9_\.\-@]/i,'url':function(v){return D.test(v);},'urlText':'This field should be a URL in the format "http:/'+'/www.domain.com"','alpha':function(v){return A.test(v);
 },'alphaText':'This field should only contain letters and _','alphaMask':/[a-z_]/i,'alphanum':function(v){return B.test(v);},'alphanumText':'This field should only contain letters, numbers and _','alphanumMask':/[a-z0-9_]/i};}();
 // Roo/bootstrap/Input.js
-Roo.bootstrap.Input=function(A){Roo.bootstrap.Input.superclass.constructor.call(this,A);this.addEvents({focus:true,blur:true,specialkey:true,change:true,invalid:true,valid:true,keyup:true});};Roo.extend(Roo.bootstrap.Input,Roo.bootstrap.Component,{validationEvent:"keyup",validateOnBlur:true,validationDelay:250,focusClass:"x-form-focus",invalidClass:"has-warning",validClass:"has-success",hasFeedback:true,invalidFeedbackClass:"glyphicon-warning-sign",validFeedbackClass:"glyphicon-ok",selectOnFocus:false,maskRe:null,vtype:null,disableKeyFilter:false,disabled:false,allowBlank:true,blankText:"Please complete this mandatory field",minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",validator:null,regex:null,regexText:"",invalidText:"",autocomplete:false,fieldLabel:'',inputType:'text',name:false,placeholder:false,before:false,after:false,size:false,hasFocus:false,preventMark:false,isFormField:true,value:'',labelWidth:2,labelAlign:false,readOnly:false,align:false,formatedValue:false,forceFeedback:false,indicatorpos:'left',labellg:0,labelmd:0,labelsm:0,labelxs:0,capture:'',accept:'',parentLabelAlign:function(){var A=this;
+Roo.bootstrap.Input=function(A){Roo.bootstrap.Input.superclass.constructor.call(this,A);this.addEvents({focus:true,blur:true,specialkey:true,change:true,invalid:true,valid:true,keyup:true,paste:true});};Roo.extend(Roo.bootstrap.Input,Roo.bootstrap.Component,{validationEvent:"keyup",validateOnBlur:true,validationDelay:250,focusClass:"x-form-focus",invalidClass:"has-warning",validClass:"has-success",hasFeedback:true,invalidFeedbackClass:"glyphicon-warning-sign",validFeedbackClass:"glyphicon-ok",selectOnFocus:false,maskRe:null,vtype:null,disableKeyFilter:false,disabled:false,allowBlank:true,blankText:"Please complete this mandatory field",minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",validator:null,regex:null,regexText:"",invalidText:"",autocomplete:false,fieldLabel:'',inputType:'text',name:false,placeholder:false,before:false,after:false,size:false,hasFocus:false,preventMark:false,isFormField:true,value:'',labelWidth:2,labelAlign:false,readOnly:false,align:false,formatedValue:false,forceFeedback:false,indicatorpos:'left',labellg:0,labelmd:0,labelsm:0,labelxs:0,capture:'',accept:'',parentLabelAlign:function(){var A=this;
 while(A.parent()){A=A.parent();if(typeof(A.labelAlign)!='undefined'){return A.labelAlign;}}return 'left';},getAutoCreate:function(){var A=(!this.labelAlign)?this.parentLabelAlign():this.labelAlign;var id=Roo.id();var B={};if(this.inputType!='hidden'){B.cls='form-group'}
 var C={tag:'input',id:id,type:this.inputType,value:this.value,cls:'form-control',placeholder:this.placeholder||'',autocomplete:this.autocomplete||'new-password'};if(this.inputType=='file'){C.style='overflow:hidden';}if(this.capture.length){C.capture=this.capture;
 }if(this.accept.length){C.accept=this.accept+"/*";}if(this.align){C.style=(typeof(C.style)=='undefined')?('text-align:'+this.align):(C.style+'text-align:'+this.align);}if(this.maxLength&&this.maxLength!=Number.MAX_VALUE){C.maxLength=this.maxLength;}if(this.disabled){C.disabled=true;
@@ -445,17 +459,18 @@ var C={tag:'input',id:id,type:this.inputType,value:this.value,cls:'form-control'
 );}if(this.after&&typeof(this.after)=='object'){this.after=Roo.factory(this.after);E.cn.push({tag:'span',cls:'roo-input-after input-group-append  input-group-'+(this.after.xtype=='Button'?'btn':'addon')});}if(this.hasFeedback&&this.inputType!='hidden'&&!this.allowBlank){E.cls+=' has-feedback';
 E.cn.push(F);}};var G={tag:'i',cls:'roo-required-indicator '+(this.indicatorpos=='right'?'right':'left')+'-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'};if(this.allowBlank){G.style=this.allowBlank?' display:none':'';}if(A==='left'&&this.fieldLabel.length){B.cls+=' roo-form-group-label-left'+(Roo.bootstrap.version==4?' row':'');
 B.cn=[G,{tag:'label','for':id,cls:'control-label col-form-label',html:this.fieldLabel},{cls:"",cn:[E]}];var H=B.cn[1];var I=B.cn[2];if(this.indicatorpos=='right'){B.cn=[{tag:'label','for':id,cls:'control-label col-form-label',cn:[{tag:'span',html:this.fieldLabel}
-,G]},{cls:"",cn:[E]}];H=B.cn[0];I=B.cn[1];}if(this.labelWidth>12){H.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;}if(this.labellg>0){H.cls+=' col-lg-'+this.labellg;I.cls+=' col-lg-'+(12-this.labellg);
+,G]},{cls:"",cn:[E]}];H=B.cn[0];I=B.cn[1];}if(this.labelWidth>12){H.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labellg=this.labellg>0?this.labellg:this.labelWidth;}if(this.labellg>0){H.cls+=' col-lg-'+this.labellg;I.cls+=' col-lg-'+(12-this.labellg);
 }if(this.labelmd>0){H.cls+=' col-md-'+this.labelmd;I.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){H.cls+=' col-sm-'+this.labelsm;I.cls+=' col-sm-'+(12-this.labelsm);}if(this.labelxs>0){H.cls+=' col-xs-'+this.labelxs;I.cls+=' col-xs-'+(12-this.labelxs);
 }}else if(this.fieldLabel.length){B.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required',style:this.allowBlank?' display:none':''},{tag:'label',html:this.fieldLabel},E];if(this.indicatorpos=='right'){B.cn=[{tag:'label',html:this.fieldLabel}
 ,{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required',style:this.allowBlank?' display:none':''},E];}}else{B.cn=[E];};if(this.parentType==='Navbar'&&this.parent().bar){B.cls+=' navbar-form';}if(this.parentType==='NavGroup'&&!(Roo.bootstrap.version==4&&this.parent().form)){B.cls+=' navbar-form';
 B.tag='li';}return B;},inputEl:function(){return this.el.select('input.form-control',true).first();},tooltipEl:function(){return this.inputEl();},indicatorEl:function(){if(Roo.bootstrap.version==4){return false;}var A=this.el.select('i.roo-required-indicator',true).first();
 if(!A){return false;}return A;},setDisabled:function(v){var i=this.inputEl().dom;if(!v){i.removeAttribute('disabled');return;}i.setAttribute('disabled','true');},initEvents:function(){this.inputEl().on("keydown",this.fireKey,this);this.inputEl().on("focus",this.onFocus,this);
-this.inputEl().on("blur",this.onBlur,this);this.inputEl().relayEvent('keyup',this);this.indicator=this.indicatorEl();if(this.indicator){this.indicator.addClass(this.indicatorpos=='right'?'hidden':'invisible');}this.originalValue=this.getValue();if(this.validationEvent=='keyup'){this.validationTask=new Roo.util.DelayedTask(this.validate,this);
-this.inputEl().on('keyup',this.filterValidation,this);}else if(this.validationEvent!==false){this.inputEl().on(this.validationEvent,this.validate,this,{buffer:this.validationDelay});}if(this.selectOnFocus){this.on("focus",this.preFocus,this);}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Roo.form.VTypes[this.vtype+'Mask']))){this.inputEl().on("keypress",this.filterKeys,this);
-}else{this.inputEl().relayEvent('keypress',this);}if(this.inputEl().is('input[type=password]')&&Roo.isSafari){this.inputEl().on('keydown',this.SafariOnKeyDown,this);}if(typeof(this.before)=='object'){this.before.render(this.el.select('.roo-input-before',true).first());
-}if(typeof(this.after)=='object'){this.after.render(this.el.select('.roo-input-after',true).first());}this.inputEl().on('change',this.onChange,this);},filterValidation:function(e){if(!e.isNavKeyPress()){this.validationTask.delay(this.validationDelay);}},validate:function(){if(this.disabled||this.validateValue(this.getRawValue())){this.markValid();
-return true;}this.markInvalid();return false;},validateValue:function(A){if(this.getVisibilityEl().hasClass('hidden')){return true;}if(A.length<1){if(this.allowBlank){return true;}return false;}if(A.length<this.minLength){return false;}if(A.length>this.maxLength){return false;
+this.inputEl().on("blur",this.onBlur,this);this.inputEl().relayEvent('keyup',this);this.inputEl().relayEvent('paste',this);this.indicator=this.indicatorEl();if(this.indicator){this.indicator.addClass(this.indicatorpos=='right'?'hidden':'invisible');}this.originalValue=this.getValue();
+if(this.validationEvent=='keyup'){this.validationTask=new Roo.util.DelayedTask(this.validate,this);this.inputEl().on('keyup',this.filterValidation,this);}else if(this.validationEvent!==false){this.inputEl().on(this.validationEvent,this.validate,this,{buffer:this.validationDelay}
+);}if(this.selectOnFocus){this.on("focus",this.preFocus,this);}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Roo.form.VTypes[this.vtype+'Mask']))){this.inputEl().on("keypress",this.filterKeys,this);}else{this.inputEl().relayEvent('keypress',this);
+}if(this.inputEl().is('input[type=password]')&&Roo.isSafari){this.inputEl().on('keydown',this.SafariOnKeyDown,this);}if(typeof(this.before)=='object'){this.before.render(this.el.select('.roo-input-before',true).first());}if(typeof(this.after)=='object'){this.after.render(this.el.select('.roo-input-after',true).first());
+}this.inputEl().on('change',this.onChange,this);},filterValidation:function(e){if(!e.isNavKeyPress()){this.validationTask.delay(this.validationDelay);}},validate:function(){if(this.disabled||this.validateValue(this.getRawValue())){this.markValid();return true;
+}this.markInvalid();return false;},validateValue:function(A){if(this.getVisibilityEl().hasClass('hidden')){return true;}if(A.length<1){if(this.allowBlank){return true;}return false;}if(A.length<this.minLength){return false;}if(A.length>this.maxLength){return false;
 }if(this.vtype){var vt=Roo.form.VTypes;if(!vt[this.vtype](A,this)){return false;}}if(typeof this.validator=="function"){var B=this.validator(A);if(B!==true){return false;}if(typeof(B)=='string'){this.invalidText=B;}}if(this.regex&&!this.regex.test(A)){return false;
 }return true;},fireKey:function(e){if(e.isNavKeyPress()){this.fireEvent("specialkey",this,e);}},focus:function(A){if(this.rendered){this.inputEl().focus();if(A===true){this.inputEl().dom.select();}}return this;},onFocus:function(){if(!Roo.isOpera&&this.focusClass){}
 if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this);}},beforeBlur:Roo.emptyFn,onBlur:function(){this.beforeBlur();if(!Roo.isOpera&&this.focusClass){}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate();
@@ -651,9 +666,9 @@ this.store.on('loadexception',this.onLoadException,this);if(this.editable){this.
 }this.indicator=this.indicatorEl();if(this.indicator){this.indicator.setVisibilityMode(Roo.Element.DISPLAY);this.indicator.hide();}},onDestroy:function(){if(this.view){this.view.setStore(null);this.view.el.removeAllListeners();this.view.el.remove();this.view.purgeListeners();
 }if(this.list){this.list.dom.innerHTML='';}if(this.store){this.store.un('beforeload',this.onBeforeLoad,this);this.store.un('load',this.onLoad,this);this.store.un('loadexception',this.onLoadException,this);}Roo.bootstrap.ComboBox.superclass.onDestroy.call(this);
 },fireKey:function(e){if(e.isNavKeyPress()&&!this.list.isVisible()){this.fireEvent("specialkey",this,e);}},onResize:function(w,h){},setEditable:function(A){if(A==this.editable){return;}this.editable=A;if(!A){this.inputEl().dom.setAttribute('readOnly',true);
-this.inputEl().on('mousedown',this.onTriggerClick,this);this.inputEl().addClass('x-combo-noedit');}else{this.inputEl().dom.setAttribute('readOnly',false);this.inputEl().un('mousedown',this.onTriggerClick,this);this.inputEl().removeClass('x-combo-noedit');
-}},onBeforeLoad:function(A,B){if(!this.hasFocus){return;}if(!B.add){this.list.dom.innerHTML='<li class="loading-indicator">'+(this.loadingText||'loading')+'</li>';}this.restrictHeight();this.selectedIndex=-1;},onLoad:function(){this.hasQuery=false;if(!this.hasFocus){return;
-}if(typeof(this.loading)!=='undefined'&&this.loading!==null){this.loading.hide();}if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable&&!this.tickable){this.inputEl().dom.select();}if(!this.selectByValue(this.value,true)&&this.autoFocus&&(!this.store.lastOptions||typeof(this.store.lastOptions.add)=='undefined'||this.store.lastOptions.add!=true)){this.select(0,true);
+this.inputEl().on('mousedown',this.onTriggerClick,this);this.inputEl().addClass('x-combo-noedit');}else{this.inputEl().dom.removeAttribute('readOnly');this.inputEl().un('mousedown',this.onTriggerClick,this);this.inputEl().removeClass('x-combo-noedit');}},onBeforeLoad:function(A,B){if(!this.hasFocus){return;
+}if(!B.add){this.list.dom.innerHTML='<li class="loading-indicator">'+(this.loadingText||'loading')+'</li>';}this.restrictHeight();this.selectedIndex=-1;},onLoad:function(){this.hasQuery=false;if(!this.hasFocus){return;}if(typeof(this.loading)!=='undefined'&&this.loading!==null){this.loading.hide();
+}if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable&&!this.tickable){this.inputEl().dom.select();}if(!this.selectByValue(this.value,true)&&this.autoFocus&&(!this.store.lastOptions||typeof(this.store.lastOptions.add)=='undefined'||this.store.lastOptions.add!=true)){this.select(0,true);
 }}else{if(this.autoFocus){this.selectNext();}if(this.typeAhead&&this.lastKey!=Roo.EventObject.BACKSPACE&&this.lastKey!=Roo.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay);}}}else{this.onEmptyResults();}},onLoadException:function(){this.hasQuery=false;
 if(typeof(this.loading)!=='undefined'&&this.loading!==null){this.loading.hide();}if(this.tickable&&this.editable){return;}this.collapse();},onTypeAhead:function(){if(this.store.getCount()>0){var r=this.store.getAt(0);var A=r.data[this.displayField];var B=A.length;
 var C=this.getRawValue().length;if(C!=B){this.setRawValue(A);this.selectText(C,A.length);}}},onSelect:function(A,B){if(this.fireEvent('beforeselect',this,A,B)!==false){this.setFromData(B>-1?A.data:false);this.collapse();this.fireEvent('select',this,A,B);}
@@ -704,34 +719,33 @@ this.lastItem=Roo.apply([],this.item);if(A&&A.name=='cancel'){this.tickItems=Roo
 );}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 input-group-append input-group-text',html:this.after});}var D=C;if(this.multiple){D={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:[{tag:'input',type:'hidden',cls:'form-hidden-field'},D]};if(!this.multiple&&this.showToggleBtn){var F={cls:'caret'};if(this.caret!=false){F={tag:'i',cls:'fa fa-'+this.caret};}E.cn.push({tag:'span',cls:'input-group-addon input-group-append input-group-text btn dropdown-toggle',cn:[Roo.bootstrap.version==3?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();if(G==='left'&&this.fieldLabel.length){A.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}
-,{tag:'label',cls:'control-label col-form-label',html:this.fieldLabel},{cls:'roo-combobox-wrap ',cn:[E]}];var H=A.cn[1];var I=A.cn[2];if(this.indicatorpos=='right'){A.cn=[{tag:'label','for':id,cls:'control-label col-form-label',cn:[{tag:'span',html:this.fieldLabel}
-,{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}]},{cls:"roo-combobox-wrap ",cn:[E]}];H=A.cn[0];I=A.cn[1];}if(this.labelWidth>12){H.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;
-}if(this.labellg>0){H.cls+=' col-lg-'+this.labellg;I.cls+=' col-lg-'+(12-this.labellg);}if(this.labelmd>0){H.cls+=' col-md-'+this.labelmd;I.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){H.cls+=' col-sm-'+this.labelsm;I.cls+=' col-sm-'+(12-this.labelsm);
-}if(this.labelxs>0){H.cls+=' col-xs-'+this.labelxs;I.cls+=' col-xs-'+(12-this.labelxs);}}else if(this.fieldLabel.length){A.cn=[{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'},{tag:'label',cls:'control-label',html:this.fieldLabel}
-,{cls:'',cn:[E]}];if(this.indicatorpos=='right'){A.cn=[{tag:'label',cls:'control-label',html:this.fieldLabel,cn:[{tag:'i',cls:'roo-required-indicator right-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'}]},{cls:'',cn:[E]}];}}else{A.cn=E;
-}var J=this;['xs','sm','md','lg'].map(function(K){if(J[K]){A.cls+=' col-'+K+'-'+J[K];}});return A;},initTouchView:function(){this.renderTouchView();this.touchViewEl.on('scroll',function(){this.el.dom.scrollTop=0;},this);this.originalValue=this.getValue();
-this.triggerEl=this.el.select('span.dropdown-toggle',true).first();this.inputEl().on("click",this.showTouchView,this);if(this.triggerEl){this.triggerEl.on("click",this.showTouchView,this);}this.touchViewFooterEl.select('.roo-touch-view-cancel',true).first().on('click',this.hideTouchView,this);
-this.touchViewFooterEl.select('.roo-touch-view-ok',true).first().on('click',this.setTouchViewValue,this);this.maskEl=new Roo.LoadMask(this.touchViewEl,{store:this.store,msgCls:'roo-el-mask-msg'});this.store.on('beforeload',this.onTouchViewBeforeLoad,this);
-this.store.on('load',this.onTouchViewLoad,this);this.store.on('loadexception',this.onTouchViewLoadException,this);if(this.hiddenName){this.hiddenField=this.el.select('input.form-hidden-field',true).first();this.hiddenField.dom.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:'';
-this.el.dom.removeAttribute('name');this.hiddenField.dom.setAttribute('name',this.hiddenName);}if(this.multiple){this.choices=this.el.select('ul.roo-select2-choices',true).first();this.searchField=this.el.select('ul li.roo-select2-search-field',true).first();
-}if(this.removable&&!this.multiple){var A=this.closeTriggerEl();if(A){A.setVisibilityMode(Roo.Element.DISPLAY).hide();A.on('click',this.removeBtnClick,this,A);}}this.inputEl().on("focus",function(e){document.activeElement.blur();},this);this._touchViewMask=Roo.DomHelper.append(document.body,{tag:"div",cls:"x-dlg-mask"}
-,true);return;},renderTouchView:function(){this.touchViewEl=Roo.get(document.body).createChild(Roo.bootstrap.ComboBox.touchViewTemplate);this.touchViewEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.touchViewHeaderEl=this.touchViewEl.select('.modal-header',true).first();
-this.touchViewHeaderEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.touchViewBodyEl=this.touchViewEl.select('.modal-body',true).first();this.touchViewBodyEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.touchViewBodyEl.setStyle('overflow','auto');
-this.touchViewListGroup=this.touchViewBodyEl.select('.list-group',true).first();this.touchViewListGroup.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.touchViewFooterEl=this.touchViewEl.select('.modal-footer',true).first();this.touchViewFooterEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';
-},showTouchView:function(){if(this.disabled){return;}this.touchViewHeaderEl.hide();if(this.modalTitle.length){this.touchViewHeaderEl.dom.innerHTML=this.modalTitle;this.touchViewHeaderEl.show();}this.touchViewEl.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);
-this.touchViewEl.show();this.touchViewEl.select('.modal-dialog',true).first().setStyle({margin:'0px',width:'100%'});var A=Roo.lib.Dom.getViewHeight()-this.touchViewFooterEl.getHeight()+this.touchViewBodyEl.getPadding('tb');if(this.modalTitle.length){A=A-this.touchViewHeaderEl.getHeight();
-}this.touchViewBodyEl.setHeight(A);if(this.animate){var B=this;(function(){B.touchViewEl.addClass(['in','show']);}).defer(50);}else{this.touchViewEl.addClass(['in','show']);}if(this._touchViewMask){Roo.get(document.body).addClass("x-body-masked");this._touchViewMask.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));
-this._touchViewMask.setStyle('z-index',10000);this._touchViewMask.addClass('show');}this.doTouchViewQuery();},hideTouchView:function(){this.touchViewEl.removeClass(['in','show']);if(this.animate){var A=this;(function(){A.touchViewEl.setStyle('display','none');
-}).defer(150);}else{this.touchViewEl.setStyle('display','none');}if(this._touchViewMask){this._touchViewMask.removeClass('show');Roo.get(document.body).removeClass("x-body-masked");}},setTouchViewValue:function(){if(this.multiple){this.clearItem();var A=this;
-Roo.each(this.tickItems,function(o){this.addItem(o);},this);}this.hideTouchView();},doTouchViewQuery:function(){var qe={query:'',forceAll:true,combo:this,cancel:false};if(this.fireEvent('beforequery',qe)===false||qe.cancel){return false;}if(!this.alwaysQuery||this.mode=='local'){this.onTouchViewLoad();
-return;}this.store.load();},onTouchViewBeforeLoad:function(A,B){return;},onTouchViewLoad:function(){if(this.store.getCount()<1){this.onTouchViewEmptyResults();return;}this.clearTouchView();var A=this.getRawValue();var B=(this.multiple)?Roo.bootstrap.ComboBox.listItemCheckbox:Roo.bootstrap.ComboBox.listItemRadio;
-this.tickItems=[];this.store.data.each(function(d,G){var H=this.touchViewListGroup.createChild(B);if(typeof(d.data.cls)!='undefined'&&d.data.cls.length){H.addClass(d.data.cls);}if(this.displayField&&typeof(d.data[this.displayField])!='undefined'){var I={data:d.data,html:d.data[this.displayField]}
-;if(this.fireEvent('touchviewdisplay',this,I)!==false){H.select('.roo-combobox-list-group-item-value',true).first().dom.innerHTML=I.html;}}H.removeClass('selected');if(!this.multiple&&this.valueField&&typeof(d.data[this.valueField])!='undefined'&&d.data[this.valueField]==this.getValue()){H.select('.roo-combobox-list-group-item-box > input',true).first().attr('checked',true);
-H.addClass('selected');}if(this.multiple&&this.valueField&&typeof(d.data[this.valueField])!='undefined'&&this.getValue().indexOf(d.data[this.valueField])!=-1){H.select('.roo-combobox-list-group-item-box > input',true).first().attr('checked',true);this.tickItems.push(d.data);
-}H.on('click',this.onTouchViewClick,this,{row:H,rowIndex:G});},this);var C=this.touchViewListGroup.select('.list-group-item > .roo-combobox-list-group-item-box > input:checked',true).first();var D=Roo.lib.Dom.getViewHeight()-this.touchViewFooterEl.getHeight()+this.touchViewBodyEl.getPadding('tb');
-if(this.modalTitle.length){D=D-this.touchViewHeaderEl.getHeight();}var E=this.touchViewListGroup.getHeight()+this.touchViewBodyEl.getPadding('tb')*2;if(this.mobile_restrict_height&&E<D){this.touchViewBodyEl.setHeight(E);}var F=this;if(C&&E>D){(function(){C.findParent('li').scrollIntoView(F.touchViewListGroup.dom);
-}).defer(500);}},onTouchViewLoadException:function(){this.hideTouchView();},onTouchViewEmptyResults:function(){this.clearTouchView();this.touchViewListGroup.createChild(Roo.bootstrap.ComboBox.emptyResult);this.touchViewListGroup.select('.roo-combobox-touch-view-empty-result',true).first().dom.innerHTML=this.emptyResultText;
+]}]})}if(this.multiple){E.cls+=' roo-select2-container-multi';}var G=this.allowBlank?{tag:'i',style:'display: none'}:{tag:'i',cls:'roo-required-indicator left-indicator text-danger fa fa-lg fa-star',tooltip:'This field is required'};var H=this.labelAlign||this.parentLabelAlign();
+if(H==='left'&&this.fieldLabel.length){A.cn=[G,{tag:'label',cls:'control-label col-form-label',html:this.fieldLabel},{cls:'roo-combobox-wrap ',cn:[E]}];var I=A.cn[1];var J=A.cn[2];if(this.indicatorpos=='right'){A.cn=[{tag:'label','for':id,cls:'control-label col-form-label',cn:[{tag:'span',html:this.fieldLabel}
+,G]},{cls:"roo-combobox-wrap ",cn:[E]}];I=A.cn[0];J=A.cn[1];}if(this.labelWidth>12){I.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;}if(this.labellg>0){I.cls+=' col-lg-'+this.labellg;J.cls+=' col-lg-'+(12-this.labellg);
+}if(this.labelmd>0){I.cls+=' col-md-'+this.labelmd;J.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){I.cls+=' col-sm-'+this.labelsm;J.cls+=' col-sm-'+(12-this.labelsm);}if(this.labelxs>0){I.cls+=' col-xs-'+this.labelxs;J.cls+=' col-xs-'+(12-this.labelxs);
+}}else if(this.fieldLabel.length){A.cn=[G,{tag:'label',cls:'control-label',html:this.fieldLabel},{cls:'',cn:[E]}];if(this.indicatorpos=='right'){A.cn=[{tag:'label',cls:'control-label',html:this.fieldLabel,cn:[G]},{cls:'',cn:[E]}];}}else{A.cn=E;}var K=this;
+['xs','sm','md','lg'].map(function(L){if(K[L]){A.cls+=' col-'+L+'-'+K[L];}});return A;},initTouchView:function(){this.renderTouchView();this.touchViewEl.on('scroll',function(){this.el.dom.scrollTop=0;},this);this.originalValue=this.getValue();this.triggerEl=this.el.select('span.dropdown-toggle',true).first();
+this.inputEl().on("click",this.showTouchView,this);if(this.triggerEl){this.triggerEl.on("click",this.showTouchView,this);}this.touchViewFooterEl.select('.roo-touch-view-cancel',true).first().on('click',this.hideTouchView,this);this.touchViewFooterEl.select('.roo-touch-view-ok',true).first().on('click',this.setTouchViewValue,this);
+this.maskEl=new Roo.LoadMask(this.touchViewEl,{store:this.store,msgCls:'roo-el-mask-msg'});this.store.on('beforeload',this.onTouchViewBeforeLoad,this);this.store.on('load',this.onTouchViewLoad,this);this.store.on('loadexception',this.onTouchViewLoadException,this);
+if(this.hiddenName){this.hiddenField=this.el.select('input.form-hidden-field',true).first();this.hiddenField.dom.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:'';this.el.dom.removeAttribute('name');this.hiddenField.dom.setAttribute('name',this.hiddenName);
+}if(this.multiple){this.choices=this.el.select('ul.roo-select2-choices',true).first();this.searchField=this.el.select('ul li.roo-select2-search-field',true).first();}if(this.removable&&!this.multiple){var A=this.closeTriggerEl();if(A){A.setVisibilityMode(Roo.Element.DISPLAY).hide();
+A.on('click',this.removeBtnClick,this,A);}}this.inputEl().on("focus",function(e){document.activeElement.blur();},this);this._touchViewMask=Roo.DomHelper.append(document.body,{tag:"div",cls:"x-dlg-mask"},true);return;},renderTouchView:function(){this.touchViewEl=Roo.get(document.body).createChild(Roo.bootstrap.ComboBox.touchViewTemplate);
+this.touchViewEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.touchViewHeaderEl=this.touchViewEl.select('.modal-header',true).first();this.touchViewHeaderEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.touchViewBodyEl=this.touchViewEl.select('.modal-body',true).first();
+this.touchViewBodyEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.touchViewBodyEl.setStyle('overflow','auto');this.touchViewListGroup=this.touchViewBodyEl.select('.list-group',true).first();this.touchViewListGroup.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';
+this.touchViewFooterEl=this.touchViewEl.select('.modal-footer',true).first();this.touchViewFooterEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';},showTouchView:function(){if(this.disabled){return;}this.touchViewHeaderEl.hide();if(this.modalTitle.length){this.touchViewHeaderEl.dom.innerHTML=this.modalTitle;
+this.touchViewHeaderEl.show();}this.touchViewEl.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);this.touchViewEl.show();this.touchViewEl.select('.modal-dialog',true).first().setStyle({margin:'0px',width:'100%'});var A=Roo.lib.Dom.getViewHeight()-this.touchViewFooterEl.getHeight()+this.touchViewBodyEl.getPadding('tb');
+if(this.modalTitle.length){A=A-this.touchViewHeaderEl.getHeight();}this.touchViewBodyEl.setHeight(A);if(this.animate){var B=this;(function(){B.touchViewEl.addClass(['in','show']);}).defer(50);}else{this.touchViewEl.addClass(['in','show']);}if(this._touchViewMask){Roo.get(document.body).addClass("x-body-masked");
+this._touchViewMask.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));this._touchViewMask.setStyle('z-index',10000);this._touchViewMask.addClass('show');}this.doTouchViewQuery();},hideTouchView:function(){this.touchViewEl.removeClass(['in','show']);
+if(this.animate){var A=this;(function(){A.touchViewEl.setStyle('display','none');}).defer(150);}else{this.touchViewEl.setStyle('display','none');}if(this._touchViewMask){this._touchViewMask.removeClass('show');Roo.get(document.body).removeClass("x-body-masked");
+}},setTouchViewValue:function(){if(this.multiple){this.clearItem();var A=this;Roo.each(this.tickItems,function(o){this.addItem(o);},this);}this.hideTouchView();},doTouchViewQuery:function(){var qe={query:'',forceAll:true,combo:this,cancel:false};if(this.fireEvent('beforequery',qe)===false||qe.cancel){return false;
+}if(!this.alwaysQuery||this.mode=='local'){this.onTouchViewLoad();return;}this.store.load();},onTouchViewBeforeLoad:function(A,B){return;},onTouchViewLoad:function(){if(this.store.getCount()<1){this.onTouchViewEmptyResults();return;}this.clearTouchView();
+var A=this.getRawValue();var B=(this.multiple)?Roo.bootstrap.ComboBox.listItemCheckbox:Roo.bootstrap.ComboBox.listItemRadio;this.tickItems=[];this.store.data.each(function(d,G){var H=this.touchViewListGroup.createChild(B);if(typeof(d.data.cls)!='undefined'&&d.data.cls.length){H.addClass(d.data.cls);
+}if(this.displayField&&typeof(d.data[this.displayField])!='undefined'){var I={data:d.data,html:d.data[this.displayField]};if(this.fireEvent('touchviewdisplay',this,I)!==false){H.select('.roo-combobox-list-group-item-value',true).first().dom.innerHTML=I.html;
+}}H.removeClass('selected');if(!this.multiple&&this.valueField&&typeof(d.data[this.valueField])!='undefined'&&d.data[this.valueField]==this.getValue()){H.select('.roo-combobox-list-group-item-box > input',true).first().attr('checked',true);H.addClass('selected');
+}if(this.multiple&&this.valueField&&typeof(d.data[this.valueField])!='undefined'&&this.getValue().indexOf(d.data[this.valueField])!=-1){H.select('.roo-combobox-list-group-item-box > input',true).first().attr('checked',true);this.tickItems.push(d.data);}H.on('click',this.onTouchViewClick,this,{row:H,rowIndex:G}
+);},this);var C=this.touchViewListGroup.select('.list-group-item > .roo-combobox-list-group-item-box > input:checked',true).first();var D=Roo.lib.Dom.getViewHeight()-this.touchViewFooterEl.getHeight()+this.touchViewBodyEl.getPadding('tb');if(this.modalTitle.length){D=D-this.touchViewHeaderEl.getHeight();
+}var E=this.touchViewListGroup.getHeight()+this.touchViewBodyEl.getPadding('tb')*2;if(this.mobile_restrict_height&&E<D){this.touchViewBodyEl.setHeight(E);}var F=this;if(C&&E>D){(function(){C.findParent('li').scrollIntoView(F.touchViewListGroup.dom);}).defer(500);
+}},onTouchViewLoadException:function(){this.hideTouchView();},onTouchViewEmptyResults:function(){this.clearTouchView();this.touchViewListGroup.createChild(Roo.bootstrap.ComboBox.emptyResult);this.touchViewListGroup.select('.roo-combobox-touch-view-empty-result',true).first().dom.innerHTML=this.emptyResultText;
 },clearTouchView:function(){this.touchViewListGroup.dom.innerHTML='';},onTouchViewClick:function(e,el,o){e.preventDefault();var A=o.row;var B=o.rowIndex;var r=this.store.getAt(B);if(this.fireEvent('beforeselect',this,r,B)!==false){if(!this.multiple){Roo.each(this.touchViewListGroup.select('.list-group-item > .roo-combobox-list-group-item-box > input:checked',true).elements,function(c){c.dom.removeAttribute('checked');
 },this);A.select('.roo-combobox-list-group-item-box > input',true).first().attr('checked',true);this.setFromData(r.data);var C=this.closeTriggerEl();if(C){C.show();}this.hideTouchView();this.fireEvent('select',this,r,B);return;}if(this.valueField&&typeof(r.data[this.valueField])!='undefined'&&this.getValue().indexOf(r.data[this.valueField])!=-1){A.select('.roo-combobox-list-group-item-box > input',true).first().dom.removeAttribute('checked');
 this.tickItems.splice(this.tickItems.indexOf(r.data),1);return;}A.select('.roo-combobox-list-group-item-box > input',true).first().attr('checked',true);this.addItem(r.data);this.tickItems.push(r.data);}},getAutoCreateNativeIOS:function(){var A={cls:'form-group'}
@@ -820,7 +834,7 @@ this.headerEl.setVisibilityMode(Roo.Element.DISPLAY);this.el.enableDisplayMode('
 var B=this.trigger?this.trigger.split(' '):[];Roo.each(B,function(C){if(C=='click'){A.on('click',this.toggle,this);}else if(C!='manual'){var D=C=='hover'?'mouseenter':'focusin';var E=C=='hover'?'mouseleave':'focusout';A.on(D,this.enter,this);A.on(E,this.leave,this);
 }},this);},timeout:null,hoverState:null,toggle:function(){this.hoverState=='in'?this.leave():this.enter();},enter:function(){clearTimeout(this.timeout);this.hoverState='in';if(!this.delay||!this.delay.show){this.show();return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='in'){_t.show();
 }},this.delay.show)},leave:function(){clearTimeout(this.timeout);this.hoverState='out';if(!this.delay||!this.delay.hide){this.hide();return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='out'){_t.hide();}},this.delay.hide)},show:function(A,B){this.placement=typeof(B)=='undefined'?this.placement:B;
-A=A||false;if(!A){if(this.parent()&&(this.over=='parent'||(this.over===false))){A=this.parent().el;}else if(this.over){Roo.get(this.over);}}this.alignEl=Roo.get(A);if(!this.el){this.render(document.body);}if(this.title===false){this.headerEl.hide();}this.el.show();
+A=A||false;if(!A){if(this.parent()&&(this.over=='parent'||(this.over===false))){A=this.parent().el;}else if(this.over){A=Roo.get(this.over);}}this.alignEl=Roo.get(A);if(!this.el){this.render(document.body);}if(this.title===false){this.headerEl.hide();}this.el.show();
 this.el.dom.style.display='block';if(this.alignEl){this.updatePosition(this.placement,true);}else{var es=this.el.getSize();var x=Roo.lib.Dom.getViewWidth()/2;var y=Roo.lib.Dom.getViewHeight()/2;this.el.setXY([x-(es.width/2),y-(es.height/2)]);}this.el.addClass('in');
 this.hoverState='in';if(this.modal){this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));this.maskEl.setStyle('z-index',Roo.bootstrap.Popover.zIndex++);this.maskEl.dom.style.display='block';this.maskEl.addClass('show');}this.el.setStyle('z-index',Roo.bootstrap.Popover.zIndex++);
 this.fireEvent('show',this);},updatePosition:function(A,B){A=A?A:this.placement;B=typeof(B)=='undefined'?true:B;this.el.removeClass(['fade','top','bottom','left','right','in','bs-popover-top','bs-popover-bottom','bs-popover-left','bs-popover-right']);this.el.addClass(A+' bs-popover-'+A);
@@ -830,8 +844,9 @@ var xy=this.alignEl.getAnchorXY('tl',false);xy[0]-=10;xy[1]+=5;this.arrowEl.setX
 if(!B||C.equals(D)||C[1]==D[1]){this.el.setXY(D);var xy=this.alignEl.getAnchorXY('t',false);xy[1]-=10;this.arrowEl.setXY(xy);return true;}return this.updatePosition('bottom',false);case 'bottom':var C=this.el.getAlignToXY(this.alignEl,'t-b',[0,10]);var D=this.el.getAlignToXY(this.alignEl,'t-b?',[0,10]);
 if(!B||C.equals(D)||C[1]==D[1]){this.el.setXY(D);var xy=this.alignEl.getAnchorXY('b',false);xy[1]+=2;this.arrowEl.setXY(xy);return true;}return this.updatePosition('top',false);}return false;},hide:function(){this.el.setXY([0,0]);this.el.removeClass('in');
 this.el.hide();this.hoverState=null;this.maskEl.hide();this.fireEvent('hide',this);}});Roo.apply(Roo.bootstrap.Popover,{alignment:{'left':['r-l',[-10,0],'left bs-popover-left'],'right':['l-br',[10,0],'right bs-popover-right'],'bottom':['t-b',[0,10],'top bs-popover-top'],'top':['b-t',[0,-10],'bottom bs-popover-bottom']}
-,zIndex:20001,clickHander:false,onMouseDown:function(e){if(!e.getTarget(".roo-popover")){this.hideAll();}},popups:[],register:function(A){if(!Roo.bootstrap.Popover.clickHandler){Roo.bootstrap.Popover.clickHandler=Roo.get(document).on("mousedown",Roo.bootstrap.Popover.onMouseDown,Roo.bootstrap.Popover);
-}this.hideAll();this.popups.push(A);},hideAll:function(){this.popups.forEach(function(p){p.hide();});}});
+,zIndex:20001,clickHander:false,onMouseDown:function(e){if(this.popups.length&&!e.getTarget(".roo-popover")){this.hideAll();}},popups:[],register:function(A){if(!Roo.bootstrap.Popover.clickHandler){Roo.bootstrap.Popover.clickHandler=Roo.get(document).on("mousedown",Roo.bootstrap.Popover.onMouseDown,Roo.bootstrap.Popover);
+}A.on('show',Roo.bootstrap.Popover.onShow,A);A.on('hide',Roo.bootstrap.Popover.onHide,A);this.hideAll();},hideAll:function(){this.popups.forEach(function(p){p.hide();});},onShow:function(){Roo.bootstrap.Popover.popups.push(this);},onHide:function(){Roo.bootstrap.Popover.popups.remove(this);
+}});
 // Roo/bootstrap/PopoverNav.js
 Roo.bootstrap.PopoverNav=function(A){Roo.bootstrap.PopoverNav.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.PopoverNav,Roo.bootstrap.NavSimplebar,{container_method:'getPopoverHeader'});
 // Roo/bootstrap/Progress.js
@@ -905,8 +920,8 @@ F=this.moveYear(this.viewDate,B);}else if(e.shiftKey){E=this.moveMonth(this.date
 this.hidePopup();break;case 16:case 17:case 18:break;default:this.hidePopup();}},onClick:function(e){e.stopPropagation();e.preventDefault();var A=e.getTarget();if(A.nodeName.toLowerCase()==='i'){A=Roo.get(A).dom.parentNode;}var B=A.nodeName;var C=A.className;
 var D=A.innerHTML;switch(B.toLowerCase()){case 'th':switch(C){case 'switch':this.showMode(1);break;case 'prev':case 'next':var E=Roo.bootstrap.DateField.modes[this.viewMode].navStep*(C=='prev'?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,E);
 break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,E);break;}this.fill();break;case 'today':var F=new Date();this.date=this.UTCDate(F.getFullYear(),F.getMonth(),F.getDate(),0,0,0);this.setValue(this.formatDate(this.date));this.hidePopup();break;
-}break;case 'span':if(C.indexOf('disabled')<0){this.viewDate.setUTCDate(1);if(C.indexOf('month')>-1){this.viewDate.setUTCMonth(Roo.bootstrap.DateField.dates[this.language].monthsShort.indexOf(D));}else{var G=parseInt(D,10)||0;this.viewDate.setUTCFullYear(G);
-}if(this.singleMode){this.setValue(this.formatDate(this.viewDate));this.hidePopup();return;}this.showMode(-1);this.fill();}break;case 'td':if(C.indexOf('day')>-1&&C.indexOf('disabled')<0){var H=parseInt(D,10)||1;var G=(this.viewDate||new Date()).getUTCFullYear(),I=(this.viewDate||new Date()).getUTCMonth();
+}break;case 'span':if(C.indexOf('disabled')<0){if(!this.viewDate){this.viewDate=new Date();}this.viewDate.setUTCDate(1);if(C.indexOf('month')>-1){this.viewDate.setUTCMonth(Roo.bootstrap.DateField.dates[this.language].monthsShort.indexOf(D));}else{var G=parseInt(D,10)||0;
+this.viewDate.setUTCFullYear(G);}if(this.singleMode){this.setValue(this.formatDate(this.viewDate));this.hidePopup();return;}this.showMode(-1);this.fill();}break;case 'td':if(C.indexOf('day')>-1&&C.indexOf('disabled')<0){var H=parseInt(D,10)||1;var G=(this.viewDate||new Date()).getUTCFullYear(),I=(this.viewDate||new Date()).getUTCMonth();
 if(C.indexOf('old')>-1){if(I===0){I=11;G-=1;}else{I-=1;}}else if(C.indexOf('new')>-1){if(I==11){I=0;G+=1;}else{I+=1;}}this.date=this.UTCDate(G,I,H,0,0,0,0);this.viewDate=this.UTCDate(G,I,Math.min(28,H),0,0,0,0);this.setValue(this.formatDate(this.date));this.hidePopup();
 }break;}},setStartDate:function(A){this.startDate=A||-Infinity;if(this.startDate!==-Infinity){this.startDate=this.parseDate(this.startDate);}this.update();this.updateNavArrows();},setEndDate:function(A){this.endDate=A||Infinity;if(this.endDate!==Infinity){this.endDate=this.parseDate(this.endDate);
 }this.update();this.updateNavArrows();},setDaysOfWeekDisabled:function(A){this.daysOfWeekDisabled=A||[];if(typeof(this.daysOfWeekDisabled)!=='object'){this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/);}this.daysOfWeekDisabled=this.daysOfWeekDisabled.map(function(d){return parseInt(d,10);
@@ -1085,7 +1100,7 @@ Roo.each(Roo.HtmlEditorCore.cwhite,function(A){if(b.indexOf(A)>-1){return;}this.
 );return;}var B=this;Roo.each(A,function(s){if(!s.length){return;}Roo.get(B.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:s});});},removeStylesheets:function(){var A=this;Roo.each(Roo.get(A.iframe.contentDocument.head).select('link[rel=stylesheet]',true).elements,function(s){s.remove();
 });},setStyle:function(A){Roo.get(this.iframe.contentDocument.head).createChild({tag:'style',type:'text/css',html:A});return;}});Roo.HtmlEditorCore.white=['area','br','img','input','hr','wbr','address','blockquote','center','dd','dir','div','dl','dt','h1','h2','h3','h4','h5','h6','hr','isindex','listing','marquee','menu','multicol','ol','p','plaintext','pre','table','ul','xmp','caption','col','colgroup','tbody','td','tfoot','th','thead','tr','dir','menu','ol','ul','dl','embed','object'];
 Roo.HtmlEditorCore.black=['applet','base','basefont','bgsound','blink','body','frame','frameset','head','html','ilayer','iframe','layer','link','meta','object','script','style','title','xml'];Roo.HtmlEditorCore.clean=['script','style','title','xml'];Roo.HtmlEditorCore.remove=['font'];
-Roo.HtmlEditorCore.ablack=['on'];Roo.HtmlEditorCore.aclean=['action','background','codebase','dynsrc','href','lowsrc'];Roo.HtmlEditorCore.pwhite=['http','https','mailto'];Roo.HtmlEditorCore.cwhite=[];Roo.HtmlEditorCore.cblack=[];Roo.HtmlEditorCore.swapCodes=[[8211,"--"],[8212,"--"],[8216,"'"],[8217,"'"],[8220,'"'],[8221,'"'],[8226,"*"],[8230,"..."]];
+Roo.HtmlEditorCore.ablack=['on'];Roo.HtmlEditorCore.aclean=['action','background','codebase','dynsrc','href','lowsrc'];Roo.HtmlEditorCore.pwhite=['http','https','mailto'];Roo.HtmlEditorCore.cwhite=[];Roo.HtmlEditorCore.cblack=[];Roo.HtmlEditorCore.swapCodes=[[8211,"&#8211;"],[8212,"&#8212;"],[8216,"'"],[8217,"'"],[8220,'"'],[8221,'"'],[8226,"*"],[8230,"..."]];
 
 // Roo/bootstrap/HtmlEditor.js
 Roo.bootstrap.HtmlEditor=function(A){Roo.bootstrap.HtmlEditor.superclass.constructor.call(this,A);if(!this.toolbars){this.toolbars=[];}this.editorcore=new Roo.HtmlEditorCore(Roo.apply({owner:this},A));this.addEvents({initialize:true,activate:true,beforesync:true,beforepush:true,sync:true,push:true,editmodechange:true,editorevent:true,firstfocus:true,autosave:true,savedpreview:true}
@@ -1208,14 +1223,14 @@ if(this.pos=='left'){B.cls=(typeof(B.cls)=='undefined')?'pull-left':(B.cls+' pul
 },onClick:function(e){if(this.preventDefault){e.preventDefault();}this.fireEvent("click",this,e);},onMouseOver:function(e){if(this.submenu&&this.pos=='left'){this.el.select('ul.dropdown-menu',true).first().setLeft(this.el.select('ul.dropdown-menu',true).first().getWidth()*-1);
 }this.fireEvent("mouseover",this,e);},onMouseOut:function(e){this.fireEvent("mouseout",this,e);}});
 // Roo/bootstrap/menu/Separator.js
-Roo.bootstrap.menu=Roo.bootstrap.menu||{};Roo.bootstrap.menu.Separator=function(A){Roo.bootstrap.menu.Separator.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.menu.Separator,Roo.bootstrap.Component,{getAutoCreate:function(){var A={tag:'li',cls:'divider'}
+Roo.bootstrap.menu=Roo.bootstrap.menu||{};Roo.bootstrap.menu.Separator=function(A){Roo.bootstrap.menu.Separator.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.menu.Separator,Roo.bootstrap.Component,{getAutoCreate:function(){var A={tag:'li',cls:'dropdown-divider divider'}
 ;return A;}});
 // Roo/bootstrap/Tooltip.js
 Roo.bootstrap.Tooltip=function(A){Roo.bootstrap.Tooltip.superclass.constructor.call(this,A);this.alignment=Roo.bootstrap.Tooltip.alignment;if(typeof(A)!='undefined'&&typeof(A.alignment)!='undefined'){this.alignment=A.alignment;}};Roo.apply(Roo.bootstrap.Tooltip,{currentEl:false,currentTip:false,currentRegion:false,init:function(){Roo.get(document).on('mouseover',this.enter,this);
 Roo.get(document).on('mouseout',this.leave,this);this.currentTip=new Roo.bootstrap.Tooltip();},enter:function(ev){var A=ev.getTarget();var el=Roo.fly(A);if(this.currentEl){if(this.currentEl==el){return;}if(A!=this.currentEl.dom&&this.currentEl.contains(A)){return;
-}}if(this.currentTip.el){this.currentTip.el.setVisibilityMode(Roo.Element.DISPLAY).hide();}if(!el||el.dom==document){return;}var B=el;if(!el.attr('tooltip')){if(!el.select("[tooltip]").elements.length){return;}B=el.select("[tooltip]").first();var xy=ev.getXY();
-if(!B.getRegion().contains({top:xy[1],right:xy[0],bottom:xy[1],left:xy[0]})){return;}}this.currentEl=B;this.currentTip.bind(B);this.currentRegion=Roo.lib.Region.getRegion(A);this.currentTip.enter();},leave:function(ev){var A=ev.getTarget();if(!this.currentEl){return;
-}if(A!=this.currentEl.dom){return;}var xy=ev.getXY();if(this.currentRegion.contains(new Roo.lib.Region(xy[1],xy[0],xy[1],xy[0]))){return;}if(this.currentTip){this.currentTip.leave();}this.currentEl=false;},alignment:{'left':['r-l',[-2,0],'right'],'right':['l-r',[2,0],'left'],'bottom':['t-b',[0,2],'top'],'top':['b-t',[0,-2],'bottom']}
+}}if(this.currentTip.el){this.currentTip.el.setVisibilityMode(Roo.Element.DISPLAY).hide();}if(!el||el.dom==document){return;}var B=el;var C=false;if(!el.attr('tooltip')){C=el.findParent("[tooltip]");if(C){B=Roo.get(C);}}if(!C&&!el.attr('tooltip')){if(!el.select("[tooltip]").elements.length){return;
+}B=el.select("[tooltip]").first();var xy=ev.getXY();if(!B.getRegion().contains({top:xy[1],right:xy[0],bottom:xy[1],left:xy[0]})){return;}}this.currentEl=el;this.currentTip.bind(B);this.currentRegion=Roo.lib.Region.getRegion(A);this.currentTip.enter();},leave:function(ev){var A=ev.getTarget();
+if(!this.currentEl){return;}if(A!=this.currentEl.dom){return;}var xy=ev.getXY();if(this.currentRegion.contains(new Roo.lib.Region(xy[1],xy[0],xy[1],xy[0]))){return;}if(this.currentTip){this.currentTip.leave();}this.currentEl=false;},alignment:{'left':['r-l',[-2,0],'right'],'right':['l-r',[2,0],'left'],'bottom':['t-b',[0,2],'top'],'top':['b-t',[0,-2],'bottom']}
 });Roo.extend(Roo.bootstrap.Tooltip,Roo.bootstrap.Component,{bindEl:false,delay:null,timeout:null,hoverState:null,placement:'bottom',alignment:false,getAutoCreate:function(){var A={cls:'tooltip',role:'tooltip',cn:[{cls:'tooltip-arrow arrow'},{cls:'tooltip-inner'}
 ]};return A;},bind:function(el){this.bindEl=el;},initEvents:function(){this.arrowEl=this.el.select('.arrow',true).first();this.innerEl=this.el.select('.tooltip-inner',true).first();},enter:function(){if(this.timeout!=null){clearTimeout(this.timeout);}this.hoverState='in';
 if(!this.delay||!this.delay.show){this.show();return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='in'){_t.show();}},this.delay.show);},leave:function(){clearTimeout(this.timeout);this.hoverState='out';if(!this.delay||!this.delay.hide){this.hide();
@@ -1223,7 +1238,8 @@ return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='out'){
 this.el.select('.tooltip-inner',true).first().dom.innerHTML=B;this.el.removeClass(['fade','top','bottom','left','right','in','bs-tooltip-top','bs-tooltip-bottom','bs-tooltip-left','bs-tooltip-right']);var C=typeof this.placement=='function'?this.placement.call(this,this.el,on_el):this.placement;
 var D=/\s?auto?\s?/i;var E=D.test(C);if(E){C=C.replace(D,'')||'top';}this.el.show();var p=this.getPosition();var F=this.el.getBox();if(E){}var G=this.alignment[C];var xy=this.el.getAlignToXY(this.bindEl,G[0],G[1]);if(C=='top'||C=='bottom'){if(xy[0]<0){C='right';
 }if(xy[0]+this.el.getWidth()>Roo.lib.Dom.getViewWidth()){C='left';}var H=Roo.select('body',true).first().getScroll();if(xy[1]>Roo.lib.Dom.getViewHeight()+H.top-this.el.getHeight()){C='top';}G=this.alignment[C];this.arrowEl.setLeft((this.innerEl.getWidth()/2)-5);
-}this.el.alignTo(this.bindEl,G[0],G[1]);this.el.addClass(C);this.el.addClass("bs-tooltip-"+C);this.el.addClass('in fade show');this.hoverState=null;if(this.el.hasClass('fade')){}},hide:function(){if(!this.el){return;}this.el.removeClass(['show','in']);}});
+}var I=document.getElementsByTagName('div');var J=Number.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1);for(var i=0;i<I.length;i++){var K=Number.parseInt(document.defaultView.getComputedStyle(I[i],null).getPropertyValue("z-index"),10);if(K>J){J=K;}}this.el.dom.style.zIndex=J;
+this.el.alignTo(this.bindEl,G[0],G[1]);this.el.addClass(C);this.el.addClass("bs-tooltip-"+C);this.el.addClass('in fade show');this.hoverState=null;if(this.el.hasClass('fade')){}},hide:function(){if(!this.el){return;}this.el.removeClass(['show','in']);}});
 
 // Roo/bootstrap/LocationPicker.js
 Roo.bootstrap.LocationPicker=function(A){Roo.bootstrap.LocationPicker.superclass.constructor.call(this,A);this.addEvents({initial:true,positionchanged:true,resize:true,show:true,hide:true,mapClick:true,mapRightClick:true,markerClick:true,markerRightClick:true,OverlayViewDraw:true,OverlayViewOnAdd:true,OverlayViewOnRemove:true,OverlayViewShow:true,OverlayViewHide:true,loadexception:true}
@@ -1247,11 +1263,11 @@ this.gMapContext.map.setCenter(this.gMapContext.marker.position);this.fireEvent(
 B.addressLine2="";return B;},setZoomLevel:function(A){this.gMapContext.map.setZoom(A);},show:function(){if(!this.el){return;}this.el.show();this.resize();this.fireEvent('show',this);},hide:function(){if(!this.el){return;}this.el.hide();this.fireEvent('hide',this);
 }});Roo.apply(Roo.bootstrap.LocationPicker,{OverlayView:function(A,B){B=B||{};this.setMap(A);}});
 // Roo/bootstrap/Alert.js
-Roo.bootstrap.Alert=function(A){Roo.bootstrap.Alert.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Alert,Roo.bootstrap.Component,{title:'',html:'',weight:false,faicon:false,getAutoCreate:function(){var A={tag:'div',cls:'alert',cn:[{tag:'i',cls:'roo-alert-icon'}
-,{tag:'b',cls:'roo-alert-title',html:this.title},{tag:'span',cls:'roo-alert-text',html:this.html}]};if(this.faicon){A.cn[0].cls+=' fa '+this.faicon;}if(this.weight){A.cls+=' alert-'+this.weight;}return A;},initEvents:function(){this.el.setVisibilityMode(Roo.Element.DISPLAY);
-},setTitle:function(A){this.el.select('.roo-alert-title',true).first().dom.innerHTML=A;},setText:function(A){this.el.select('.roo-alert-text',true).first().dom.innerHTML=A;},setWeight:function(A){if(this.weight){this.el.select('.alert',true).first().removeClass('alert-'+this.weight);
-}this.weight=A;this.el.select('.alert',true).first().addClass('alert-'+this.weight);},setIcon:function(A){if(this.faicon){this.el.select('.roo-alert-icon',true).first().removeClass(['fa','fa-'+this.faicon]);}this.faicon=A;this.el.select('.roo-alert-icon',true).first().addClass(['fa','fa-'+this.faicon]);
-},hide:function(){this.el.hide();},show:function(){this.el.show();}});
+Roo.bootstrap.Alert=function(A){Roo.bootstrap.Alert.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Alert,Roo.bootstrap.Component,{title:'',html:'',weight:false,fa:false,faicon:false,close:false,getAutoCreate:function(){var A={tag:'div',cls:'alert',cn:[{tag:'button',type:"button",cls:"close",html:'×',style:this.close?'':'display:none'}
+,{tag:'i',cls:'roo-alert-icon'},{tag:'b',cls:'roo-alert-title',html:this.title},{tag:'span',cls:'roo-alert-text',html:this.html}]};if(this.faicon){A.cn[0].cls+=' fa '+this.faicon;}if(this.fa){A.cn[0].cls+=' fa '+this.fa;}if(this.weight){A.cls+=' alert-'+this.weight;
+}return A;},initEvents:function(){this.el.setVisibilityMode(Roo.Element.DISPLAY);this.titleEl=this.el.select('.roo-alert-title',true).first();this.iconEl=this.el.select('.roo-alert-icon',true).first();this.htmlEl=this.el.select('.roo-alert-text',true).first();
+if(this.seconds>0){this.hide.defer(this.seconds,this);}},setTitle:function(A){this.titleEl.dom.innerHTML=A;},setHtml:function(A){this.htmlEl.dom.innerHTML=A;},setWeight:function(A){if(this.weight){this.el.removeClass('alert-'+this.weight);}this.weight=A;this.el.addClass('alert-'+this.weight);
+},setIcon:function(A){if(this.faicon){this.alertEl.removeClass(['fa','fa-'+this.faicon]);}this.faicon=A;this.alertEl.addClass(['fa','fa-'+this.faicon]);},hide:function(){this.el.hide();},show:function(){this.el.show();}});
 // Roo/bootstrap/UploadCropbox.js
 Roo.bootstrap.UploadCropbox=function(A){Roo.bootstrap.UploadCropbox.superclass.constructor.call(this,A);this.addEvents({"beforeselectfile":true,"initial":true,"crop":true,"prepare":true,"exception":true,"beforeloadcanvas":true,"trash":true,"download":true,"footerbuttonclick":true,"resize":true,"rotate":true,"inspect":true,"upload":true,"arrange":true}
 );this.buttons=this.buttons||Roo.bootstrap.UploadCropbox.footer.STANDARD;};Roo.extend(Roo.bootstrap.UploadCropbox,Roo.bootstrap.Component,{emptyText:'Click to upload image',rotateNotify:'Image is too small to rotate',errorTimeout:3000,scale:0,baseScale:1,rotate:0,dragable:false,pinching:false,mouseX:0,mouseY:0,cropData:false,minWidth:300,minHeight:300,file:false,exif:{}
@@ -1707,9 +1723,9 @@ Roo.bootstrap.panel.Content=function(A){this.tpl=A.tpl||false;var el=A.el;var B=
 }else{var C={tag:"div",cls:(A.cls||'')+(A.background?' bg-'+A.background:'')+" roo-layout-inactive-content",id:A.id||el};if(A.iframe){C.cn=[{tag:'iframe',style:'border: 0px',src:'about:blank'}];}if(A.html){C.html=A.html;}this.el=Roo.DomHelper.append(document.body,C,true);
 if(A.iframe){this.iframeEl=this.el.select('iframe',true).first();}}}this.closable=false;this.loaded=false;this.active=false;if(A.toolbar&&!A.toolbar.el&&A.toolbar.xtype){this.toolbar=new A.toolbar.xns[A.toolbar.xtype](A.toolbar);this.wrapEl=this.el;var ti=[];
 if(A.toolbar.items){ti=A.toolbar.items;delete A.toolbar.items;}var D=[];this.toolbar.render(this.wrapEl,'before');for(var i=0;i<ti.length;i++){D.push(this.toolbar.addxtype(Roo.apply({},ti[i])));}this.toolbar.items=D;this.toolbar.el.insertBefore(this.wrapEl.dom.firstChild);
-delete A.toolbar;}if(typeof A=="string"){this.title=A;}else{Roo.apply(this,A);}if(this.resizeEl){this.resizeEl=Roo.get(this.resizeEl,true);}else{this.resizeEl=this.el;}this.addEvents({"activate":true,"deactivate":true,"resize":true,"render":true});if(this.autoScroll&&!this.iframe){this.resizeEl.setStyle("overflow","auto");
-}else{}B=B||this.content;if(B){this.setContent(B);}if(A&&A.url){this.setUrl(this.url,this.params,this.loadOnce);}Roo.bootstrap.panel.Content.superclass.constructor.call(this);if(this.view&&typeof(this.view.xtype)!='undefined'){this.view.el=this.el.appendChild(document.createElement("div"));
-this.view=Roo.factory(this.view);this.view.render&&this.view.render(false,'');}this.fireEvent('render',this);};Roo.extend(Roo.bootstrap.panel.Content,Roo.bootstrap.Component,{cls:'',background:'',tabTip:'',iframe:false,iframeEl:false,setRegion:function(A){this.region=A;
+delete A.toolbar;}if(typeof A=="string"){this.title=A;}else{Roo.apply(this,A);}if(this.resizeEl){this.resizeEl=Roo.get(this.resizeEl,true);}else{this.resizeEl=this.el;}this.addEvents({"activate":true,"deactivate":true,"resize":true,"render":true,"scroll":true}
+);if(this.autoScroll&&!this.iframe){this.resizeEl.setStyle("overflow","auto");this.resizeEl.on('scroll',this.onScroll,this);}else{}B=B||this.content;if(B){this.setContent(B);}if(A&&A.url){this.setUrl(this.url,this.params,this.loadOnce);}Roo.bootstrap.panel.Content.superclass.constructor.call(this);
+if(this.view&&typeof(this.view.xtype)!='undefined'){this.view.el=this.el.appendChild(document.createElement("div"));this.view=Roo.factory(this.view);this.view.render&&this.view.render(false,'');}this.fireEvent('render',this);};Roo.extend(Roo.bootstrap.panel.Content,Roo.bootstrap.Component,{cls:'',background:'',tabTip:'',iframe:false,iframeEl:false,resizeEl:false,setRegion:function(A){this.region=A;
 this.setActiveClass(A&&!this.background);},setActiveClass:function(A){if(A){this.el.replaceClass("roo-layout-inactive-content","roo-layout-active-content");this.el.setStyle('position','relative');}else{this.el.replaceClass("roo-layout-active-content","roo-layout-inactive-content");
 this.el.setStyle('position','absolute');}},getToolbar:function(){return this.toolbar;},setActiveState:function(A){this.active=A;this.setActiveClass(A);if(!A){if(this.fireEvent("deactivate",this)===false){return false;}return true;}this.fireEvent("activate",this);
 return true;},setContent:function(A,B){if(this.iframe){return;}this.el.update(A,B);},ignoreResize:function(w,h){if(this.lastSize&&this.lastSize.width==w&&this.lastSize.height==h){return true;}else{this.lastSize={width:w,height:h};return false;}},getUpdateManager:function(){if(this.iframe){return false;
@@ -1721,7 +1737,7 @@ te.setWidth(A);B-=te.getHeight();}if(this.footer){var te=this.footer.getEl();te.
 }var t='';for(var k in this.title){if(!this.title.hasOwnProperty(k)){continue;}if(k.indexOf('-')>=0){var s=k.split('-');for(var i=0;i<s.length;i++){t+="<span class='visible-"+s[i]+"'>"+this.title[k]+"</span>";}}else{t+="<span class='visible-"+k+"'>"+this.title[k]+"</span>";
 }}return t;},setTitle:function(A){this.title=A;if(this.region){this.region.updatePanelTitle(this,A);}},isClosable:function(){return this.closable;},beforeSlide:function(){this.el.clip();this.resizeEl.clip();},afterSlide:function(){this.el.unclip();this.resizeEl.unclip();
 },refresh:function(){if(this.refreshDelegate){this.loaded=false;this.refreshDelegate();}},destroy:function(){this.el.removeAllListeners();var A=document.createElement("span");A.appendChild(this.el.dom);A.innerHTML="";this.el.remove();this.el=null;},form:false,view:false,getChildContainer:function(){return this.getEl();
-}});
+},onScroll:function(e){this.fireEvent('scroll',this,e);}});
 // Roo/bootstrap/panel/Grid.js
 Roo.bootstrap.panel.Grid=function(A){this.wrapper=Roo.DomHelper.append(document.body,{tag:"div",cls:"roo-layout-grid-wrapper roo-layout-inactive-content"},true);A.el=this.wrapper;if(A.container){this.wrapper.setStyle("overflow","hidden");this.wrapper.addClass('roo-grid-container');
 }if(A.toolbar){var B=this.wrapper.createChild();this.toolbar=Roo.factory(A.toolbar);var ti=[];if(A.toolbar.items){ti=A.toolbar.items;delete A.toolbar.items;}var C=[];this.toolbar.render(B);for(var i=0;i<ti.length;i++){C.push(this.toolbar.addxtype(Roo.apply({}