aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorMichael Meer <michael@meer.name>2014-01-30 10:21:21 +0100
committerMichael Meer <michael@meer.name>2014-01-30 10:21:21 +0100
commite5d1e20ff50f49909e7df6fe7efe0d7488e58eaa (patch)
treea3e0b7d7e1f9a4a8a2af39d5c8fad8d62f0411a3 /view/tpl
parentef97a454bbccbd9f7e0e63180c365ed3227fe42c (diff)
parent6c6a9b963a925d33b2cc436d877a4edc5f0d59b1 (diff)
downloadvolse-hubzilla-e5d1e20ff50f49909e7df6fe7efe0d7488e58eaa.tar.gz
volse-hubzilla-e5d1e20ff50f49909e7df6fe7efe0d7488e58eaa.tar.bz2
volse-hubzilla-e5d1e20ff50f49909e7df6fe7efe0d7488e58eaa.zip
Merge branch 'master' of https://github.com/friendica/red
to be in sync with master repro
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/chat.tpl58
-rw-r--r--view/tpl/chatroom_new.tpl12
-rw-r--r--view/tpl/chatroomlist.tpl2
-rw-r--r--view/tpl/item_attach.tpl2
4 files changed, 72 insertions, 2 deletions
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
new file mode 100644
index 000000000..13862c339
--- /dev/null
+++ b/view/tpl/chat.tpl
@@ -0,0 +1,58 @@
+<div id="chatContainer" style="height: 100%; width: 100%; position: absolute; right: 0; bottom: 0;">
+
+ <div id="chatTopBar" style="float: left; height: 80%;"></div>
+ <div id="chatLineHolder"></div>
+
+ <div id="chatUsers" style="float: right; width: 120px; height: 100%; border: 1px solid #000;" ></div>
+
+ <div class="clear"></div>
+ <div id="chatBottomBar" style="position: absolute; bottom: 0; height: 150px;">
+ <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}};
+var last_chat = 0;
+var chat_timer = null;
+
+$('#chat-form').submit(function(ev) {
+ $('body').css('cursor','wait');
+ $.post("chatsvc", $('#chat-form').serialize(),function(data) {
+ if(chat_timer) clearTimeout(chat_timer);
+ load_chats();
+ $('body').css('cursor','auto');
+ },'json');
+ ev.preventDefault();
+});
+
+function load_chats() {
+
+ $.get("chatsvc?f=&room_id=" + room_id + '&last=' + last_chat,function(data) {
+ if(data.success) {
+ update_inroom(data.inroom);
+ update_chats(data.chats);
+ });
+ }
+
+ chat_timer = setTimeout(load_chats,10000);
+
+}
+
+function update_inroom(inroom) {
+
+}
+
+function update_chats(chats) {
+
+}
+
+</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}}
diff --git a/view/tpl/item_attach.tpl b/view/tpl/item_attach.tpl
index 25c127a15..7dc8dfd59 100644
--- a/view/tpl/item_attach.tpl
+++ b/view/tpl/item_attach.tpl
@@ -1,6 +1,6 @@
+<div class="clear"></div>
<div class="body-attach">
{{foreach $attaches as $a}}
<a href="{{$a.url}}" title="{{$a.title}}" class="attachlink" ><i class="icon-paper-clip attach-icons attach-clip"></i><i class="{{$a.icon}} attach-icons"></i></a>
{{/foreach}}
-<div class="clear"></div>
</div>