docs/default.css
[roojs1] / roojs-bootstrap.js
index b7a60a9..ab3647e 100644 (file)
@@ -16,8 +16,8 @@ return cn;}var H=A.items;delete A.items;if(!skip_children){for(var i=0;i<H.lengt
 Roo.bootstrap.Body=function(A){Roo.bootstrap.Body.superclass.constructor.call(this,A);this.el=Roo.get(document.body);if(this.cls&&this.cls.length){Roo.get(document.body).addClass(this.cls);}};Roo.extend(Roo.bootstrap.Body,Roo.bootstrap.Component,{autoCreate:{cls:'container'}
 ,onRender:function(ct,A){}});
 // Roo/bootstrap/ButtonGroup.js
-Roo.bootstrap.ButtonGroup=function(A){Roo.bootstrap.ButtonGroup.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.ButtonGroup,Roo.bootstrap.Component,{size:'',align:'',direction:'',toolbar:false,btn:true,getAutoCreate:function(){var A={cls:'btn-group',html:null};
-A.html=this.html||A.html;if(this.toolbar){A={cls:'btn-toolbar',html:null};return A;}if(['vertical','justified'].indexOf(this.align)!==-1){A.cls='btn-group-'+this.align;if(this.align=='justified'){console.log(this.items);}}if(['lg','sm','xs'].indexOf(this.size)!==-1){A.cls+=' btn-group-'+this.size;
+Roo.bootstrap.ButtonGroup=function(A){Roo.bootstrap.ButtonGroup.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.ButtonGroup,Roo.bootstrap.Component,{size:'',align:'',direction:'',toolbar:false,btn:true,getAutoCreate:function(){var A={cls:'btn-group',html:null}
+;A.html=this.html||A.html;if(this.toolbar){A={cls:'btn-toolbar',html:null};return A;}if(['vertical','justified'].indexOf(this.align)!==-1){A.cls='btn-group-'+this.align;if(this.align=='justified'){console.log(this.items);}}if(['lg','sm','xs'].indexOf(this.size)!==-1){A.cls+=' btn-group-'+this.size;
 }if(this.direction=='up'){A.cls+=' dropup';}return A;}});
 // Roo/bootstrap/Button.js
 Roo.bootstrap.Button=function(A){Roo.bootstrap.Button.superclass.constructor.call(this,A);this.addEvents({"click":true,"toggle":true});};Roo.extend(Roo.bootstrap.Button,Roo.bootstrap.Component,{html:false,active:false,weight:'',size:'',tag:'button',href:'',disabled:false,isClose:false,glyphicon:'',badge:'',theme:'default',inverse:false,toggle:false,ontext:'ON',offtext:'OFF',defaulton:true,preventDefault:true,removeClass:false,name:false,target:false,pressed:null,getAutoCreate:function(){var A={tag:'button',cls:'roo-button',html:''}
@@ -53,9 +53,9 @@ this.el.select('.panel-body',true).first().addClass('hide');var A=this.toggleEl(
 if(!t){return;}t.dom.innerHTML=v;}});
 // 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:'',href:false,target:false,xsUrl:'',smUrl:'',mdUrl:'',lgUrl:'',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 _this=this;Roo.each(['xs','sm','md','lg'],function(B){if(!_this[B+'Url']){return;}var C={tag:'img',cls:(_this.imgResponsive)?'img-responsive':'',html:_this.html||A.html,src:_this[B+'Url']};C.cls+=' roo-image-responsive-'+B;
-var s=['xs','sm','md','lg'];s.splice(s.indexOf(B),1);Roo.each(s,function(ss){C.cls+=' hidden-'+ss;});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:[C]};
-if(this.target){a.target=_this.target;}}A.cn.push((_this.href)?a:C);});return A;},createSingleImg:function(){var A={tag:'img',cls:(this.imgResponsive)?'img-responsive':'',html:null};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;
+}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};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);}});
 // Roo/bootstrap/Link.js
@@ -149,8 +149,8 @@ if(ns>os){ft.removeClass('slideDown');ft.addClass('slideUp');return;}ft.removeCl
 Roo.bootstrap.NavSidebar=function(A){Roo.bootstrap.NavSidebar.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.NavSidebar,Roo.bootstrap.Navbar,{sidebar:true,getAutoCreate:function(){return {tag:'div',cls:'sidebar sidebar-nav'};}});
 // Roo/bootstrap/NavGroup.js
 Roo.bootstrap.NavGroup=function(A){Roo.bootstrap.NavGroup.superclass.constructor.call(this,A);this.navItems=[];Roo.bootstrap.NavGroup.register(this);this.addEvents({'changed':true});};Roo.extend(Roo.bootstrap.NavGroup,Roo.bootstrap.Component,{align:'',inverse:false,form:false,type:'nav',navId:'',navItems:false,getAutoCreate:function(){var A=Roo.apply({}
-,Roo.bootstrap.NavGroup.superclass.getAutoCreate.call(this));A={tag:'ul',cls:'nav'};if(['tabs','pills'].indexOf(this.type)!==-1){A.cls+=' nav-'+this.type}else{if(this.type!=='nav'){Roo.log('nav type must be nav/tabs/pills')}A.cls+=' navbar-nav'}if(this.parent().sidebar){A={tag:'ul',cls:'dashboard-menu sidebar-menu'};
-return A;}if(this.form===true){A={tag:'form',cls:'navbar-form'};if(this.align==='right'){A.cls+=' navbar-right';}else{A.cls+=' navbar-left';}}if(this.align==='right'){A.cls+=' navbar-right';}if(this.inverse){A.cls+=' navbar-inverse';}return A;},setActiveItem:function(A){var B=false;
+,Roo.bootstrap.NavGroup.superclass.getAutoCreate.call(this));A={tag:'ul',cls:'nav'};if(['tabs','pills'].indexOf(this.type)!==-1){A.cls+=' nav-'+this.type}else{if(this.type!=='nav'){Roo.log('nav type must be nav/tabs/pills')}A.cls+=' navbar-nav'}if(this.parent().sidebar){A={tag:'ul',cls:'dashboard-menu sidebar-menu'}
+;return A;}if(this.form===true){A={tag:'form',cls:'navbar-form'};if(this.align==='right'){A.cls+=' navbar-right';}else{A.cls+=' navbar-left';}}if(this.align==='right'){A.cls+=' navbar-right';}if(this.inverse){A.cls+=' navbar-inverse';}return A;},setActiveItem:function(A){var B=false;
 Roo.each(this.navItems,function(v){if(v==A){return;}if(v.isActive()){v.setActive(false,true);B=v;}});A.setActive(true,true);this.fireEvent('changed',this,A,B);},getActive:function(){var A=false;Roo.each(this.navItems,function(v){if(v.isActive()){A=v;}});return A;
 },indexOfNav:function(){var A=false;Roo.each(this.navItems,function(v,i){if(v.isActive()){A=i;}});return A;},addItem:function(A){var cn=new Roo.bootstrap.NavItem(A);this.register(cn);cn.parentId=this.id;cn.onRender(this.el,null);return cn;},register:function(A){this.navItems.push(A);
 A.navId=this.navId;},clearAll:function(){this.navItems=[];this.el.dom.innerHTML='';},getNavItem:function(A){var B=false;Roo.each(this.navItems,function(e){if(e.tabId==A){B=e;return false;}return true;});return B;},setActiveNext:function(){var i=this.indexOfNav(this.getActive());
@@ -158,8 +158,8 @@ if(i>this.navItems.length){return;}this.setActiveItem(this.navItems[i+1]);},setA
 return false;}return true;});},getWasActive:function(){var r=false;Roo.each(this.navItems,function(e){if(e.was_active){r=e;return false;}return true;});return r;}});Roo.apply(Roo.bootstrap.NavGroup,{groups:{},register:function(A){this.groups[A.navId]=A;},get:function(A){if(typeof(this.groups[A])=='undefined'){return false;
 }return this.groups[A];}});
 // 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,glyphicon:false,active:false,preventDefault:false,tabId:false,tagtype:'a',disabled:false,animateRef:false,was_active:false,getAutoCreate:function(){var A={tag:'li',cls:'nav-item'};
