roojs-bootstrap.js
authorEdward <edward@roojs.com>
Tue, 2 Oct 2018 07:01:51 +0000 (15:01 +0800)
committerEdward <edward@roojs.com>
Tue, 2 Oct 2018 07:01:51 +0000 (15:01 +0800)
roojs-bootstrap-debug.js

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

index 90794fe..ea33188 100644 (file)
@@ -15475,7 +15475,11 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
             bodyHeight = bodyHeight - this.touchViewHeaderEl.getHeight();
         }
 
-        var listHeight = this.touchViewListGroup.getHeight();
+        var listHeight = this.touchViewListGroup.getHeight() + this.touchViewBodyEl.getPadding('tb');
+        
+        Roo.log(this.touchViewListGroup.getHeight());
+        Roo.log(this.touchViewListGroup.getHeight(true));
+        Roo.log(this.touchViewBodyEl.getPadding('tb'));
         
         if(this.mobile_restrict_height && listHeight < bodyHeight){
             this.touchViewBodyEl.setHeight(listHeight);
index 4371505..0c81305 100644 (file)
@@ -628,9 +628,10 @@ this.tickItems=[];this.store.data.each(function(d,G){var H=this.touchViewListGro
 ;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();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');
+if(this.modalTitle.length){D=D-this.touchViewHeaderEl.getHeight();}var E=this.touchViewListGroup.getHeight()+this.touchViewBodyEl.getPadding('tb');Roo.log(this.touchViewListGroup.getHeight());Roo.log(this.touchViewListGroup.getHeight(true));Roo.log(this.touchViewBodyEl.getPadding('tb'));
+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);