MDL-24659 - correct a bug with the navbar + popups - thanks djeeg
This commit is contained in:
+15
-7
@@ -112,17 +112,25 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc
|
||||
if (!window_name && node.title != null) {
|
||||
obj.setAttribute('data', url_prefix + node.title);
|
||||
}
|
||||
if (window_name) {
|
||||
var mine = window.open('','','width=1,height=1,left=0,top=0,scrollbars=no');
|
||||
if(! mine) {
|
||||
alert(M.str.scorm.popupsblocked);
|
||||
}
|
||||
mine.close()
|
||||
if (window_name) {
|
||||
var mine = window.open('','','width=1,height=1,left=0,top=0,scrollbars=no');
|
||||
if(! mine) {
|
||||
alert(M.str.scorm.popupsblocked);
|
||||
}
|
||||
mine.close()
|
||||
}
|
||||
}
|
||||
var old = YAHOO.util.Dom.get('scorm_object');
|
||||
if (old) {
|
||||
content.replaceChild(obj, old);
|
||||
if(window_name) {
|
||||
var cwidth = scormplayerdata.cwidth;
|
||||
var cheight = scormplayerdata.cheight;
|
||||
var poptions = scormplayerdata.popupoptions;
|
||||
scorm_openpopup("loadSCO.php?" + node.title, window_name, poptions, cwidth, cheight);
|
||||
}
|
||||
else {
|
||||
content.replaceChild(obj, old);
|
||||
}
|
||||
} else {
|
||||
content.appendChild(obj);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,8 @@
|
||||
|
||||
$PAGE->set_button($exitlink);
|
||||
|
||||
$PAGE->requires->data_for_js('scormplayerdata', Array('cwidth'=>$scorm->width,'cheight'=>$scorm->height), true);
|
||||
$PAGE->requires->data_for_js('scormplayerdata', Array('cwidth'=>$scorm->width,'cheight'=>$scorm->height,
|
||||
'popupoptions' => $scorm->options), true);
|
||||
$PAGE->requires->js('/mod/scorm/request.js', true);
|
||||
$PAGE->requires->js('/lib/cookies.js', true);
|
||||
//$PAGE->requires->js('/mod/scorm/loaddatamodel.php?id='.$cm->id.$scoidstr.$modestr.$attemptstr, true);
|
||||
|
||||
Reference in New Issue
Block a user