Merge branch 'master' of http://git.roojs.com/roojs1
[roojs1] / roojs-bootstrap-debug.js
index b73e72f..3c697b8 100644 (file)
@@ -917,15 +917,7 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
     {
         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);
@@ -8323,11 +8315,6 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
                 return;
             }
             
-            if(f.xtype == 'DateField'){
-                f.setVisible(false);
-                return;
-            }
-            
             f.hide();
             
         }, this);
@@ -8343,11 +8330,6 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
                 return;
             }
             
-            if(f.xtype == 'DateField'){
-                f.setVisible(true);
-                return;
-            }
-            
             f.show();
             
         }, this);
@@ -13065,6 +13047,11 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
      */
     useNativeIOS : false,
     
+    /**
+     * @cfg {Boolean} mobile_restrict_height (true|false) restrict height for touch view
+     */
+    mobile_restrict_height : false,
+    
     ios_options : false,
     
     //private
@@ -15282,6 +15269,8 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
             document.activeElement.blur();
         }, this);
         
+        this._touchViewMask = Roo.DomHelper.append(document.body, {tag: "div", cls:"x-dlg-mask"}, true);
+        
         return;
         
         
@@ -15342,7 +15331,14 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         }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();
         
     },
@@ -15358,6 +15354,10 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
             this.touchViewEl.setStyle('display', 'none');
         }
         
+        if(this._touchViewMask){
+            this._touchViewMask.removeClass('show');
+            Roo.get(document.body).removeClass("x-body-masked");
+        }
     },
     
     setTouchViewValue : function()
@@ -15464,7 +15464,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') * 2;
+        
+        if(this.mobile_restrict_height && listHeight < bodyHeight){
+            this.touchViewBodyEl.setHeight(listHeight);
+        }
         
         var _this = this;