From 2edd2d9bf1e4111e52769cc2a6e75630a30b9e51 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 20 Aug 2009 13:15:57 +0000 Subject: [PATCH] MDL-19804 Upgraded calls to link_to_popup_window() --- mod/chat/view.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/mod/chat/view.php b/mod/chat/view.php index 8179351ec1..9b17b916c3 100644 --- a/mod/chat/view.php +++ b/mod/chat/view.php @@ -123,14 +123,20 @@ } echo '

'; - link_to_popup_window ($chattarget, - "chat$course->id$chat->id$groupparam", "$strenterchat", 500, 700, get_string('modulename', 'chat')); + $link = html_link::make($chattarget, $strenterchat); + $link->add_action(new popup_action('click', $link->url, "chat$course->id$chat->id$groupparam", array('height' => 500, 'width' => 700))); + $link->title = get_string('modulename', 'chat'); + echo $OUTPUT->link($link); + echo '

'; if ($CFG->enableajax) { echo '

'; - link_to_popup_window ("/mod/chat/gui_ajax/index.php?id=$chat->id$groupparam", - "chat$course->id$chat->id$groupparam", get_string('ajax_gui', 'message'), 500, 700, get_string('modulename', 'chat')); + + $link = html_link::make("/mod/chat/gui_ajax/index.php?id=$chat->id$groupparam", get_string('ajax_gui', 'message')); + $link->add_action(new popup_action('click', $link->url, "chat$course->id$chat->id$groupparam", array('height' => 500, 'width' => 700))); + $link->title = get_string('modulename', 'chat'); + echo $OUTPUT->link($link); echo '

'; } @@ -138,8 +144,10 @@ if ($CFG->chat_method == 'header_js' && empty($USER->screenreader)) { // show frame/js-less alternative echo '

('; - link_to_popup_window ("/mod/chat/gui_basic/index.php?id=$chat->id$groupparam", - "chat$course->id$chat->id$groupparam", get_string('noframesjs', 'message'), 500, 700, get_string('modulename', 'chat')); + $link = html_link::make("/mod/chat/gui_basic/index.php?id=$chat->id$groupparam", get_string('noframesjs', 'message')); + $link->add_action(new popup_action('click', $link->url, "chat$course->id$chat->id$groupparam", array('height' => 500, 'width' => 700))); + $link->title = get_string('modulename', 'chat'); + echo $OUTPUT->link($link); echo ')

'; } -- 2.39.5