more font size tweaks.
[citadel.git] / webcit / static / t / roomchat.html
index e5de02af384651a4cabc0ed9b5a503263fceb764..b37aa2dacf275c0bedb8b8fd73d8765ac9f70f46 100644 (file)
@@ -1,12 +1,14 @@
-<div id="chatrecv_history" class="chatrecv_history">
-</div>
-<div id="chatrecv" class="chatrecv">
-</div>
-<div id="chatsend" class="chatsend">
-<form method="POST" onsubmit="return chatsendfunc()" action="chat_send" id="chatsendid" name="chatsendform">
-<input type="hidden" name="nonce" value="<?NONCE>">
-<img src="static/citadelchat_16x.gif">
-<input type="text" size="80" maxlength="1024" id="send_this_id" name="send_this">
+<div id="chatrecv_history" class="chatrecv_history_class"></div>
+<div id="chatrecv" class="chatrecv_class"></div>
+<div id="chat_userlist" class="chat_userlist_class"></div>
+<div id="chatsend" class="chatsend_class">
+       <form method="POST" onsubmit="return chatsendfunc()" action="chat_send" id="chatsendid" name="chatsendform">
+       <input type="hidden" name="nonce" value="<?NONCE>">
+       <img src="static/webcit_icons/essen/32x32/chat.png" alt="">
+       <textarea id="send_this_id" name="send_this" rows="4" cols="78"
+               onKeyPress="chat_enter(event);"></textarea>
+       <input type="submit" value="<?_("Send")>">
+       <iframe style="width:0px; height:0px; border: 0px" src="static/roomchat_unload.html"></iframe>
 </div>
 
 <script type="text/javascript">
@@ -18,6 +20,13 @@ function chatsendfunc() {
        return false;
 }
 
+function chat_enter(evt) {
+       var charCode = (evt.which) ? evt.which : window.event.keyCode; 
+       if (charCode == 13) {
+               chatsendfunc();
+       }
+}
+
 new Ajax.PeriodicalUpdater('chatrecv', 'chat_recv', {
        method: 'get', frequency: 2,
                onSuccess: function(){ 
@@ -28,4 +37,8 @@ new Ajax.PeriodicalUpdater('chatrecv', 'chat_recv', {
                }
 });
 
+new Ajax.PeriodicalUpdater('chat_userlist', 'chat_rwho', {
+       method: 'get', frequency: 15
+});
+
 </script>