Skip to content

Commit

Permalink
"MDL-8642, setting of auto scrolling"
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng committed Jun 18, 2008
1 parent 654b0ca commit 55737c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lang/en_utf8/chat.php
@@ -1,7 +1,7 @@
<?PHP // $Id$
// chat.php - created with Moodle 1.7 beta + (2006101003)


$string['autoscroll'] = 'Auto Scroll';
$string['beep'] = 'beep';
$string['chat:chat'] = 'Talk in a chat';
$string['chat:deletelog'] = 'Delete chat logs';
Expand Down
7 changes: 4 additions & 3 deletions mod/chat/gui_header_js/chatinput.php
Expand Up @@ -50,9 +50,10 @@ function enableForm() {

?>
<form action="../empty.php" method="post" target="empty" id="inputForm"
onsubmit="return empty_field_and_submit()">
&gt;&gt;<input type="text" id="input_chat_message" name="chat_message" size="60" value="" />
<?php helpbutton('chatting', get_string('helpchatting', 'chat'), 'chat', true, false); ?>
onsubmit="return empty_field_and_submit()" style="margin:0">
<input type="text" id="input_chat_message" name="chat_message" size="50" value="" />
<?php helpbutton('chatting', get_string('helpchatting', 'chat'), 'chat', true, false); ?><br />
<input type="checkbox" id="auto" size="50" value="" checked /><?php echo get_string('autoscroll', 'chat');?>
</form>

<form action="insert.php" method="post" target="empty" id="sendForm">
Expand Down
3 changes: 2 additions & 1 deletion mod/chat/gui_header_js/jsupdate.php
Expand Up @@ -141,8 +141,9 @@
}
}
?>
if(parent.msg)
if(parent.msg && parent.input.document.getElementById('auto').checked){
parent.msg.scroll(1,5000000);
}
//]]>
</script>
</head>
Expand Down

0 comments on commit 55737c8

Please sign in to comment.