MDL-21400 converted message JS to new coding style, I was unable to test this because th UI is a bit borked now

This commit is contained in:
Petr Skoda
2010-02-06 12:38:07 +00:00
parent 789ff38c47
commit 5f3bf83fd5
5 changed files with 34 additions and 41 deletions
+2 -4
View File
@@ -76,9 +76,7 @@ if ($messages ) {
}
}
$PAGE->requires->js('/message/message.js')->in_head();
$PAGE->requires->js_function_call('refresh_parent_messages_frame');
$PAGE->requires->data_for_js('chatmessages', Array('msgcount'=>count($jsmessages), 'msg'=>$jsmessages))->in_head();
$PAGE->requires->js_init_call('M.core_message.init_refresh_parent_frame', array($jsmessages, $jsmessages));
echo $OUTPUT->header();
if (!empty($playbeep)) {
@@ -87,7 +85,7 @@ if (!empty($playbeep)) {
}
// Javascript for Mozilla to cope with the redirect bug from editor being on in this page
$PAGE->requires->js_function_call('refresh_page', Array(($wait*1000), "refresh.php?id=$userid&name=".urlencode($userfullname)."&wait=$wait"));
$PAGE->requires->js_init_call('M.core_message.init_refresh_page', array(($wait*1000), "refresh.php?id=$userid&name=".urlencode($userfullname)."&wait=$wait"));
echo $OUTPUT->footer();