Roo/bootstrap/TimeField.js
authorEdward <edward@roojs.com>
Mon, 13 Oct 2014 07:10:29 +0000 (15:10 +0800)
committerEdward <edward@roojs.com>
Mon, 13 Oct 2014 07:10:29 +0000 (15:10 +0800)
Roo/bootstrap/TimeField.js

index d2b6a87..784d618 100644 (file)
@@ -313,7 +313,7 @@ Roo.extend(Roo.bootstrap.TimeField, Roo.bootstrap.Input,  {
     {   
         this.picker().removeClass(['bottom-left', 'bottom-right', 'top-left', 'top-right']);
         
-        var cls = 'bottom-';
+        var cls = ['bottom'];
         
         Roo.log('run!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1');
         Roo.log(Roo.lib.Dom.getViewWidth());
@@ -322,13 +322,13 @@ Roo.extend(Roo.bootstrap.TimeField, Roo.bootstrap.Input,  {
         Roo.log(this.picker().getWidth());
         
         if((Roo.lib.Dom.getViewHeight() + Roo.get(document.body).getScroll().top) - (this.inputEl().getBottom() + this.picker().getHeight()) < 0){ // top
-            cls = 'top-';
+            cls.pop().push('top');
         }
         
+        cls.push('right');
+        
         if((Roo.lib.Dom.getViewWidth() + Roo.get(document.body).getScroll().left) - (this.inputEl().getLeft() + this.picker().getWidth()) < 0){ // left
-            cls += 'left';
-        }else{
-            cls += 'right';
+            cls.pop().push('left');
         }
         
         Roo.log(cls);