-if(this.active){A.cls=typeof(A.cls)=='undefined'?'active':A.cls+' active';}if(this.disabled){A.cls+=' disabled';}if(this.href||this.html||this.glyphicon||this.icon){A.cn=[{tag:this.tagtype,href:this.href||"#",html:this.html||''}];if(this.icon){A.cn[0].html='<i class="'+this.icon+'"></i> <span>'+A.cn[0].html+'</span>'}
+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,glyphicon:false,active:false,preventDefault:false,tabId:false,tagtype:'a',disabled:false,animateRef:false,was_active:false,getAutoCreate:function(){var A={tag:'li',cls:'nav-item'}
+;if(this.active){A.cls=typeof(A.cls)=='undefined'?'active':A.cls+' active';}if(this.disabled){A.cls+=' disabled';}if(this.href||this.html||this.glyphicon||this.icon){A.cn=[{tag:this.tagtype,href:this.href||"#",html:this.html||''}];if(this.icon){A.cn[0].html='<i class="'+this.icon+'"></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">'+this.badge+'</span>';}}return A;
 },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.select('a',true).on('click',this.onClick,this);if(this.tagtype=='span'){this.el.select('span',true).on('click',this.onClick,this);
 }this.parent().register(this);},onClick:function(e){if(this.preventDefault||this.href=='#'){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;}
@@ -168,8 +168,8 @@ e.preventDefault();this.scrollToElement(e);}var p=this.parent();if(['tabs','pill
 }},isActive:function(){return this.active},setActive:function(A,B,C){if(this.active&&!A&&this.navId){this.was_active=true;var nv=Roo.bootstrap.NavGroup.get(this.navId);if(nv){nv.clearWasActive(this);}}this.active=A;if(!A){this.el.removeClass('active');}else if(!this.el.hasClass('active')){this.el.addClass('active');
 }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.select(''+this.tagtype+'',true).first();
-},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;}});
+},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;}});
 // 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',getAutoCreate:function(){var a={tag:'a',href:this.href||'#',cls:'',html:'',cn:[]}
 ;var A={tag:'li',cls:'',cn:[a]};var B={tag:'span',html:this.html||''};if(this.active){A.cls+=' active';}if(this.disabled){A.cls+=' disabled';}if(this.glyphicon||this.icon){var c=this.glyphicon?('glyphicon glyphicon-'+this.glyphicon):this.icon;a.cn.push({tag:'i',cls:c}
@@ -180,8 +180,8 @@ if(A){this.el.addClass('active');return;}this.el.removeClass('active');return;},
 // Roo/bootstrap/Row.js
 Roo.bootstrap.Row=function(A){Roo.bootstrap.Row.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Row,Roo.bootstrap.Component,{getAutoCreate:function(){return {cls:'row clearfix'};}});
 // 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,cls:this.cls,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;
+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,cls:this.cls,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/Pagination.js
 Roo.bootstrap.Pagination=function(A){Roo.bootstrap.Pagination.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Pagination,Roo.bootstrap.Component,{cls:false,size:false,inverse:false,getAutoCreate:function(){var A={tag:'ul',cls:'pagination'};if(this.inverse){A.cls+=' inverse';
@@ -251,8 +251,8 @@ var D=this;if(C.cellObjects.length){Roo.each(C.cellObjects,function(r){D.renderC
 }if(typeof(E.hidden)!='undefined'&&E.hidden){td.style+=' display:none;';}if(typeof(E.align)!='undefined'&&E.align.length){td.style+=' text-align:'+E.align+';';}if(typeof(E.width)!='undefined'){td.style+=' width:'+E.width+'px;';}if(typeof(E.cursor)!='undefined'){td.style+=' cursor:'+E.cursor+';';
 }if(typeof(E.cls)!='undefined'){td.cls=(typeof(td.cls)=='undefined')?E.cls:(td.cls+' '+E.cls);}['xs','sm','md','lg'].map(function(I){if(typeof(E[I])=='undefined'){return;}if(!E[I]){td.cls+=' hidden-'+I;return;}td.cls+=' col-'+I+'-'+E[I];});B.cn.push(td);}
 B.cellObjects=C;return B;},onBeforeLoad:function(){},clear:function(){this.el.select('tbody',true).first().dom.innerHTML='';},setRowVisibility:function(A,B){var bt=this.mainBody.dom;var C=this.el.select('tbody > tr',true).elements;if(typeof(C[A])=='undefined'){return;
-}C[A].dom.style.display=B?'':'none';},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.bootstrap.Table.RowSelectionModel();}return this.selModel;},renderCellObject:function(r){var A=this;var t=r.cfg.render(r.container);if(r.cfg.cn){Roo.each(r.cfg.cn,function(c){var B={container:t.getChildContainer(),cfg:c};
-A.renderCellObject(B);})}},getRowIndex:function(A){var B=-1;Roo.each(this.el.select('tbody > tr',true).elements,function(el,C){if(el!=A){return;}B=C;});return B;}});
+}C[A].dom.style.display=B?'':'none';},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.bootstrap.Table.RowSelectionModel();}return this.selModel;},renderCellObject:function(r){var A=this;var t=r.cfg.render(r.container);if(r.cfg.cn){Roo.each(r.cfg.cn,function(c){var B={container:t.getChildContainer(),cfg:c}
+;A.renderCellObject(B);})}},getRowIndex:function(A){var B=-1;Roo.each(this.el.select('tbody > tr',true).elements,function(el,C){if(el!=A){return;}B=C;});return B;}});
 // 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}
