Merge branch 'master' of http://git.roojs.com/roojs1
authorjohn <john@roojs.com>
Tue, 2 Oct 2018 11:16:08 +0000 (19:16 +0800)
committerjohn <john@roojs.com>
Tue, 2 Oct 2018 11:16:08 +0000 (19:16 +0800)
1  2 
roojs-bootstrap-debug.js
roojs-bootstrap.js

diff --combined roojs-bootstrap-debug.js
@@@ -917,15 -917,7 +917,7 @@@ Roo.extend(Roo.bootstrap.Button, Roo.bo
      {
          return this.el.select('.roo-button-text',true).first().dom.innerHTML;
      },
-     hide: function() {
-        
-      
-         this.el.hide();   
-     },
-     show: function() {
-        
-         this.el.show();   
-     },
+     
      setWeight : function(str)
      {
        this.el.removeClass(this.weightClass);
@@@ -2633,7 -2625,8 +2625,7 @@@ Roo.extend(Roo.bootstrap.Modal, Roo.boo
      animate : true,
  
      fitwindow: false,
 -
 -
 +    
       // private
      dialogEl: false,
      bodyEl:  false,
      
      max_width: 0,
      
 +    max_height: 0,
 +    
      fit_content: false,
  
      onRender : function(ct, position)
              var w = Math.min(this.max_width, Roo.lib.Dom.getViewportWidth(true) - 30);
              
              if(this.height) {
 -                this.setSize(
 -                    w,
 -                    this.height <= Roo.lib.Dom.getViewportHeight(true) - 60 ? 
 -                        this.height : Roo.lib.Dom.getViewportHeight(true) - 60
 -                );
 +                this.setSize(w, this.height);
 +                return;
 +            }
 +            
 +            if(this.max_height) {
 +                this.setSize(w,Math.min(
 +                    this.max_height,
 +                    Roo.lib.Dom.getViewportHeight(true) - 60
 +                ));
 +                
                  return;
              }
              
          
          for(var i = 0; i < child_nodes.length; i++) {
              
 -            // for modal with tabs...
 +            /*
 +            * for modal with tabs...
              if(child_nodes[i].classList.contains('roo-layout-panel')) {
                  
                  var layout_childs = child_nodes[i].childNodes;
                              
                              if(layout_body_childs[k].classList.contains('navbar')) {
                                  child_height += layout_body_childs[k].offsetHeight;
 -                                // Roo.log('nav height: '+ layout_body_childs[k].offsetHeight);
                                  continue;
                              }
                              
                                      
                                      if(layout_body_tab_childs[m].classList.contains('roo-layout-active-content')) {
                                          child_height += this.getChildHeight(layout_body_tab_childs[m].childNodes);
 -                                        // Roo.log('active panel height: '+this.getChildHeight(layout_body_tab_childs[m].childNodes));
                                          continue;
                                      }
                                      
                  }
                  continue;
              }
 +            */
              
              child_height += child_nodes[i].offsetHeight;
 +            // Roo.log(child_nodes[i].offsetHeight);
          }
          
          return child_height;
@@@ -8323,11 -8308,6 +8315,6 @@@ clientValidation  Boolean          Appl
                  return;
              }
              
-             if(f.xtype == 'DateField'){
-                 f.setVisible(false);
-                 return;
-             }
-             
              f.hide();
              
          }, this);
                  return;
              }
              
-             if(f.xtype == 'DateField'){
-                 f.setVisible(true);
-                 return;
-             }
-             
              f.show();
              
          }, this);
@@@ -13065,6 -13040,11 +13047,11 @@@ Roo.extend(Roo.bootstrap.ComboBox, Roo.
       */
      useNativeIOS : false,
      
+     /**
+      * @cfg {Boolean} mobile_restrict_height (true|false) restrict height for touch view
+      */
+     mobile_restrict_height : false,
+     
      ios_options : false,
      
      //private
              document.activeElement.blur();
          }, this);
          
