Roo/bootstrap/DateField.js
[roojs1] / roojs-bootstrap-debug.js
index 5c7d16a..1e451cb 100644 (file)
@@ -7112,16 +7112,35 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         
         var rows = this.el.dom.getElementsByClassName("x-col-"+col_index);
         
-        var h_rows = this.el.dom.getElementsByClassName("x-hcol-"+col_index);
+        var h_row = this.el.dom.getElementsByClassName("x-hcol-"+col_index);
         
-        if(rows.length != h_rows.length) {
-            Roo.log(h_rows);
-            return;
-        }
         
-        for(var i = 0; i < rows.length; i++) {
+        for(var j = 0; j < w.length; j++) {
+            
+            if(!w[j]) {
+                continue;
+            }
+            
+            var size_cls = w[j].split("-");
+            
+            if(!Number.isInteger(size_cls[1] * 1)) {
+                continue;
+            }
             
-            for(var j = 0; w.length; j++) {
+            if(!this.colModel.config[col_index][size_cls[0]]) {
+                continue;
+            }
+            
+            if(!h_row[0].classList.contains("col-"+size_cls[0]+"-"+this.colModel.config[col_index][size_cls[0]])) {
+                continue;
+            }
+            
+            h_row[0].classList.replace(
+                "col-"+size_cls[0]+"-"+this.colModel.config[col_index][size_cls[0]],
+                "col-"+size_cls[0]+"-"+size_cls[1]
+            );
+            
+            for(var i = 0; i < rows.length; i++) {
                 
                 var size_cls = w[j].split("-");
                 
@@ -7133,18 +7152,17 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
                     continue;
                 }
                 
-                rows[i].classList.replace(
-                    "col-"+size_cls[0]+"-"+this.colModel.config[col_index][size_cls[0]],
-                    "col-"+size_cls[0]+"-"+size_cls[1]
-                );
+                if(!rows[i].classList.contains("col-"+size_cls[0]+"-"+this.colModel.config[col_index][size_cls[0]])) {
+                    continue;
+                }
                 
-                h_rows[i].classList.replace(
+                rows[i].classList.replace(
                     "col-"+size_cls[0]+"-"+this.colModel.config[col_index][size_cls[0]],
                     "col-"+size_cls[0]+"-"+size_cls[1]
                 );
-                
-                this.colModel.config[col_index][size_cls[0]] = size_cls[1]
             }
+            
+            this.colModel.config[col_index][size_cls[0]] = size_cls[1];
         }
     }
 });
@@ -19152,7 +19170,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
             case 18: // alt
                 break;
             default :
-                this.hide();
+                // this.hide();
                 
         }
     },