glossary MDL-22678 Fixed some issues with glossary entry popups

This commit is contained in:
Andrew Davis 2010-07-21 07:24:06 +00:00
parent ece2c44fe7
commit aa87cde4b5
3 changed files with 6 additions and 4 deletions

View file

@ -136,7 +136,9 @@ function glossary_filter($courseid, $text) {
$encodedconcept = urlencode($concept->concept); $encodedconcept = urlencode($concept->concept);
$title = str_replace('"', "'", strip_tags($glossaryname.': '.$concept->concept)); $title = str_replace('"', "'", strip_tags($glossaryname.': '.$concept->concept));
} }
$link = new moodle_url('/mod/glossary/showentry.php', array('courseid'=>$courseid, 'concept'=>$encodedconcept)); //hardcoding dictionary format in the URL rather than defaulting to the current glossary format which may not work in a popup.
//for example "entry list" means the popup would only contain a link that opens another popup.
$link = new moodle_url('/mod/glossary/showentry.php', array('courseid'=>$courseid, 'concept'=>$encodedconcept, 'displayformat'=>'dictionary'));
$href_tag_begin = html_writer::start_tag('a', array( $href_tag_begin = html_writer::start_tag('a', array(
'href'=>$link, 'href'=>$link,
'title'=>$title, 'title'=>$title,

View file

@ -24,7 +24,7 @@ function glossary_show_entry_entrylist($course, $cm, $glossary, $entry, $mode=''
if ($printicons) { if ($printicons) {
glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook,'print'); glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook,'print');
} }
if ($entry->rating) { if (!empty($entry->rating)) {
echo '<br />'; echo '<br />';
echo '<span class="ratings">'; echo '<span class="ratings">';
$return = glossary_print_entry_ratings($course, $entry); $return = glossary_print_entry_ratings($course, $entry);

View file

@ -62,8 +62,8 @@ YUI.add('moodle-mod_glossary-autolinker', function(Y) {
}, },
readOnly : true readOnly : true
}, },
width : {value : 450}, width : {value : 600},
height : {value : 600}, height : {value : 450},
menubar : {value : false}, menubar : {value : false},
location : {value : false}, location : {value : false},
scrollbars : {value : true}, scrollbars : {value : true},