+         this._touchViewMask = Roo.DomHelper.append(document.body, {tag: "div", cls:"x-dlg-mask"}, true);
+         
          return;
          
          
          }else{
              this.touchViewEl.addClass('in');
          }
+         
+         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();
          
      },
              this.touchViewEl.setStyle('display', 'none');
          }
          
+         if(this._touchViewMask){
+             this._touchViewMask.removeClass('show');
+             Roo.get(document.body).removeClass("x-body-masked");
+         }
      },
      
      setTouchViewValue : function()
              bodyHeight = bodyHeight - this.touchViewHeaderEl.getHeight();
          }
  
-         var listHeight = this.touchViewListGroup.getHeight();
+         var listHeight = this.touchViewListGroup.getHeight() + this.touchViewBodyEl.getPadding('tb') * 2;
+         
+         if(this.mobile_restrict_height && listHeight < bodyHeight){
+             this.touchViewBodyEl.setHeight(listHeight);
+         }
          
          var _this = this;
          
diff --combined roojs-bootstrap.js
@@@ -33,8 -33,8 +33,8 @@@ delete A.html;}A.cls+=this.parentType==
  ,this.menu));}if(this.el.hasClass('roo-button')){this.el.on('click',this.onClick,this);}else{this.el.select('.roo-button').on('click',this.onClick,this);}if(this.removeClass){this.el.on('click',this.onClick,this);}this.el.enableDisplayMode();},onClick:function(e){if(this.disabled){return;
  }Roo.log('button on click ');if(this.preventDefault){e.preventDefault();}if(this.pressed===true||this.pressed===false){this.toggleActive(e);}this.fireEvent('click',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;},hide:function(){this.el.hide();},show:function(){this.el.show();},setWeight:function(A){this.el.removeClass(this.weightClass);
this.el.addClass('btn-'+A);}});
+ },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(this.weightClass);this.el.addClass('btn-'+A);
+ }});
  // 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;['xs','sm','md','lg'].map(function(D){if(B[D+'off']!==false){A.cls+=' col-'+D+'-offset-'+B[D+'off'];}if(B[D]===false){return;}if(!B[D]){A.cls+=' hidden-'+D;return;
