aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-03-30 14:31:55 +0200
committerMario Vavti <mario@mariovavti.com>2016-03-30 14:31:55 +0200
commit5462453bf2bde50166c68f90b08d24826dd07ba8 (patch)
tree8951f8c1f38cb9847419fce8874a89325da6fe54 /view
parente4f360505466d4701ea4ac8f8bec18fac5b4c3ec (diff)
downloadvolse-hubzilla-5462453bf2bde50166c68f90b08d24826dd07ba8.tar.gz
volse-hubzilla-5462453bf2bde50166c68f90b08d24826dd07ba8.tar.bz2
volse-hubzilla-5462453bf2bde50166c68f90b08d24826dd07ba8.zip
some work on mod chat
Diffstat (limited to 'view')
-rw-r--r--view/css/mod_chat.css23
-rw-r--r--view/js/mod_chat.js2
-rw-r--r--view/pdl/mod_chat.pdl3
-rw-r--r--view/theme/redbasic/css/style.css1
-rw-r--r--view/tpl/chat.tpl2
-rw-r--r--view/tpl/chatroom_new.tpl24
-rw-r--r--view/tpl/chatroomlist.tpl16
-rw-r--r--view/tpl/chatrooms.tpl47
8 files changed, 84 insertions, 34 deletions
diff --git a/view/css/mod_chat.css b/view/css/mod_chat.css
index ded4b0ceb..c59d8d459 100644
--- a/view/css/mod_chat.css
+++ b/view/css/mod_chat.css
@@ -1,3 +1,26 @@
+#chatroom-new {
+ display: none;
+}
+
+#chatrooms-index {
+ width: 100%;
+}
+
+#chatrooms-index th:nth-child(1),
+#chatrooms-index td:nth-child(1){
+ padding: 7px 3px 7px 10px;
+}
+
+#chatrooms-index th:nth-child(3),
+#chatrooms-index td:nth-child(3){
+ padding: 7px 10px 7px 7px;
+}
+
+.chatrooms-index-tool {
+ padding: 7px 10px;
+}
+
+
#chatContainer {
height: 100%;
width: 100%;
diff --git a/view/js/mod_chat.js b/view/js/mod_chat.js
index 6c432742f..0d47e3e77 100644
--- a/view/js/mod_chat.js
+++ b/view/js/mod_chat.js
@@ -15,4 +15,4 @@ $(document).ready(function() {
$('#jot-public').show();
}
}).trigger('change');
-}); \ No newline at end of file
+});
diff --git a/view/pdl/mod_chat.pdl b/view/pdl/mod_chat.pdl
index cdc66dd3d..564199bed 100644
--- a/view/pdl/mod_chat.pdl
+++ b/view/pdl/mod_chat.pdl
@@ -1,5 +1,6 @@
[region=aside]
-[widget=profile][/widget]
+[widget=vcard][/widget]
+[widget=chatroom_list][/widget]
[widget=bookmarkedchats][/widget]
[widget=suggestedchats][/widget]
[/region]
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 424055fbf..b92fe5afe 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1510,6 +1510,7 @@ nav .dropdown-menu {
word-wrap: break-word;
}
+.chatroom-index-row:hover td,
.locs-index-row:hover td,
[id^="cloud-index-"]:hover td,
.cloud-index-active {
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index 18576fd56..5ea1ae22e 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -5,7 +5,7 @@
<form id="chat-destroy" method="post" action="chat">
<input type="hidden" name="room_name" value="{{$room_name}}" />
<input type="hidden" name="action" value="drop" />
- <input type="submit" name="submit" value="{{$drop}}" onclick="return confirmDelete();"/>
+ <input type="submit" name="submit" value="{{$drop}}" onclick="return confirmDelete();"/>
</form>
</div>
{{/if}}
diff --git a/view/tpl/chatroom_new.tpl b/view/tpl/chatroom_new.tpl
index c64f21c97..8acff2ff5 100644
--- a/view/tpl/chatroom_new.tpl
+++ b/view/tpl/chatroom_new.tpl
@@ -1,14 +1,12 @@
-<div class="generic-content-wrapper-styled">
-<h1>{{$header}}</h1>
-
-<form action="chat" method="post" >
-{{include file="field_input.tpl" field=$name}}
-{{include file="field_input.tpl" field=$chat_expire}}
-<button id="dbtn-acl" class="btn btn-default" data-toggle="modal" data-target="#aclModal" onclick="return false;" >{{$permissions}}</button>
-{{$acl}}
-<div class="clear"></div>
-<br />
-<br />
-<input id="dbtn-submit" type="submit" name="submit" value="{{$submit}}" />
-</form>
+<div id="chatroom-new" class="section-content-tools-wrapper">
+ <form action="chat" method="post" >
+ {{include file="field_input.tpl" field=$name}}
+ {{include file="field_input.tpl" field=$chat_expire}}
+ {{$acl}}
+ <div class="btn-group pull-right">
+ <button id="dbtn-acl" class="btn btn-default" data-toggle="modal" data-target="#aclModal" title="{{$permissions}}" onclick="return false;" ><i id="jot-perms-icon" class="icon-{{$lockstate}}"></i></button>
+ <button id="dbtn-submit" class="btn btn-primary" type="submit" name="submit" value="{{$submit}}">{{$submit}}</button>
+ </div>
+ <div class="clear"></div>
+ </form>
</div>
diff --git a/view/tpl/chatroomlist.tpl b/view/tpl/chatroomlist.tpl
index 71fec8200..ac0f7cf9b 100644
--- a/view/tpl/chatroomlist.tpl
+++ b/view/tpl/chatroomlist.tpl
@@ -1,11 +1,11 @@
<div class="widget">
-<h3>{{$header}}</h3>
-{{if $items}}
-<table class="chatroomlist">
-{{foreach $items as $item}}
-<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}}
+ <h3>{{$header}}</h3>
+ {{if $items}}
+ <ul class="nav nav-pills nav-stacked">
+ {{foreach $items as $item}}
+ <li><a href="{{$baseurl}}/chat/{{$nickname}}/{{$item.cr_id}}"><span class="badge pull-right">{{$item.cr_inroom}}</span>{{$item.cr_name}}</a></li>
+ {{/foreach}}
+ </ul>
+ {{/if}}
</div>
diff --git a/view/tpl/chatrooms.tpl b/view/tpl/chatrooms.tpl
index 570aef1c7..c7333efcf 100644
--- a/view/tpl/chatrooms.tpl
+++ b/view/tpl/chatrooms.tpl
@@ -1,12 +1,39 @@
-<div class="generic-content-wrapper-styled">
-<h2>{{$header}}</h2>
-
-{{if $is_owner}}
-<p>
-<span class="btn btn-default"><a href="{{$baseurl}}/chat/{{$nickname}}/new">{{$newroom}}</a></span>
-</p>
-{{/if}}
-
-{{$rooms}}
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ {{if $is_owner}}
+ <button type="button" class="btn btn-success btn-xs pull-right" onclick="openClose('chatroom-new');"><i class="icon-plus-sign"></i>&nbsp;{{$newroom}}</button>
+ {{/if}}
+ <h2>{{$header}}</h2>
+ </div>
+ {{if $is_owner}}
+ {{$chatroom_new}}
+ {{/if}}
+ {{if $rooms}}
+ <div class="section-content-wrapper-np">
+ <table id="chatrooms-index">
+ <tr>
+ <th width="98%">name</th>
+ <th width="1%" class="chatrooms-index-tool"></th>
+ <th width="1%"></th>
+ </tr>
+ {{foreach $rooms as $room}}
+ <tr class="chatroom-index-row">
+ <td><a href="{{$baseurl}}/chat/{{$nickname}}/{{$room.cr_id}}">{{$room.cr_name}}</a></td>
+ <td class="chatrooms-index-tool dropdown">
+ {{if $room.allow_cid || $room.allow_gid || $room.deny_cid || $room.deny_gid}}
+ <i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" onclick="lockview('chatroom',{{$room.cr_id}});"></i>
+ <ul id="panel-{{$room.cr_id}}" class="lockview-panel dropdown-menu"></ul>
+ {{/if}}
+ </td>
+ <td><span class="badge">{{$room.cr_inroom}}</span></td>
+ </tr>
+ {{/foreach}}
+ </table>
+ </div>
+ {{else}}
+ <div class="section-content-wrapper">
+ {{$norooms}}
+ </div>
+ {{/if}}
</div>