@@ -285,8 +285,8 @@ this.reader=this.form.reader;};Roo.extend(Roo.form.Action.Load,Roo.form.Action,{
 if(B===true||!B.success||!B.data){this.failureType=Roo.form.Action.LOAD_FAILURE;this.form.afterAction(this,false);return;}this.form.clearInvalid();this.form.setValues(B.data);this.form.afterAction(this,true);},handleResponse:function(A){if(this.form.reader){var rs=this.form.reader.read(A);
 var B=rs.records&&rs.records[0]?rs.records[0].data:null;return {success:rs.success,data:B};}return Roo.decode(A.responseText);}});Roo.form.Action.ACTION_TYPES={'load':Roo.form.Action.Load,'submit':Roo.form.Action.Submit};
 // Roo/bootstrap/Form.js
-Roo.bootstrap.Form=function(A){Roo.bootstrap.Form.superclass.constructor.call(this,A);this.addEvents({clientvalidation:true,beforeaction:true,actionfailed:true,actioncomplete:true});};Roo.extend(Roo.bootstrap.Form,Roo.bootstrap.Component,{method:'POST',timeout:30,align:'left',activeAction:null,waitMsgTarget:false,loadMask:true,getAutoCreate:function(){var A={tag:'form',method:this.method||'POST',id:this.id||Roo.id(),cls:''};
-if(this.parent().xtype.match(/^Nav/)){A.cls='navbar-form navbar-'+this.align;}if(this.labelAlign=='left'){A.cls+=' form-horizontal';}return A;},initEvents:function(){this.el.on('submit',this.onSubmit,this);this.el.on('keypress',function(e){if(e.getCharCode()!=13){return true;
+Roo.bootstrap.Form=function(A){Roo.bootstrap.Form.superclass.constructor.call(this,A);this.addEvents({clientvalidation:true,beforeaction:true,actionfailed:true,actioncomplete:true});};Roo.extend(Roo.bootstrap.Form,Roo.bootstrap.Component,{method:'POST',timeout:30,align:'left',activeAction:null,waitMsgTarget:false,loadMask:true,getAutoCreate:function(){var A={tag:'form',method:this.method||'POST',id:this.id||Roo.id(),cls:''}
+;if(this.parent().xtype.match(/^Nav/)){A.cls='navbar-form navbar-'+this.align;}if(this.labelAlign=='left'){A.cls+=' form-horizontal';}return A;},initEvents:function(){this.el.on('submit',this.onSubmit,this);this.el.on('keypress',function(e){if(e.getCharCode()!=13){return true;
 }if(e.getTarget().nodeName.toLowerCase()==='textarea'){return true;}Roo.log("keypress blocked");e.preventDefault();return false;});},onSubmit:function(e){e.stopEvent();},isValid:function(){var A=this.getItems();var B=true;A.each(function(f){if(!f.validate()){B=false;
 }});return B;},isDirty:function(){var A=false;var B=this.getItems();B.each(function(f){if(f.isDirty()){A=true;return false;}return true;});return A;},doAction:function(A,B){if(typeof A=='string'){A=new Roo.form.Action.ACTION_TYPES[A](this,B);}if(this.fireEvent('beforeaction',this,A)!==false){this.beforeAction(A);
 A.run.defer(100,A);}return this;},beforeAction:function(A){var o=A.options;if(this.loadMask){this.el.mask(o.waitMsg||"Sending",'x-mask-loading');}},afterAction:function(A,B){this.activeAction=null;var o=A.options;this.el.unmask();if(B){if(o.reset){this.reset();
@@ -449,9 +449,9 @@ this.tickItems=[];this.selectedIndex=-1;if(this.mode=='local'){if(A.queryDelay==
 if(Roo.isTouch&&this.mobileTouchView){A=this.getAutoCreateTouchView();return A;;}if(!this.tickable){A=Roo.bootstrap.ComboBox.superclass.getAutoCreate.call(this);return A;}var B=this.labelAlign||this.parentLabelAlign();A={cls:'form-group roo-combobox-tickable'}
 ;var C={tag:'div',cls:'tickable-buttons',cn:[{tag:'button',type:'button',cls:'btn btn-link btn-edit pull-'+this.btnPosition,html:this.triggerText},{tag:'button',type:'button',name:'ok',cls:'btn btn-link btn-ok pull-'+this.btnPosition,html:'Done'},{tag:'button',type:'button',name:'cancel',cls:'btn btn-link btn-cancel pull-'+this.btnPosition,html:'Cancel'}
 ]};if(this.editable){C.cn.unshift({tag:'input',cls:'select2-search-field-input'});}var D=this;Roo.each(C.cn,function(c){if(D.size){c.cls+=' btn-'+D.size;}if(D.disabled){c.disabled=true;}});var E={tag:'div',cn:[{tag:'input',type:'hidden',cls:'form-hidden-field'}
-,{tag:'ul',cls:'select2-choices',cn:[{tag:'li',cls:'select2-search-field',cn:[C]}]}]};var combobox={cls:'select2-container input-group select2-container-multi',cn:[E]};if(this.hasFeedback&&!this.allowBlank){var F={tag:'span',cls:'glyphicon form-control-feedback'}
-;combobox.cn.push(F);}if(B==='left'&&this.fieldLabel.length){Roo.log("left and has label");A.cn=[{tag:'label','for':id,cls:'control-label col-sm-'+this.labelWidth,html:this.fieldLabel},{cls:"col-sm-"+(12-this.labelWidth),cn:[combobox]}];}else if(this.fieldLabel.length){Roo.log(" label");
-A.cn=[{tag:'label',html:this.fieldLabel},combobox];}else{Roo.log(" no label && no align");A=combobox}var G=this;['xs','sm','md','lg'].map(function(H){if(G[H]){A.cls+=' col-'+H+'-'+G[H];}});return A;},_initEventsCalled:false,initEvents:function(){if(this._initEventsCalled){return;
+,{tag:'ul',cls:'select2-choices',cn:[{tag:'li',cls:'select2-search-field',cn:[C]}]}]};var F={cls:'select2-container input-group select2-container-multi',cn:[E]};if(this.hasFeedback&&!this.allowBlank){var G={tag:'span',cls:'glyphicon form-control-feedback'}
+;F.cn.push(G);}if(B==='left'&&this.fieldLabel.length){Roo.log("left and has label");A.cn=[{tag:'label','for':id,cls:'control-label col-sm-'+this.labelWidth,html:this.fieldLabel},{cls:"col-sm-"+(12-this.labelWidth),cn:[F]}];}else if(this.fieldLabel.length){Roo.log(" label");
+A.cn=[{tag:'label',html:this.fieldLabel},F];}else{Roo.log(" no label && no align");A=F}var H=this;['xs','sm','md','lg'].map(function(I){if(H[I]){A.cls+=' col-'+I+'-'+H[I];}});return A;},_initEventsCalled:false,initEvents:function(){if(this._initEventsCalled){return;
 }this._initEventsCalled=true;if(!this.store){throw "can not find store for combo";}this.store=Roo.factory(this.store,Roo.data);if(Roo.XComponent.build_from_html){var e=this.el.dom,k=0;while(e){e=e.previousSibling;++k;}this.el.remove();this.el=false;this.rendered=false;
 this.render(this.parent().getChildContainer(true),k);}if(Roo.isTouch&&this.mobileTouchView){this.initTouchView();return;}if(this.tickable){this.initTickableEvents();return;}Roo.bootstrap.ComboBox.superclass.initEvents.call(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);}var A='x-combo-list';var B=this;(function(){var lw=B.listWidth||Math.max(B.inputEl().getWidth(),B.minListWidth);
@@ -661,7 +661,7 @@ Roo.bootstrap.TabPanel=function(A){Roo.bootstrap.TabPanel.superclass.constructor
 Roo.log(['register',tg,this]);tg.register(this);var i=tg.tabs.length-1;if(this.active&&tg.bullets>0&&i<tg.bullets){tg.setActiveBullet(i);}}},onRender:function(ct,A){Roo.bootstrap.TabPanel.superclass.onRender.call(this,ct,A);},setActive:function(A){Roo.log("panel - set active "+this.tabId+"="+A);
 this.active=A;if(!A){this.el.removeClass('active');}else if(!this.el.hasClass('active')){this.el.addClass('active');}this.fireEvent('changed',this,A);}});
 // Roo/bootstrap/DateField.js
-Roo.bootstrap.DateField=function(A){Roo.bootstrap.DateField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true});};Roo.extend(Roo.bootstrap.DateField,Roo.bootstrap.Input,{format:"m/d/y",altFormats:"m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d",weekStart:0,viewMode:'',minViewMode:'',todayHighlight:false,todayBtn:false,language:'en',keyboardNavigation:true,calendarWeeks:false,startDate:-Infinity,endDate:Infinity,daysOfWeekDisabled:[],_events:[],singleMode:false,UTCDate:function(){return new Date(Date.UTC.apply(Date,arguments));
+Roo.bootstrap.DateField=function(A){Roo.bootstrap.DateField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true,beforeselect:true});};Roo.extend(Roo.bootstrap.DateField,Roo.bootstrap.Input,{format:"m/d/y",altFormats:"m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d",weekStart:0,viewMode:'',minViewMode:'',todayHighlight:false,todayBtn:false,language:'en',keyboardNavigation:true,calendarWeeks:false,startDate:-Infinity,endDate:Infinity,daysOfWeekDisabled:[],_events:[],singleMode:false,UTCDate:function(){return new Date(Date.UTC.apply(Date,arguments));
 },UTCToday:function(){var A=new Date();return this.UTCDate(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate());},getDate:function(){var d=this.getUTCDate();return new Date(d.getTime()+(d.getTimezoneOffset()*60000));},getUTCDate:function(){return this.date;
 },setDate:function(d){this.setUTCDate(new Date(d.getTime()-(d.getTimezoneOffset()*60000)));},setUTCDate:function(d){this.date=d;this.setValue(this.formatDate(this.date));},onRender:function(ct,A){Roo.bootstrap.DateField.superclass.onRender.call(this,ct,A);
 this.language=this.language||'en';this.language=this.language in Roo.bootstrap.DateField.dates?this.language:this.language.split('-')[0];this.language=this.language in Roo.bootstrap.DateField.dates?this.language:"en";this.isRTL=Roo.bootstrap.DateField.dates[this.language].rtl||false;
@@ -674,8 +674,8 @@ v.hide();
 v.attr('colspan',function(i,B){return parseInt(B)+1;});})
 this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(this.startDate);this.setEndDate(this.endDate);this.setDaysOfWeekDisabled(this.daysOfWeekDisabled);this.fillDow();this.fillMonths();
 this.update();this.showMode();if(this.isInline){this.show();}},picker:function(){return this.pickerEl;},fillDow:function(){var A=this.weekStart;var B={tag:'tr',cn:[]};if(this.calendarWeeks){B.cn.push({tag:'th',cls:'cw',html:'&nbsp;'})}while(A<this.weekStart+7){B.cn.push({tag:'th',cls:'dow',html:Roo.bootstrap.DateField.dates[this.language].daysMin[(A++)%7]}
-);}this.picker().select('>.datepicker-days thead',true).first().createChild(B);},fillMonths:function(){var i=0;var A=this.picker().select('>.datepicker-months td',true).first();A.dom.innerHTML='';while(i<12){var B={tag:'span',cls:'month',html:Roo.bootstrap.DateField.dates[this.language].monthsShort[i++]};
-A.createChild(B);}},update:function(){this.date=(typeof(this.date)==='undefined'||((typeof(this.date)==='string')&&!this.date.length))?this.UTCToday():(typeof(this.date)==='string')?this.parseDate(this.date):this.date;if(this.date<this.startDate){this.viewDate=new Date(this.startDate);
+);}this.picker().select('>.datepicker-days thead',true).first().createChild(B);},fillMonths:function(){var i=0;var A=this.picker().select('>.datepicker-months td',true).first();A.dom.innerHTML='';while(i<12){var B={tag:'span',cls:'month',html:Roo.bootstrap.DateField.dates[this.language].monthsShort[i++]}
+;A.createChild(B);}},update:function(){this.date=(typeof(this.date)==='undefined'||((typeof(this.date)==='string')&&!this.date.length))?this.UTCToday():(typeof(this.date)==='string')?this.parseDate(this.date):this.date;if(this.date<this.startDate){this.viewDate=new Date(this.startDate);
 }else if(this.date>this.endDate){this.viewDate=new Date(this.endDate);}else{this.viewDate=new Date(this.date);}this.fill();},fill:function(){var d=new Date(this.viewDate),A=d.getUTCFullYear(),B=d.getUTCMonth(),C=this.startDate!==-Infinity?this.startDate.getUTCFullYear():-Infinity,D=this.startDate!==-Infinity?this.startDate.getUTCMonth():-Infinity,E=this.endDate!==Infinity?this.endDate.getUTCFullYear():Infinity,F=this.endDate!==Infinity?this.endDate.getUTCMonth():Infinity,G=this.date&&this.date.valueOf(),H=this.UTCToday();
 this.picker().select('>.datepicker-days thead th.switch',true).first().dom.innerHTML=Roo.bootstrap.DateField.dates[this.language].months[B]+' '+A;this.updateNavArrows();this.fillMonths();var I=this.UTCDate(A,B-1,28,0,0,0,0),J=I.getDaysInMonth(I.getUTCFullYear(),I.getUTCMonth());
 I.setUTCDate(J);I.setUTCDate(J-(I.getUTCDay()-this.weekStart+7)%7);var K=new Date(I);K.setUTCDate(K.getUTCDate()+42);K=K.valueOf();var L=false;this.picker().select('>.datepicker-days tbody',true).first().dom.innerHTML='';while(I.valueOf()<K){var M='';if(I.getUTCDay()===this.weekStart){if(L){this.picker().select('>.datepicker-days tbody',true).first().createChild(L);
@@ -693,27 +693,27 @@ return;}this.picker().addClass('bottom');this.picker().setTop(this.inputEl().get
 }if(!v&&this.altFormats){if(!this.altFormatsArray){this.altFormatsArray=this.altFormats.split("|");}for(var i=0,B=this.altFormatsArray.length;i<B&&!v;i++){v=Date.parseDate(A,this.altFormatsArray[i]);}}return v;},formatDate:function(A,B){return (!A||!(A instanceof Date))?A:A.dateFormat(B||this.format);
 },onFocus:function(){Roo.bootstrap.DateField.superclass.onFocus.call(this);this.show();},onBlur:function(){Roo.bootstrap.DateField.superclass.onBlur.call(this);var d=this.inputEl().getValue();this.setValue(d);this.hide();},show:function(){this.picker().show();
 this.update();this.place();this.fireEvent('show',this,this.date);},hide:function(){if(this.isInline)return;this.picker().hide();this.viewMode=this.startViewMode;this.showMode();this.fireEvent('hide',this,this.date);},onMousedown:function(e){e.stopPropagation();
-e.preventDefault();},keyup:function(e){Roo.bootstrap.DateField.superclass.keyup.call(this);this.update();},setValue:function(v){var d=new Date(this.parseDate(v)).clearTime();if(isNaN(d.getTime())){this.date=this.viewDate='';Roo.bootstrap.DateField.superclass.setValue.call(this,'');
-return;}v=this.formatDate(d);Roo.bootstrap.DateField.superclass.setValue.call(this,v);this.date=new Date(d.getTime()-d.getTimezoneOffset()*60000);this.update();this.fireEvent('select',this,this.date);},getValue:function(){return this.formatDate(this.date);
-},fireKey:function(e){if(!this.picker().isVisible()){if(e.keyCode==27)this.show();return;}var A=false,B,C,D,E,F;switch(e.keyCode){case 27:this.hide();e.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;B=e.keyCode==37?-1:1;if(e.ctrlKey){E=this.moveYear(this.date,B);
-F=this.moveYear(this.viewDate,B);}else if(e.shiftKey){E=this.moveMonth(this.date,B);F=this.moveMonth(this.viewDate,B);}else{E=new Date(this.date);E.setUTCDate(this.date.getUTCDate()+B);F=new Date(this.viewDate);F.setUTCDate(this.viewDate.getUTCDate()+B);}
-if(this.dateWithinRange(E)){this.date=E;this.viewDate=F;this.setValue(this.formatDate(this.date));e.preventDefault();A=true;}break;case 38:case 40:if(!this.keyboardNavigation)break;B=e.keyCode==38?-1:1;if(e.ctrlKey){E=this.moveYear(this.date,B);F=this.moveYear(this.viewDate,B);
-}else if(e.shiftKey){E=this.moveMonth(this.date,B);F=this.moveMonth(this.viewDate,B);}else{E=new Date(this.date);E.setUTCDate(this.date.getUTCDate()+B*7);F=new Date(this.viewDate);F.setUTCDate(this.viewDate.getUTCDate()+B*7);}if(this.dateWithinRange(E)){this.date=E;
-this.viewDate=F;this.setValue(this.formatDate(this.date));e.preventDefault();A=true;}break;case 13:this.setValue(this.formatDate(this.date));this.hide();e.preventDefault();break;case 9:this.setValue(this.formatDate(this.date));this.hide();break;case 16:case 17:case 18:break;
-default:this.hide();}},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.hide();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.hide();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.getUTCFullYear(),I=this.viewDate.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.hide();}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);});this.update();this.updateNavArrows();},updateNavArrows:function(){if(this.singleMode){return;}var d=new Date(this.viewDate),A=d.getUTCFullYear(),B=d.getUTCMonth();Roo.each(this.picker().select('.prev',true).elements,function(v){v.show();
-switch(this.viewMode){case 0:if(this.startDate!==-Infinity&&A<=this.startDate.getUTCFullYear()&&B<=this.startDate.getUTCMonth()){v.hide();}break;case 1:case 2:if(this.startDate!==-Infinity&&A<=this.startDate.getUTCFullYear()){v.hide();}break;}});Roo.each(this.picker().select('.next',true).elements,function(v){v.show();
-switch(this.viewMode){case 0:if(this.endDate!==Infinity&&A>=this.endDate.getUTCFullYear()&&B>=this.endDate.getUTCMonth()){v.hide();}break;case 1:case 2:if(this.endDate!==Infinity&&A>=this.endDate.getUTCFullYear()){v.hide();}break;}})},moveMonth:function(A,B){if(!B)return A;
-var C=new Date(A.valueOf()),D=C.getUTCDate(),E=C.getUTCMonth(),F=Math.abs(B),G,H;B=B>0?1:-1;if(F==1){H=B==-1?function(){return C.getUTCMonth()==E;}:function(){return C.getUTCMonth()!=G;};G=E+B;C.setUTCMonth(G);if(G<0||G>11)G=(G+12)%12;}else{for(var i=0;i<F;
-i++)C=this.moveMonth(C,B);G=C.getUTCMonth();C.setUTCDate(D);H=function(){return G!=C.getUTCMonth();};}while(H()){C.setUTCDate(--D);C.setUTCMonth(G);}return C;},moveYear:function(A,B){return this.moveMonth(A,B*12);},dateWithinRange:function(A){return A>=this.startDate&&A<=this.endDate;
-},remove:function(){this.picker().remove();}});Roo.apply(Roo.bootstrap.DateField,{head:{tag:'thead',cn:[{tag:'tr',cn:[{tag:'th',cls:'prev',html:'<i class="fa fa-arrow-left"/>'},{tag:'th',cls:'switch',colspan:'5'},{tag:'th',cls:'next',html:'<i class="fa fa-arrow-right"/>'}
-]}]},content:{tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:'7'}]}]},footer:{tag:'tfoot',cn:[{tag:'tr',cn:[{tag:'th',colspan:'7',cls:'today'}]}]},dates:{en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today"}
+e.preventDefault();},keyup:function(e){Roo.bootstrap.DateField.superclass.keyup.call(this);this.update();},setValue:function(v){if(this.fireEvent('beforeselect',this,v)!==false){var d=new Date(this.parseDate(v)).clearTime();if(isNaN(d.getTime())){this.date=this.viewDate='';
+Roo.bootstrap.DateField.superclass.setValue.call(this,'');return;}v=this.formatDate(d);Roo.bootstrap.DateField.superclass.setValue.call(this,v);this.date=new Date(d.getTime()-d.getTimezoneOffset()*60000);this.update();this.fireEvent('select',this,this.date);
+}},getValue:function(){return this.formatDate(this.date);},fireKey:function(e){if(!this.picker().isVisible()){if(e.keyCode==27)this.show();return;}var A=false,B,C,D,E,F;switch(e.keyCode){case 27:this.hide();e.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;
+B=e.keyCode==37?-1:1;if(e.ctrlKey){E=this.moveYear(this.date,B);F=this.moveYear(this.viewDate,B);}else if(e.shiftKey){E=this.moveMonth(this.date,B);F=this.moveMonth(this.viewDate,B);}else{E=new Date(this.date);E.setUTCDate(this.date.getUTCDate()+B);F=new Date(this.viewDate);
+F.setUTCDate(this.viewDate.getUTCDate()+B);}if(this.dateWithinRange(E)){this.date=E;this.viewDate=F;this.setValue(this.formatDate(this.date));e.preventDefault();A=true;}break;case 38:case 40:if(!this.keyboardNavigation)break;B=e.keyCode==38?-1:1;if(e.ctrlKey){E=this.moveYear(this.date,B);
+F=this.moveYear(this.viewDate,B);}else if(e.shiftKey){E=this.moveMonth(this.date,B);F=this.moveMonth(this.viewDate,B);}else{E=new Date(this.date);E.setUTCDate(this.date.getUTCDate()+B*7);F=new Date(this.viewDate);F.setUTCDate(this.viewDate.getUTCDate()+B*7);
+}if(this.dateWithinRange(E)){this.date=E;this.viewDate=F;this.setValue(this.formatDate(this.date));e.preventDefault();A=true;}break;case 13:this.setValue(this.formatDate(this.date));this.hide();e.preventDefault();break;case 9:this.setValue(this.formatDate(this.date));
+this.hide();break;case 16:case 17:case 18:break;default:this.hide();}},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.hide();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.hide();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.getUTCFullYear(),I=this.viewDate.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.hide();}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);
+});this.update();this.updateNavArrows();},updateNavArrows:function(){if(this.singleMode){return;}var d=new Date(this.viewDate),A=d.getUTCFullYear(),B=d.getUTCMonth();Roo.each(this.picker().select('.prev',true).elements,function(v){v.show();switch(this.viewMode){case 0:if(this.startDate!==-Infinity&&A<=this.startDate.getUTCFullYear()&&B<=this.startDate.getUTCMonth()){v.hide();
+}break;case 1:case 2:if(this.startDate!==-Infinity&&A<=this.startDate.getUTCFullYear()){v.hide();}break;}});Roo.each(this.picker().select('.next',true).elements,function(v){v.show();switch(this.viewMode){case 0:if(this.endDate!==Infinity&&A>=this.endDate.getUTCFullYear()&&B>=this.endDate.getUTCMonth()){v.hide();
+}break;case 1:case 2:if(this.endDate!==Infinity&&A>=this.endDate.getUTCFullYear()){v.hide();}break;}})},moveMonth:function(A,B){if(!B)return A;var C=new Date(A.valueOf()),D=C.getUTCDate(),E=C.getUTCMonth(),F=Math.abs(B),G,H;B=B>0?1:-1;if(F==1){H=B==-1?function(){return C.getUTCMonth()==E;
+}:function(){return C.getUTCMonth()!=G;};G=E+B;C.setUTCMonth(G);if(G<0||G>11)G=(G+12)%12;}else{for(var i=0;i<F;i++)C=this.moveMonth(C,B);G=C.getUTCMonth();C.setUTCDate(D);H=function(){return G!=C.getUTCMonth();};}while(H()){C.setUTCDate(--D);C.setUTCMonth(G);
+}return C;},moveYear:function(A,B){return this.moveMonth(A,B*12);},dateWithinRange:function(A){return A>=this.startDate&&A<=this.endDate;},remove:function(){this.picker().remove();}});Roo.apply(Roo.bootstrap.DateField,{head:{tag:'thead',cn:[{tag:'tr',cn:[{tag:'th',cls:'prev',html:'<i class="fa fa-arrow-left"/>'}
+,{tag:'th',cls:'switch',colspan:'5'},{tag:'th',cls:'next',html:'<i class="fa fa-arrow-right"/>'}]}]},content:{tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:'7'}]}]},footer:{tag:'tfoot',cn:[{tag:'tr',cn:[{tag:'th',colspan:'7',cls:'today'}]}]},dates:{en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today"}
 },modes:[{clsName:'days',navFnc:'Month',navStep:1},{clsName:'months',navFnc:'FullYear',navStep:1},{clsName:'years',navFnc:'FullYear',navStep:10}]});Roo.apply(Roo.bootstrap.DateField,{template:{tag:'div',cls:'datepicker dropdown-menu roo-dynamic',cn:[{tag:'div',cls:'datepicker-days',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.DateField.head,{tag:'tbody'}
 ,Roo.bootstrap.DateField.footer]}]},{tag:'div',cls:'datepicker-months',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.DateField.head,Roo.bootstrap.DateField.content,Roo.bootstrap.DateField.footer]}]},{tag:'div',cls:'datepicker-years',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.DateField.head,Roo.bootstrap.DateField.content,Roo.bootstrap.DateField.footer]}
 ]}]}});
