Skip to content

Commit

Permalink
fix bug 437: Affichage des pwg_high (popup-window size )
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@1468 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
chrisaga committed Jul 14, 2006
1 parent 484d251 commit 81126f9
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion include/scripts.js
Expand Up @@ -40,9 +40,32 @@ for( i=0; i<len; i++)
}
}

function verifieAndOpen()
{
var ok=1;
if (!img.complete)
{
// sometime the image loading is not complete
// especially with KHTML and Opera
setTimeout("verifieAndOpen()",200)
}
else
{
/* give more space for scrollbars (10 for FF, 40 for IE) */
width=img.width +40;
height=img.height +40;
window.open(owURL,owName,owFeatures + ',width=' + width + ',height=' + height);
}
}

function phpWGOpenWindow(theURL,winName,features)
{
window.open(theURL,winName,features);
img = new Image()
img.src = theURL;
owURL=theURL;
owName=winName;
owFeatures=features;
verifieAndOpen();
}

function popuphelp(url)
Expand Down

0 comments on commit 81126f9

Please sign in to comment.