Fixing glossary in lp_view see BT#4391

skala
Julio Montoya 12 years ago
parent 41030371eb
commit b34e52cb97
  1. 50
      main/newscorm/scorm_api.php

@ -1819,28 +1819,28 @@ function attach_glossary_into_scorm(type) {
$("iframe").contents().find("body").append('<div id="div_show_id"><div id="div_content_id">&nbsp;</div></div>'); $("iframe").contents().find("body").append('<div id="div_show_id"><div id="div_content_id">&nbsp;</div></div>');
show_dialog = $("iframe").contents().find("div#"+div_show_id); show_dialog = $("iframe").contents().find("div#"+div_show_id);
show_description = $("iframe").contents().find("div#"+div_content_id); show_description = $("iframe").contents().find("div#"+div_content_id);
var $target = $(this);
if ($("#learning_path_left_zone").is(':visible') ) { var $target = $(this);
var extra_left = $("#learning_path_left_zone").width() + 20;
} else { if ($("#learning_path_left_zone").is(':visible') ) {
var extra_left = 0; var extra_left = $("#learning_path_left_zone").width() + 20;
} } else {
var extra_left = 0;
//$("#"+div_show_id).dialog("destroy"); }
show_dialog.dialog({
autoOpen: false, //$("#"+div_show_id).dialog("destroy");
width: 600, show_dialog.dialog({
height: 200, autoOpen: false,
position: { my: 'left top', at: 'right top', of: $target, offset: extra_left+", 0"}, width: 600,
close: function(){ height: 200,
show_dialog.remove(); position: { my: 'left top', at: 'right top', of: $target, offset: extra_left+", 0"},
show_description.remove(); close: function(){
} show_dialog.remove();
}); show_description.remove();
}
});
notebook_id=$(this).attr("name"); notebook_id=$(this).attr("name");
data_notebook=notebook_id.split("link"); data_notebook=notebook_id.split("link");
@ -1859,8 +1859,7 @@ function attach_glossary_into_scorm(type) {
} }
}); });
} else { } else {
if ('manual') { if ('manual') {
//$("iframe").contents().find("body .glossary").mouseover(function(){
$("iframe").contents().find("body").on("click", ".glossary", function() { $("iframe").contents().find("body").on("click", ".glossary", function() {
is_glossary_name = $(this).html(); is_glossary_name = $(this).html();
@ -1905,8 +1904,9 @@ function attach_glossary_into_scorm(type) {
show_description.html(data); show_description.html(data);
show_dialog.dialog("open"); show_dialog.dialog("open");
} }
}); });
});
});
} }
} }
} }
Loading…
Cancel
Save