@@ -941,20 +941,20 @@ break;}if(this.title){this.raphael.text(this.title.x,this.title.y,this.title.tex
 this.fireEvent('click',this,e);}});
 // Roo/bootstrap/dash/NumberBox.js
 Roo.bootstrap.dash=Roo.bootstrap.dash||{};Roo.bootstrap.dash.NumberBox=function(A){Roo.bootstrap.dash.NumberBox.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.dash.NumberBox,Roo.bootstrap.Component,{headline:'',content:'',icon:'',footer:'',fhref:'',ficon:'',getAutoCreate:function(){var A={tag:'div',cls:'small-box ',cn:[{tag:'div',cls:'inner',cn:[{tag:'h3',cls:'roo-headline',html:this.headline}
-,{tag:'p',cls:'roo-content',html:this.content}]}]};if(this.icon){A.cn.push({tag:'div',cls:'icon',cn:[{tag:'i',cls:'ion '+this.icon}]});}if(this.footer){var footer={tag:'a',cls:'small-box-footer',href:this.fhref||'#',html:this.footer};A.cn.push(footer);}return A;
-},onRender:function(ct,A){Roo.bootstrap.dash.NumberBox.superclass.onRender.call(this,ct,A);},setHeadline:function(A){this.el.select('.roo-headline',true).first().dom.innerHTML=A;},setFooter:function(A,B){this.el.select('a.small-box-footer',true).first().dom.innerHTML=A;
-if(B){this.el.select('a.small-box-footer',true).first().attr('href',B);}},setContent:function(A){this.el.select('.roo-content',true).first().dom.innerHTML=A;},initEvents:function(){}});
+,{tag:'p',cls:'roo-content',html:this.content}]}]};if(this.icon){A.cn.push({tag:'div',cls:'icon',cn:[{tag:'i',cls:'ion '+this.icon}]});}if(this.footer){var B={tag:'a',cls:'small-box-footer',href:this.fhref||'#',html:this.footer};A.cn.push(B);}return A;},onRender:function(ct,A){Roo.bootstrap.dash.NumberBox.superclass.onRender.call(this,ct,A);
+},setHeadline:function(A){this.el.select('.roo-headline',true).first().dom.innerHTML=A;},setFooter:function(A,B){this.el.select('a.small-box-footer',true).first().dom.innerHTML=A;if(B){this.el.select('a.small-box-footer',true).first().attr('href',B);}},setContent:function(A){this.el.select('.roo-content',true).first().dom.innerHTML=A;
+},initEvents:function(){}});
 // Roo/bootstrap/dash/TabBox.js
 Roo.bootstrap.dash=Roo.bootstrap.dash||{};Roo.bootstrap.dash.TabBox=function(A){Roo.bootstrap.dash.TabBox.superclass.constructor.call(this,A);this.addEvents({"addpane":true,"activatepane":true});this.panes=[];};Roo.extend(Roo.bootstrap.dash.TabBox,Roo.bootstrap.Component,{title:'',icon:false,showtabs:true,tabScrollable:false,getChildContainer:function(){return this.el.select('.tab-content',true).first();
 },getAutoCreate:function(){var A={tag:'li',cls:'pull-left header',html:this.title,cn:[]};if(this.icon){A.cn.push({tag:'i',cls:'fa '+this.icon});}var h={tag:'ul',cls:'nav nav-tabs pull-right',cn:[A]};if(this.tabScrollable){h={tag:'div',cls:'tab-header',cn:[{tag:'ul',cls:'nav nav-tabs pull-right',cn:[A]}
-]}}var B={tag:'div',cls:'nav-tabs-custom',cn:[h,{tag:'div',cls:'tab-content no-padding',cn:[]}]};return B;},initEvents:function(){this.on('addpane',this.onAddPane,this);},setTitle:function(A){this.el.select('.nav-tabs .header',true).first().dom.innerHTML=A;
+]};}var B={tag:'div',cls:'nav-tabs-custom',cn:[h,{tag:'div',cls:'tab-content no-padding',cn:[]}]};return B;},initEvents:function(){this.on('addpane',this.onAddPane,this);},setTitle:function(A){this.el.select('.nav-tabs .header',true).first().dom.innerHTML=A;
 },onAddPane:function(A){this.panes.push(A);if(!this.showtabs){return;}var B=this.el.select('.nav-tabs',true).first();var C=B.select('.nav-tab',true);var D=C.getCount();;var E=B.createChild({tag:'li',cls:'nav-tab'+(D?'':' active'),cn:[{tag:'a',href:'#',html:A.title}
 ]},D?C.first().dom:B.select('.header',true).first().dom);A.tab=E;E.on('click',this.onTabClick.createDelegate(this,[A],true));if(!D){A.el.addClass('active');}},onTabClick:function(ev,un,ob,A){ev.preventDefault();this.el.select('.nav-tabs li.nav-tab',true).removeClass('active');
 A.tab.addClass('active');this.getChildContainer().select('.tab-pane',true).removeClass('active');this.fireEvent('activatepane',A);A.el.addClass('active');A.fireEvent('activate');},getActivePane:function(){var r=false;Roo.each(this.panes,function(p){if(p.el.hasClass('active')){r=p;
 return false;}return;});return r;}});
 // Roo/bootstrap/dash/TabPane.js
