Automatically scroll down to show the most recent messages.
authorThomas Lopatic <thomas@lopatic.de>
Tue, 12 Apr 2005 19:04:58 +0000 (19:04 +0000)
committerThomas Lopatic <thomas@lopatic.de>
Tue, 12 Apr 2005 19:04:58 +0000 (19:04 +0000)
lib/tas/data/chat_head.lsp [new file with mode: 0644]
lib/tas/data/chat_recv.lsp
lib/tas/data/index.html

diff --git a/lib/tas/data/chat_head.lsp b/lib/tas/data/chat_head.lsp
new file mode 100644 (file)
index 0000000..61fc3ed
--- /dev/null
@@ -0,0 +1,30 @@
+<?lua
+
+ tas.keep_state()
+
+ tas.add_header_line("Refresh: 5");
+
+ if not channel or channel == "" then
+  channel = "Open"
+ end
+
+ if not nick or nick == "" then
+  nick = "OLSR User"
+ end
+
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+  <head>
+    <title>
+      OLSR Chat Head Window
+    </title>
+  </head>
+  <body>
+
+    <h2>User "<?lua tas.write(nick) ?>" in channel "<?lua tas.write(channel) ?>"</h2>
+
+  </body>
+</html>
index 25f4cb5..fdf8878 100644 (file)
   </head>
   <body>
 
-    <h2>User "<?lua tas.write(nick) ?>" in channel "<?lua tas.write(channel) ?>"</h2>
-    <hr>
-
 <?lua
 
  for i = 0, listLen - 1 do
 
+  if i == listLen - 1 then
+
+?>
+
+ <a name="bottom"></a>
+
+<?lua
+
+  end
+
 ?>
+
     <p>
       <b><?lua tas.write(list[i]["nick"]) ?></b>
       (<a href="http://<?lua tas.write(list[i]["from"]) ?>:<?lua tas.write(httpPort) ?>/pub/profile.html" target="_profile"><?lua tas.write(list[i]["from"]) ?></a>),
index 2884e20..9451614 100644 (file)
@@ -6,8 +6,9 @@
       OLSR Chat
     </title>
   </head>
-  <frameset rows="80%, 20%">
-    <frame src="chat_recv.lsp" name="Receive">
+  <frameset rows="10%, 70%, 20%">
+    <frame src="chat_head.lsp" name="Head">
+    <frame src="chat_recv.lsp#bottom" name="Receive">
     <frame src="chat_send.lsp" name="Send">
   </frameset>
 </html>