Skip to content

Commit

Permalink
Merge branch 'MDL-34590_22' of git://github.com/timhunt/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_22_STABLE
  • Loading branch information
danpoltawski committed Aug 6, 2012
2 parents c574b5d + 92b7cdd commit 659a30d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/javascript-static.js
Expand Up @@ -1113,13 +1113,23 @@ function openpopup(event, args) {
if (!args.url.match(/https?:\/\//)) {
fullurl = M.cfg.wwwroot + args.url;
}
if (args.fullscreen) {
args.options = args.options.
replace(/top=\d+/, 'top=0').
replace(/left=\d+/, 'left=0').
replace(/width=\d+/, 'width=' + screen.availWidth).
replace(/height=\d+/, 'height=' + screen.availHeight);
}
var windowobj = window.open(fullurl,args.name,args.options);
if (!windowobj) {
return true;
}

if (args.fullscreen) {
windowobj.moveTo(0,0);
windowobj.resizeTo(screen.availWidth,screen.availHeight);
setTimeout(function() {
windowobj.moveTo(0, 0);
windowobj.resizeTo(screen.availWidth, screen.availHeight)
}, 0);
}
windowobj.focus();

Expand Down

0 comments on commit 659a30d

Please sign in to comment.