@@@ -103,7 -103,7 +103,7 @@@ this.menu=this.addxtype(Roo.apply({},th
  // Roo/bootstrap/MenuSeparator.js
  Roo.bootstrap.MenuSeparator=function(A){Roo.bootstrap.MenuSeparator.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.MenuSeparator,Roo.bootstrap.Component,{getAutoCreate:function(){var A={cls:'divider',tag:'li'};return A;}});
  // Roo/bootstrap/Modal.js
 -Roo.bootstrap.Modal=function(A){Roo.bootstrap.Modal.superclass.constructor.call(this,A);this.addEvents({"btnclick":true,"resize":true});this.buttons=this.buttons||[];if(this.tmpl){this.tmpl=Roo.factory(this.tmpl);}};Roo.extend(Roo.bootstrap.Modal,Roo.bootstrap.Component,{title:'test dialog',buttons:false,html:false,tmp:false,specificTitle:false,buttonPosition:'right',allow_close:true,animate:true,fitwindow:false,dialogEl:false,bodyEl:false,footerEl:false,titleEl:false,closeEl:false,size:'',max_width:0,fit_content:false,onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);
 +Roo.bootstrap.Modal=function(A){Roo.bootstrap.Modal.superclass.constructor.call(this,A);this.addEvents({"btnclick":true,"resize":true});this.buttons=this.buttons||[];if(this.tmpl){this.tmpl=Roo.factory(this.tmpl);}};Roo.extend(Roo.bootstrap.Modal,Roo.bootstrap.Component,{title:'test dialog',buttons:false,html:false,tmp:false,specificTitle:false,buttonPosition:'right',allow_close:true,animate:true,fitwindow:false,dialogEl:false,bodyEl:false,footerEl:false,titleEl:false,closeEl:false,size:'',max_width:0,max_height:0,fit_content:false,onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);
  if(!this.el){var B=Roo.apply({},this.getAutoCreate());B.id=Roo.id();if(this.cls){B.cls+=' '+this.cls;}if(this.style){B.style=this.style;}this.el=Roo.get(document.body).createChild(B,A);}if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);
  }this.dialogEl=this.el.select('.modal-dialog',true).first();this.bodyEl=this.el.select('.modal-body',true).first();this.closeEl=this.el.select('.modal-header .close',true).first();this.headerEl=this.el.select('.modal-header',true).first();this.titleEl=this.el.select('.modal-title',true).first();
  this.footerEl=this.el.select('.modal-footer',true).first();this.maskEl=Roo.DomHelper.append(document.body,{tag:"div",cls:"x-dlg-mask"},true);if(this.buttons.length){Roo.each(this.buttons,function(bb){var b=Roo.apply({},bb);b.xns=b.xns||Roo.bootstrap;b.xtype=b.xtype||'Button';
@@@ -112,17 -112,18 +112,17 @@@ for(var i=0;i<D.length;i++){C.push(this
  };var C=[];if(this.allow_close){C.push({tag:'button',cls:'close',html:'&times'});}C.push(B);var D='';if(this.size.length){D='modal-'+this.size;}var E={cls:"modal",cn:[{cls:"modal-dialog "+D,cn:[{cls:"modal-content",cn:[{cls:'modal-header',cn:C},A,{cls:'modal-footer',cn:[{tag:'div',cls:'btn-'+this.buttonPosition}
  ]}]}]}]};if(this.animate){E.cls+=' fade';}return E;},getChildContainer:function(){return this.bodyEl;},getButtonContainer:function(){return this.el.select('.modal-footer div',true).first();},initEvents:function(){if(this.allow_close){this.closeEl.on('click',this.hide,this);
  }Roo.EventManager.onWindowResize(this.resize,this,true);},resize:function(){this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));if(this.fitwindow){this.setSize(this.width||Roo.lib.Dom.getViewportWidth(true)-30,this.height||Roo.lib.Dom.getViewportHeight(true)-60);
 -return;}if(this.max_width!==0){var w=Math.min(this.max_width,Roo.lib.Dom.getViewportWidth(true)-30);if(this.height){this.setSize(w,this.height<=Roo.lib.Dom.getViewportHeight(true)-60?this.height:Roo.lib.Dom.getViewportHeight(true)-60);return;}if(!this.fit_content){this.setSize(w,Roo.lib.Dom.getViewportHeight(true)-60);
 -return;}this.setSize(w,Math.min(60+this.headerEl.getHeight()+this.footerEl.getHeight()+this.getChildHeight(this.bodyEl.dom.childNodes),Roo.lib.Dom.getViewportHeight(true)-60));}},setSize:function(w,h){if(!w&&!h){return;}this.resizeTo(w,h);},show:function(){if(!this.rendered){this.render();
 -}this.el.removeClass('hideing');this.el.addClass('show');if(this.animate){var A=this;(function(){this.el.addClass('in');}).defer(50,this);}else{this.el.addClass('in');}Roo.get(document.body).addClass("x-body-masked");this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));
 -this.maskEl.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);this.maskEl.addClass('show');this.resize();this.fireEvent('show',this);this.el.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);(function(){this.items.forEach(function(e){e.layout?e.layout():false;
 -});}).defer(100,this);},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.maskEl.removeClass('show');Roo.get(document.body).removeClass("x-body-masked");this.el.removeClass('in');this.el.select('.modal-dialog',true).first().setStyle('transform','');
 -if(this.animate){this.el.addClass('hideing');(function(){if(!this.el.hasClass('hideing')){return;}this.el.removeClass('show');this.el.removeClass('hideing');}).defer(150,this);}else{this.el.removeClass('show');}this.fireEvent('hide',this);}},isVisible:function(){return this.el.hasClass('show')&&!this.el.hasClass('hideing');
 -},addButton:function(A,cb){var b=Roo.apply({},{html:A});b.xns=b.xns||Roo.bootstrap;b.xtype=b.xtype||'Button';if(typeof(b.listeners)=='undefined'){b.listeners={click:cb.createDelegate(this)};}var B=Roo.factory(b);B.render(this.el.select('.modal-footer div').first());
 -return B;},setDefaultButton:function(A){},diff:false,resizeTo:function(w,h){this.dialogEl.setWidth(w);if(this.diff===false){this.diff=this.dialogEl.getHeight()-this.bodyEl.getHeight();}this.bodyEl.setHeight(h-this.diff);this.fireEvent('resize',this);},setContentSize:function(w,h){}
 -,onButtonClick:function(A,e){this.fireEvent('btnclick',A.name,e);},setTitle:function(A){this.titleEl.dom.innerHTML=A;},setBody:function(A){this.bodyEl.dom.innerHTML=A;},applyBody:function(A){if(!this.tmpl){Roo.log("Error - using apply Body without a template");
 -}this.tmpl.overwrite(this.bodyEl,A);},getChildHeight:function(A){if(!A||A.length==0){return;}var B=0;for(var i=0;i<A.length;i++){if(A[i].classList.contains('roo-layout-panel')){var C=A[i].childNodes;for(var j=0;j<C.length;j++){if(C[j].classList.contains('roo-layout-panel-body')){var D=C[j].childNodes;
 -for(var k=0;k<D.length;k++){if(D[k].classList.contains('navbar')){B+=D[k].offsetHeight;continue;}if(D[k].classList.contains('roo-layout-tabs-body')){var E=D[k].childNodes;for(var m=0;m<E.length;m++){if(E[m].classList.contains('roo-layout-active-content')){B+=this.getChildHeight(E[m].childNodes);
 -continue;}}}}}}continue;}B+=A[i].offsetHeight;}return B;}});Roo.apply(Roo.bootstrap.Modal,{OK:[{name:'ok',weight:'primary',html:'OK'}],YESNO:[{name:'no',html:'No'},{name:'yes',weight:'primary',html:'Yes'}],OKCANCEL:[{name:'cancel',html:'Cancel'},{name:'ok',weight:'primary',html:'OK'}
 +return;}if(this.max_width!==0){var w=Math.min(this.max_width,Roo.lib.Dom.getViewportWidth(true)-30);if(this.height){this.setSize(w,this.height);return;}if(this.max_height){this.setSize(w,Math.min(this.max_height,Roo.lib.Dom.getViewportHeight(true)-60));return;
 +}if(!this.fit_content){this.setSize(w,Roo.lib.Dom.getViewportHeight(true)-60);return;}this.setSize(w,Math.min(60+this.headerEl.getHeight()+this.footerEl.getHeight()+this.getChildHeight(this.bodyEl.dom.childNodes),Roo.lib.Dom.getViewportHeight(true)-60));}
 +},setSize:function(w,h){if(!w&&!h){return;}this.resizeTo(w,h);},show:function(){if(!this.rendered){this.render();}this.el.removeClass('hideing');this.el.addClass('show');if(this.animate){var A=this;(function(){this.el.addClass('in');}).defer(50,this);}else{this.el.addClass('in');
 +}Roo.get(document.body).addClass("x-body-masked");this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));this.maskEl.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);this.maskEl.addClass('show');this.resize();this.fireEvent('show',this);
 +this.el.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);(function(){this.items.forEach(function(e){e.layout?e.layout():false;});}).defer(100,this);},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.maskEl.removeClass('show');Roo.get(document.body).removeClass("x-body-masked");
 +this.el.removeClass('in');this.el.select('.modal-dialog',true).first().setStyle('transform','');if(this.animate){this.el.addClass('hideing');(function(){if(!this.el.hasClass('hideing')){return;}this.el.removeClass('show');this.el.removeClass('hideing');}).defer(150,this);
 +}else{this.el.removeClass('show');}this.fireEvent('hide',this);}},isVisible:function(){return this.el.hasClass('show')&&!this.el.hasClass('hideing');},addButton:function(A,cb){var b=Roo.apply({},{html:A});b.xns=b.xns||Roo.bootstrap;b.xtype=b.xtype||'Button';
 +if(typeof(b.listeners)=='undefined'){b.listeners={click:cb.createDelegate(this)};}var B=Roo.factory(b);B.render(this.el.select('.modal-footer div').first());return B;},setDefaultButton:function(A){},diff:false,resizeTo:function(w,h){this.dialogEl.setWidth(w);
 +if(this.diff===false){this.diff=this.dialogEl.getHeight()-this.bodyEl.getHeight();}this.bodyEl.setHeight(h-this.diff);this.fireEvent('resize',this);},setContentSize:function(w,h){},onButtonClick:function(A,e){this.fireEvent('btnclick',A.name,e);},setTitle:function(A){this.titleEl.dom.innerHTML=A;
 +},setBody:function(A){this.bodyEl.dom.innerHTML=A;},applyBody:function(A){if(!this.tmpl){Roo.log("Error - using apply Body without a template");}this.tmpl.overwrite(this.bodyEl,A);},getChildHeight:function(A){if(!A||A.length==0){return;}var B=0;for(var i=0;
 +i<A.length;i++){B+=A[i].offsetHeight;}return B;}});Roo.apply(Roo.bootstrap.Modal,{OK:[{name:'ok',weight:'primary',html:'OK'}],YESNO:[{name:'no',html:'No'},{name:'yes',weight:'primary',html:'Yes'}],OKCANCEL:[{name:'cancel',html:'Cancel'},{name:'ok',weight:'primary',html:'OK'}
  ],YESNOCANCEL:[{name:'yes',weight:'primary',html:'Yes'},{name:'no',html:'No'},{name:'cancel',html:'Cancel'}],zIndex:10001});
  // Roo/bootstrap/MessageBox.js
  Roo.bootstrap.MessageBox=function(){var A,B,C,D;var E,F,G,H,I,pp;var J,K,L;var M=function(Q){A.hide();Roo.callback(B.fn,B.scope||window,[Q,K.dom.value],1);};var N=function(){if(B&&B.cls){A.el.removeClass(B.cls);}};var O=function(b){var Q=0;if(!b){J["ok"].hide();
@@@ -328,15 -329,15 +328,15 @@@ sd[C.displayField]=typeof(A[C.name])=='
  if(A===true){return fs;}return Roo.urlDecode(fs);},getFieldValues:function(A){var B=this.getItems();var C={};B.each(function(f){if(!f.getName()){return;}var v=f.getValue();if(f.inputType=='radio'){if(typeof(C[f.getName()])=='undefined'){C[f.getName()]='';
  }if(!f.el.dom.checked){return;}v=f.el.dom.value;}if(f.xtype=='MoneyField'){C[f.currencyName]=f.getCurrency();}if((typeof(v)=='object')&&f.getRawValue){v=f.getRawValue();}if(f.name!==false&&f.name!=''&&f.name!=f.getName()){C[f.name]=f.getRawValue();}C[f.getName()]=v;
  });return C;},clearInvalid:function(){var A=this.getItems();A.each(function(f){f.clearInvalid();});return this;},reset:function(){var A=this.getItems();A.each(function(f){f.reset();});Roo.each(this.childForms||[],function(f){f.reset();});return this;},getItems:function(){var r=new Roo.util.MixedCollection(false,function(o){return o.id||(o.id=Roo.id());
- });var A=function(el){if(el.inputEl){r.add(el);}if(!el.items){return;}Roo.each(el.items,function(e){A(e);});};A(this);return r;},hideFields:function(A){Roo.each(A,function(i){var f=this.findField(i);if(!f){return;}if(f.xtype=='DateField'){f.setVisible(false);
- return;}f.hide();},this);},showFields:function(A){Roo.each(A,function(i){var f=this.findField(i);if(!f){return;}if(f.xtype=='DateField'){f.setVisible(true);return;}f.show();},this);}});Roo.apply(Roo.bootstrap.Form,{popover:{padding:5,isApplied:false,isMasked:false,form:false,target:false,toolTip:false,intervalID:false,maskEl:false,apply:function(){if(this.isApplied){return;
}this.maskEl={top:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-top-mask"},true),left:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-left-mask"},true),bottom:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-bottom-mask"}
- ,true),right:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-right-mask"},true)};this.maskEl.top.enableDisplayMode("block");this.maskEl.left.enableDisplayMode("block");this.maskEl.bottom.enableDisplayMode("block");this.maskEl.right.enableDisplayMode("block");
this.toolTip=new Roo.bootstrap.Tooltip({cls:'roo-form-error-popover',alignment:{'left':['r-l',[-2,0],'right'],'right':['l-r',[2,0],'left'],'bottom':['tl-bl',[0,2],'top'],'top':['bl-tl',[0,-2],'bottom']}});this.toolTip.render(Roo.get(document.body));this.toolTip.el.enableDisplayMode("block");
Roo.get(document.body).on('click',function(){this.unmask();},this);Roo.get(document.body).on('touchstart',function(){this.unmask();},this);this.isApplied=true},mask:function(A,B){this.form=A;this.target=B;if(!this.form.errorMask||!B.el){return;}var C=this.target.el.findScrollableParent()||this.target.el.findParent('div.modal',100,true)||Roo.get(document.body);
Roo.log(C);var ot=this.target.el.calcOffsetsTo(C);var D=ot[1]-this.form.maskOffset;D=Math.min(D,C.dom.scrollHeight);C.scrollTo('top',D);var E=this.target.el.getBox();Roo.log(E);var F=Roo.bootstrap.Modal.zIndex++;this.maskEl.top.setStyle('position','absolute');
- this.maskEl.top.setStyle('z-index',F);this.maskEl.top.setSize(Roo.lib.Dom.getDocumentWidth(),E.y-this.padding);this.maskEl.top.setLeft(0);this.maskEl.top.setTop(0);this.maskEl.top.show();this.maskEl.left.setStyle('position','absolute');this.maskEl.left.setStyle('z-index',F);
- this.maskEl.left.setSize(E.x-this.padding,E.height+this.padding*2);this.maskEl.left.setLeft(0);this.maskEl.left.setTop(E.y-this.padding);this.maskEl.left.show();this.maskEl.bottom.setStyle('position','absolute');this.maskEl.bottom.setStyle('z-index',F);this.maskEl.bottom.setSize(Roo.lib.Dom.getDocumentWidth(),Roo.lib.Dom.getDocumentHeight()-E.bottom-this.padding);
+ });var A=function(el){if(el.inputEl){r.add(el);}if(!el.items){return;}Roo.each(el.items,function(e){A(e);});};A(this);return r;},hideFields:function(A){Roo.each(A,function(i){var f=this.findField(i);if(!f){return;}f.hide();},this);},showFields:function(A){Roo.each(A,function(i){var f=this.findField(i);
+ if(!f){return;}f.show();},this);}});Roo.apply(Roo.bootstrap.Form,{popover:{padding:5,isApplied:false,isMasked:false,form:false,target:false,toolTip:false,intervalID:false,maskEl:false,apply:function(){if(this.isApplied){return;}this.maskEl={top:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-top-mask"}
,true),left:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-left-mask"},true),bottom:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-bottom-mask"},true),right:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-right-mask"}
+ ,true)};this.maskEl.top.enableDisplayMode("block");this.maskEl.left.enableDisplayMode("block");this.maskEl.bottom.enableDisplayMode("block");this.maskEl.right.enableDisplayMode("block");this.toolTip=new Roo.bootstrap.Tooltip({cls:'roo-form-error-popover',alignment:{'left':['r-l',[-2,0],'right'],'right':['l-r',[2,0],'left'],'bottom':['tl-bl',[0,2],'top'],'top':['bl-tl',[0,-2],'bottom']}
});this.toolTip.render(Roo.get(document.body));this.toolTip.el.enableDisplayMode("block");Roo.get(document.body).on('click',function(){this.unmask();},this);Roo.get(document.body).on('touchstart',function(){this.unmask();},this);this.isApplied=true},mask:function(A,B){this.form=A;
this.target=B;if(!this.form.errorMask||!B.el){return;}var C=this.target.el.findScrollableParent()||this.target.el.findParent('div.modal',100,true)||Roo.get(document.body);Roo.log(C);var ot=this.target.el.calcOffsetsTo(C);var D=ot[1]-this.form.maskOffset;D=Math.min(D,C.dom.scrollHeight);
C.scrollTo('top',D);var E=this.target.el.getBox();Roo.log(E);var F=Roo.bootstrap.Modal.zIndex++;this.maskEl.top.setStyle('position','absolute');this.maskEl.top.setStyle('z-index',F);this.maskEl.top.setSize(Roo.lib.Dom.getDocumentWidth(),E.y-this.padding);
+ this.maskEl.top.setLeft(0);this.maskEl.top.setTop(0);this.maskEl.top.show();this.maskEl.left.setStyle('position','absolute');this.maskEl.left.setStyle('z-index',F);this.maskEl.left.setSize(E.x-this.padding,E.height+this.padding*2);this.maskEl.left.setLeft(0);
+ this.maskEl.left.setTop(E.y-this.padding);this.maskEl.left.show();this.maskEl.bottom.setStyle('position','absolute');this.maskEl.bottom.setStyle('z-index',F);this.maskEl.bottom.setSize(Roo.lib.Dom.getDocumentWidth(),Roo.lib.Dom.getDocumentHeight()-E.bottom-this.padding);
  this.maskEl.bottom.setLeft(0);this.maskEl.bottom.setTop(E.bottom+this.padding);this.maskEl.bottom.show();this.maskEl.right.setStyle('position','absolute');this.maskEl.right.setStyle('z-index',F);this.maskEl.right.setSize(Roo.lib.Dom.getDocumentWidth()-E.right-this.padding,E.height+this.padding*2);
  this.maskEl.right.setLeft(E.right+this.padding);this.maskEl.right.setTop(E.y-this.padding);this.maskEl.right.show();this.toolTip.bindEl=this.target.el;this.toolTip.el.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);var G=this.target.blankText;if(this.target.getValue()!==''){if(this.target.invalidText.length){G=this.target.invalidText;
  }else if(this.target.regexText.length){G=this.target.regexText;}}this.toolTip.show(G);this.intervalID=window.setInterval(function(){Roo.bootstrap.Form.popover.unmask();},10000);window.onwheel=function(){return false;};(function(){this.isMasked=true;}).defer(500,this);
