MDL-32388 SCORM: Fix chrome pop-ups

This commit is contained in:
Dan Marsden
2012-04-11 21:07:31 +12:00
parent 4b3ee4fc55
commit 133e7f3dd8
+8 -7
View File
@@ -1,4 +1,12 @@
function scorm_openpopup(url,name,options,width,height) {
if (width<=100) {
width = Math.round(screen.availWidth * width / 100);
}
if (height<=100) {
height = Math.round(screen.availHeight * height / 100);
}
options += ",width="+width+",height="+height;
windowobj = window.open(url,name,options);
if (!windowobj) {
return;
@@ -7,13 +15,6 @@ function scorm_openpopup(url,name,options,width,height) {
// Fullscreen
windowobj.moveTo(0,0);
}
if (width<=100) {
width = Math.round(screen.availWidth * width / 100);
}
if (height<=100) {
height = Math.round(screen.availHeight * height / 100);
}
windowobj.resizeTo(width,height);
windowobj.focus();
return windowobj;
}