MDL-24659 - correct a bug with the navbar + popups - thanks djeeg

This commit is contained in:
Piers Harding
2010-10-20 22:40:09 +00:00
parent 5450f7b6c5
commit d1cf56e783
2 changed files with 17 additions and 8 deletions
+15 -7
View File
@@ -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);
}
+2 -1
View File
@@ -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);