aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/chat.tpl43
-rw-r--r--view/tpl/chatroom_new.tpl12
-rw-r--r--view/tpl/chatroomlist.tpl2
3 files changed, 56 insertions, 1 deletions
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
new file mode 100644
index 000000000..d0f9418a0
--- /dev/null
+++ b/view/tpl/chat.tpl
@@ -0,0 +1,43 @@
+<div id="chatContainer">
+
+ <div id="chatTopBar" class="rounded"></div>
+ <div id="chatLineHolder"></div>
+
+ <div id="chatUsers" class="rounded"></div>
+
+ <div id="chatBottomBar" class="rounded">
+ <div class="tip"></div>
+
+ <form id="chat-form" method="post" action="#">
+ <input type="hidden" name="room_id" value="{{$room_id}}" />
+ <textarea id="chatText" name="chat_text" rows=3 cols=80></textarea><br />
+ <input type="submit" name="submit" value="{{$submit}}" />
+ </form>
+
+ </div>
+
+</div>
+
+<script>
+var room_id = {{$room_id}};
+
+$('#chat-form').submit(function(ev) {
+ $('body').css('cursor','wait');
+ $.post("chatsvc", $('#chat-form').serialize(),function(data) {
+ load_chats(data);
+ $('body').css('cursor','auto');
+ },'json');
+ ev.preventDefault();
+});
+
+function load_chats(data) {
+ var chat_data = data;
+ if(! data) {
+ $.get("chatsvc?f=&room_id=" + room_id,function(data) {
+ chat_data = $this;
+ });
+ }
+
+
+}
+</script>
diff --git a/view/tpl/chatroom_new.tpl b/view/tpl/chatroom_new.tpl
new file mode 100644
index 000000000..86eadb132
--- /dev/null
+++ b/view/tpl/chatroom_new.tpl
@@ -0,0 +1,12 @@
+<h1>{{$header}}</h1>
+
+<form action="chat" method="post" >
+{{include file="field_input.tpl" field=$name}}
+<br />
+<br />
+{{$acl}}
+<div class="clear"></div>
+<input type="submit" name="submit" value="{{$submit}}" />
+</form>
+
+
diff --git a/view/tpl/chatroomlist.tpl b/view/tpl/chatroomlist.tpl
index d2cf4d7b0..c26ba0c33 100644
--- a/view/tpl/chatroomlist.tpl
+++ b/view/tpl/chatroomlist.tpl
@@ -3,7 +3,7 @@
{{if $items}}
<table>
{{foreach $items as $item}}
-<tr><td>{{$item.cr_name}}</td><td>{{$item.cr_inroom}}</td></tr>
+<tr><td align="left"><a href="{{$baseurl}}/chat/{{$nickname}}/{{$item.cr_id}}">{{$item.cr_name}}</a></td><td align="right">{{$item.cr_inroom}}</td></tr>
{{/foreach}}
</table>
{{/if}}