Skip to content

Commit

Permalink
Merge branch 'm22_MDL-32388' of git://github.com/danmarsden/moodle in…
Browse files Browse the repository at this point in the history
…to MOODLE_22_STABLE
  • Loading branch information
Sam Hemelryk committed Apr 16, 2012
2 parents 98a4be5 + 2ed2d8c commit 0656d45
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions mod/scorm/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

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;
Expand All @@ -22,13 +30,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;
}
}

0 comments on commit 0656d45

Please sign in to comment.