2
0
forked from Wavyzz/dolibarr

Si calendrier trop bas sort de la fenetre, on le remonte

This commit is contained in:
Laurent Destailleur
2006-03-25 15:02:35 +00:00
parent dcb5ee46bc
commit e79d5ce9b5
3 changed files with 42 additions and 36 deletions

View File

@@ -47,6 +47,7 @@ function showDP(base,dateFieldID,format)
showDP.datefieldID=dateFieldID;
var dateField=getObjectFromID(dateFieldID);
//check to see if another box is already showing
var alreadybox=getObjectFromID("DPCancel");
@@ -54,6 +55,15 @@ function showDP(base,dateFieldID,format)
//get positioning
var thetop=getTop(dateField)+dateField.offsetHeight;
// var xxx=getObjectFromID('bottompage');
//alert(xxx.style.pixelTop);
//alert(document.body.clientHeight);
//alert(document.body.style.offsetTop);
//alert(thetop);
//alert(window.innerHeight);
if (thetop+160 > window.innerHeight)
thetop=thetop-160-20;
var theleft=getLeft(dateField);
if (theleft+140 > window.innerWidth)
theleft= theleft-140+dateField.offsetWidth-15;