I was trying to make the glossary link open in the parent window, but

I could not get it to work all the time.
This commit is contained in:
moodler
2004-08-25 08:15:15 +00:00
parent 5b5302faa8
commit cc876bc667
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -603,6 +603,9 @@ function glossary_print_entry_definition($entry) {
if (!empty($entry->highlight)) {
$text = highlight($entry->highlight, $text);
}
if (isset($entry->footer)) { // Unparsed footer info
$text .= $entry->footer;
}
echo $text;
}
+2 -1
View File
@@ -22,7 +22,8 @@
}
foreach ($entries as $key => $entry) {
$entries[$key]->definition .= "<p align=\"right\">&raquo;&nbsp;<a target=\"_blank\" onClick=\"window.opener.location.href='$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid'\" href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\">$entry->glossaryname</a></p>";
//$entries[$key]->footer = "<p align=\"right\">&raquo;&nbsp;<a onClick=\"if (window.opener) {window.opener.location.href='$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid'; return false;} else {openpopup('/mod/glossary/view.php?g=$entry->glossaryid', 'glossary', 'menubar=1,location=1,toolbar=1,scrollbars=1,directories=1,status=1,resizable=1', 0); return false;}\" href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\" target=\"_blank\">$entry->glossaryname</a></p>"; // Could not get this to work satisfactorily in all cases - Martin
$entries[$key]->footer = "<p align=\"right\">&raquo;&nbsp;<a target=\"_blank\" href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\">$entry->glossaryname</a></p>";
}
if (!empty($courseid)) {