-Roo.bootstrap.dash=Roo.bootstrap.dash||{};Roo.bootstrap.dash.TabPane=function(A){Roo.bootstrap.dash.TabPane.superclass.constructor.call(this,A);this.addEvents({"activate":true});};Roo.extend(Roo.bootstrap.dash.TabPane,Roo.bootstrap.Component,{active:false,title:'',tab:false,getAutoCreate:function(){var A={tag:'div',cls:'tab-pane'};
-if(this.active){A.cls+=' active';}return A;},initEvents:function(){this.parent().fireEvent('addpane',this)},setTitle:function(A){if(!this.tab){return;}this.title=A;this.tab.select('a',true).first().dom.innerHTML=A;}});
+Roo.bootstrap.dash=Roo.bootstrap.dash||{};Roo.bootstrap.dash.TabPane=function(A){Roo.bootstrap.dash.TabPane.superclass.constructor.call(this,A);this.addEvents({"activate":true});};Roo.extend(Roo.bootstrap.dash.TabPane,Roo.bootstrap.Component,{active:false,title:'',tab:false,getAutoCreate:function(){var A={tag:'div',cls:'tab-pane'}
+;if(this.active){A.cls+=' active';}return A;},initEvents:function(){this.parent().fireEvent('addpane',this)},setTitle:function(A){if(!this.tab){return;}this.title=A;this.tab.select('a',true).first().dom.innerHTML=A;}});
 // Roo/bootstrap/menu/Menu.js
 Roo.bootstrap.menu=Roo.bootstrap.menu||{};Roo.bootstrap.menu.Menu=function(A){Roo.bootstrap.menu.Menu.superclass.constructor.call(this,A);this.addEvents({beforeshow:true,beforehide:true,show:true,hide:true,click:true});};Roo.extend(Roo.bootstrap.menu.Menu,Roo.bootstrap.Component,{submenu:false,html:'',weight:'default',icon:false,pos:'bottom',getChildContainer:function(){if(this.isSubMenu){return this.el;
 }return this.el.select('ul.dropdown-menu',true).first();},getAutoCreate:function(){var A=[{tag:'span',cls:'roo-menu-text',html:this.html}];if(this.icon){A.unshift({tag:'i',cls:'fa '+this.icon})}var B={tag:'div',cls:'btn-group',cn:[{tag:'button',cls:'dropdown-button btn btn-'+this.weight,cn:A}
@@ -1109,7 +1109,7 @@ i+=1){c=J[i];if(c==='\u0000'){break;}K+=c;}return K;}return J;}});Roo.apply(Roo.
 ]},{tag:'div',cls:'btn-group roo-upload-cropbox-rotate-right',action:'rotate-right',cn:[{tag:'button',cls:'btn btn-default',html:'<i class="fa fa-repeat"></i>'}]}]}});
 // Roo/bootstrap/DocumentManager.js
 Roo.bootstrap.DocumentManager=function(A){Roo.bootstrap.DocumentManager.superclass.constructor.call(this,A);this.addEvents({"initial":true,"inspect":true,"exception":true,"prepare":true,"remove":true,"refresh":true,"click":true,"edit":true,"beforeselectfile":true,"process":true}
-);};Roo.extend(Roo.bootstrap.DocumentManager,Roo.bootstrap.Component,{boxes:0,inputName:'',thumbSize:300,multiple:true,files:[],method:'POST',url:'',paramName:'imageUpload',fieldLabel:'',labelWidth:4,labelAlign:'left',editable:true,delegates:[],getAutoCreate:function(){var A={tag:'div',cls:'roo-document-manager',cn:[{tag:'input',cls:'roo-document-manager-selector',type:'file'}
+);};Roo.extend(Roo.bootstrap.DocumentManager,Roo.bootstrap.Component,{boxes:0,inputName:'',thumbSize:300,multiple:true,files:[],method:'POST',url:'',paramName:'imageUpload',fieldLabel:'',labelWidth:4,labelAlign:'left',editable:true,delegates:[],xhr:false,getAutoCreate:function(){var A={tag:'div',cls:'roo-document-manager',cn:[{tag:'input',cls:'roo-document-manager-selector',type:'file'}
 ,{tag:'div',cls:'roo-document-manager-uploader',cn:[{tag:'div',cls:'roo-document-manager-upload-btn',html:'<i class="fa fa-plus"></i>'}]}]};var B=[{tag:'div',cls:'column col-md-12',cn:A}];if(this.fieldLabel.length){B=[{tag:'div',cls:'column col-md-12',html:this.fieldLabel}
 ,{tag:'div',cls:'column col-md-12',cn:A}];if(this.labelAlign=='left'){B=[{tag:'div',cls:'column col-md-'+this.labelWidth,html:this.fieldLabel},{tag:'div',cls:'column col-md-'+(12-this.labelWidth),cn:A}];}}var C={tag:'div',cls:'row clearfix',cn:B};return C;
 },initEvents:function(){this.managerEl=this.el.select('.roo-document-manager',true).first();this.managerEl.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.selectorEl=this.el.select('.roo-document-manager-selector',true).first();this.selectorEl.hide();
@@ -1130,8 +1130,8 @@ if(A){el.show();return;}el.hide();},this);},xhrOnLoad:function(A){Roo.each(this.
 Roo.log(A);this.arrange();},process:function(A){if(this.fireEvent('process',this,A)!==false){if(this.editable&&A.type.indexOf('image')!=-1){this.fireEvent('edit',this,A);return;}this.uploadStart(A,false);return;}},uploadStart:function(A,B){this.xhr=new XMLHttpRequest();
 if(typeof(A.id)!='undefined'&&A.id*1>0){this.arrange();return;}A.xhr=this.xhr;this.managerEl.createChild({tag:'div',cls:'roo-document-manager-loading',cn:[{tag:'div',tooltip:A.name,cls:'roo-document-manager-thumb',html:'<i class="fa fa-circle-o-notch fa-spin"></i>'}
 ]});this.xhr.open(this.method,this.url,true);var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);
-};this.xhr.onerror=function(){F.xhrOnError(F.xhr);};var G=new FormData();G.append('returnHTML','NO');if(B){G.append('crop',B);}G.append(this.paramName,A,A.name);if(this.fireEvent('prepare',this,G)!=false){this.xhr.send(G);};},uploadCancel:function(){this.xhr.abort();
-this.delegates=[];Roo.each(this.managerEl.select('.roo-document-manager-loading',true).elements,function(el){el.remove();},this);this.arrange();},renderPreview:function(A){if(typeof(A.target)!='undefined'&&A.target){return A;}var B=this.managerEl.createChild({tag:'div',cls:'roo-document-manager-preview',cn:[{tag:'div',tooltip:A.filename,cls:'roo-document-manager-thumb',html:'<img src="'+baseURL+'/Images/Thumb/'+this.thumbSize+'/'+A.id+'/'+A.filename+'">'}
+};this.xhr.onerror=function(){F.xhrOnError(F.xhr);};var G=new FormData();G.append('returnHTML','NO');if(B){G.append('crop',B);}G.append(this.paramName,A,A.name);if(this.fireEvent('prepare',this,G)!=false){this.xhr.send(G);};},uploadCancel:function(){if(this.xhr){this.xhr.abort();
+}this.delegates=[];Roo.each(this.managerEl.select('.roo-document-manager-loading',true).elements,function(el){el.remove();},this);this.arrange();},renderPreview:function(A){if(typeof(A.target)!='undefined'&&A.target){return A;}var B=this.managerEl.createChild({tag:'div',cls:'roo-document-manager-preview',cn:[{tag:'div',tooltip:A.filename,cls:'roo-document-manager-thumb',html:'<img src="'+baseURL+'/Images/Thumb/'+this.thumbSize+'/'+A.id+'/'+A.filename+'">'}
 ,{tag:'button',cls:'close',html:'<i class="fa fa-times-circle"></i>'}]});var C=B.select('button.close',true).first();C.on('click',this.onRemove,this,A);A.target=B;var D=B.select('img',true).first();var E=this;D.dom.addEventListener("load",function(){E.onPreviewLoad(A,D);
 });D.on('click',this.onClick,this,A);return A;},onPreviewLoad:function(A,B){if(typeof(A.target)=='undefined'||!A.target){return;}var C=B.dom.naturalWidth||B.dom.width;var D=B.dom.naturalHeight||B.dom.height;if(C>D){A.target.addClass('wide');return;}A.target.addClass('tall');
 return;},uploadFromSource:function(A,B){this.xhr=new XMLHttpRequest();this.managerEl.createChild({tag:'div',cls:'roo-document-manager-loading',cn:[{tag:'div',tooltip:A.name,cls:'roo-document-manager-thumb',html:'<i class="fa fa-circle-o-notch fa-spin"></i>'}