}
if(!this.fitwindow && this.max_width !== 0){
-
var w = Math.min(this.max_width, Roo.lib.Dom.getViewportWidth(true) - 30);
- var h = this.height || Roo.lib.Dom.getViewportHeight(true) - 60;
- this.setSize(w,h);
+ // var h = this.height || Roo.lib.Dom.getViewportHeight(true) - 60;
+ this.setSize(w,this.height);
+
+ var view_height = Roo.lib.Dom.getViewportHeight(true) - 60;
+ var modal_height = this.headerEl.getHeight() + this.bodyEl.getHeight() + this.footerEl.getHeight();
+
+ Roo.log(view_height);
+ Roo.log(modal_height);
+
+ if(
+ (
+ this.headerEl.getHeight() +
+ this.bodyEl.getHeight() +
+ this.footerEl.getHeight()
+ ) > view_height) {
+ } {
+ this.setSize(w,view_height);
+ }
}
},
this.showMode();
if(this.isInline) {
- this.show();
+ this.showPopup();
}
},
onFocus : function()
{
Roo.bootstrap.DateField.superclass.onFocus.call(this);
- this.show();
+ this.showPopup();
},
onBlur : function()
this.setValue(d);
- this.hide();
+ this.hidePopup();
},
showPopup : function()
{
if (!this.picker().isVisible()){
if (e.keyCode == 27) { // allow escape to hide and re-show picker
- this.show();
+ this.showPopup();
}
return;
}
switch(e.keyCode){
case 27: // escape
- this.hide();
+ this.hidePopup();
e.preventDefault();
break;
case 37: // left
break;
case 13: // enter
this.setValue(this.formatDate(this.date));
- this.hide();
+ this.hidePopup();
e.preventDefault();
break;
case 9: // tab
this.setValue(this.formatDate(this.date));
- this.hide();
+ this.hidePopup();
break;
case 16: // shift
case 17: // ctrl
// this.fill()
this.setValue(this.formatDate(this.date));
- this.hide();
+ this.hidePopup();
break;
}
break;
if(this.singleMode){
this.setValue(this.formatDate(this.viewDate));
- this.hide();
+ this.hidePopup();
return;
}
// this.fill();
//Roo.log(this.formatDate(this.date));
this.setValue(this.formatDate(this.date));
- this.hide();
+ this.hidePopup();
}
break;
}
placement = 'top';
}
+ align = this.alignment[placement];
}
this.el.alignTo(this.bindEl, align[0],align[1]);