@@@ -515,7 -516,7 +515,7 @@@ var E=o;for(var i=0;i<E.length;i++){va
  v=f.convert(v);F[f.name]=v;}var H=new B(F,id);H.json=n;D[D.length]=H;}return {records:D,totalRecords:D.length};}});
  // Roo/bootstrap/ComboBox.js
  Roo.bootstrap.ComboBox=function(A){Roo.bootstrap.ComboBox.superclass.constructor.call(this,A);this.addEvents({'expand':true,'collapse':true,'beforeselect':true,'select':true,'beforequery':true,'add':true,'edit':true,'remove':true,'afterremove':true,'specialfilter':true,'tick':true,'touchviewdisplay':true}
- );this.item=[];this.tickItems=[];this.selectedIndex=-1;if(this.mode=='local'){if(A.queryDelay===undefined){this.queryDelay=10;}if(A.minChars===undefined){this.minChars=0;}}};Roo.extend(Roo.bootstrap.ComboBox,Roo.bootstrap.TriggerField,{listWidth:undefined,displayField:undefined,valueField:undefined,modalTitle:'',hiddenName:undefined,listClass:'',selectedClass:'active',shadow:'sides',listAlign:'tl-bl?',maxHeight:300,triggerAction:'query',minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:'query',loadingText:'Loading...',resizable:false,handleHeight:8,editable:true,allQuery:'',mode:'remote',minListWidth:70,forceSelection:false,typeAheadDelay:250,valueNotFoundText:undefined,blockFocus:false,disableClear:false,alwaysQuery:false,multiple:false,invalidClass:"has-warning",validClass:"has-success",specialFilter:false,mobileTouchView:true,useNativeIOS:false,ios_options:false,addicon:false,editicon:false,page:0,hasQuery:false,append:false,loadNext:false,autoFocus:true,tickable:false,btnPosition:'right',triggerList:true,showToggleBtn:true,animate:true,emptyResultText:'Empty',triggerText:'Select',emptyTitle:'',getAutoCreate:function(){var A=false;
+ );this.item=[];this.tickItems=[];this.selectedIndex=-1;if(this.mode=='local'){if(A.queryDelay===undefined){this.queryDelay=10;}if(A.minChars===undefined){this.minChars=0;}}};Roo.extend(Roo.bootstrap.ComboBox,Roo.bootstrap.TriggerField,{listWidth:undefined,displayField:undefined,valueField:undefined,modalTitle:'',hiddenName:undefined,listClass:'',selectedClass:'active',shadow:'sides',listAlign:'tl-bl?',maxHeight:300,triggerAction:'query',minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:'query',loadingText:'Loading...',resizable:false,handleHeight:8,editable:true,allQuery:'',mode:'remote',minListWidth:70,forceSelection:false,typeAheadDelay:250,valueNotFoundText:undefined,blockFocus:false,disableClear:false,alwaysQuery:false,multiple:false,invalidClass:"has-warning",validClass:"has-success",specialFilter:false,mobileTouchView:true,useNativeIOS:false,mobile_restrict_height:false,ios_options:false,addicon:false,editicon:false,page:0,hasQuery:false,append:false,loadNext:false,autoFocus:true,tickable:false,btnPosition:'right',triggerList:true,showToggleBtn:true,animate:true,emptyResultText:'Empty',triggerText:'Select',emptyTitle:'',getAutoCreate:function(){var A=false;
  if(Roo.isIOS&&this.useNativeIOS){A=this.getAutoCreateNativeIOS();return A;}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='';var D='';var E='';if(this.btn_text_show){C='Select';D='Done';E='Cancel';}var F={tag:'div',cls:'tickable-buttons',cn:[{tag:'button',type:'button',cls:'btn btn-link btn-edit pull-'+this.btnPosition,html:C}
  ,{tag:'button',type:'button',name:'ok',cls:'btn btn-link btn-ok pull-'+this.btnPosition,html:D},{tag:'button',type:'button',name:'cancel',cls:'btn btn-link btn-cancel pull-'+this.btnPosition,html:E}]};if(this.editable){F.cn.unshift({tag:'input',cls:'roo-select2-search-field-input'}
@@@ -612,22 -613,24 +612,24 @@@ this.triggerEl=this.el.select('span.dro
  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);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');}).defer(50);}else{this.touchViewEl.addClass('in');}this.doTouchViewQuery();},hideTouchView:function(){this.touchViewEl.removeClass('in');
- if(this.animate){var A=this;(function(){A.touchViewEl.setStyle('display','none');}).defer(150);}else{this.touchViewEl.setStyle('display','none');}},setTouchViewValue:function(){if(this.multiple){this.clearItem();var A=this;Roo.each(this.tickItems,function(o){this.addItem(o);
+ }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');}).defer(50);}else{this.touchViewEl.addClass('in');}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');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();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');
+ 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'}
  ;var B={tag:'select',cls:'roo-ios-select'};if(this.name){B.name=this.name;}if(this.disabled){B.disabled=true;}var C=this;['xs','sm','md','lg'].map(function(D){if(C[D]){A.cls+=' col-'+D+'-'+C[D];}});A.cn=B;return A;},initIOSView:function(){this.store.on('load',this.onIOSViewLoad,this);