mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'm22_MDL-32388' of git://github.com/danmarsden/moodle into MOODLE_22_STABLE
This commit is contained in:
commit
0656d45fbc
1 changed files with 9 additions and 8 deletions
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue