diff options
author | marijus <mario@localhost.localdomain> | 2014-01-30 09:57:31 +0100 |
---|---|---|
committer | marijus <mario@localhost.localdomain> | 2014-01-30 09:57:31 +0100 |
commit | 91e9e3be91e9fd6ba73085066d34a4c6daf27ee9 (patch) | |
tree | aa53cc5185c5b1a58f0bb8e30609da6bcdc0b5ad /view/tpl | |
parent | 5e952e3738293ce24309fddaff04350e735e449a (diff) | |
parent | 080928f214c9f83879f1578e05baa6032fa2b7b8 (diff) | |
download | volse-hubzilla-91e9e3be91e9fd6ba73085066d34a4c6daf27ee9.tar.gz volse-hubzilla-91e9e3be91e9fd6ba73085066d34a4c6daf27ee9.tar.bz2 volse-hubzilla-91e9e3be91e9fd6ba73085066d34a4c6daf27ee9.zip |
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'view/tpl')
-rw-r--r-- | view/tpl/chat.tpl | 43 | ||||
-rw-r--r-- | view/tpl/chatroom_new.tpl | 12 | ||||
-rw-r--r-- | view/tpl/chatroomlist.tpl | 2 |
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}} |