aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-10 10:02:13 +1100
committerfriendica <info@friendica.com>2014-02-10 10:02:13 +1100
commit9f6d0a2676b6eeba2458eff4d98d735a20360d04 (patch)
treeba2a87b3a1a6bfc6252e78919b1240ea6f2d25f7
parentb58baa5e4a80657f7b0c7848f16fd12714e4a11a (diff)
parent3ad9cf67c6e28f41c191dea52fac664471e5b107 (diff)
downloadvolse-hubzilla-9f6d0a2676b6eeba2458eff4d98d735a20360d04.tar.gz
volse-hubzilla-9f6d0a2676b6eeba2458eff4d98d735a20360d04.tar.bz2
volse-hubzilla-9f6d0a2676b6eeba2458eff4d98d735a20360d04.zip
Merge pull request #307 from git-marijus/master
theming chat a little
-rw-r--r--view/css/mod_chat.css28
-rw-r--r--view/theme/redbasic/css/style.css9
-rw-r--r--view/tpl/chat.tpl7
3 files changed, 39 insertions, 5 deletions
diff --git a/view/css/mod_chat.css b/view/css/mod_chat.css
index ce6e59af1..7963fbbd6 100644
--- a/view/css/mod_chat.css
+++ b/view/css/mod_chat.css
@@ -27,5 +27,29 @@
section {
padding-bottom: 0;
}
-
- \ No newline at end of file
+
+.chat-item {
+ padding: 3px;
+}
+
+.chat-item-end {
+ clear: both;
+}
+
+.chat-item-photo {
+ float: left;
+ height: 32px;
+ width: 32px;
+}
+
+.chat-body {
+ float: left;
+ width: 80%;
+ margin-left: 15px;
+}
+
+.chat-item-text {
+ float: left;
+ padding: 3px;
+ display: inline-block;
+}
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 6164407e8..78fdac0cd 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -2455,8 +2455,17 @@ img.mail-list-sender-photo {
.abook-self {
background-color: #ffdddd;
}
+
.online-now {
color: red;
cursor: pointer;
}
+.chat-item-photo {
+ border-radius: $radiuspx;
+}
+
+.chat-item-text {
+ border-radius: $radiuspx;
+ background-color: #eee;
+}
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index 7073a0a52..51aeb836e 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -1,5 +1,5 @@
<h1>{{$room_name}}</h1>
-<div id="chatContainer"">
+<div id="chatContainer">
<div id="chatTopBar">
<div id="chatLineHolder"></div>
@@ -64,7 +64,7 @@ function update_inroom(inroom) {
$.each( inroom, function(index, item) {
var newNode = document.createElement('div');
$(newNode).html('<img style="height: 32px; width: 32px;" src="' + item.img + '" alt="' + item.name + '" /> ' + item.status + '<br />' + item.name + '<br/>');
- html.appendChild(newNode);
+ html.appendChild(newNode);
});
$('#chatUsers').html(html);
}
@@ -75,7 +75,8 @@ function update_chats(chats) {
$.each( chats, function(index, item) {
last_chat = item.id;
var newNode = document.createElement('div');
- $(newNode).html('<div style="margin-bottom: 5px; clear: both;"><img style="height: 32px; width: 32px; float: left;" src="' + item.img + '" alt="' + item.name + '" /><div class="chat-body" style="float: left; width: 80%; margin-left: 15px; font-size: 14px;">' + item.name + ' <span class="autotime" title="' + item.isotime + '">' + item.localtime + '</span><br />' + item.text + '</div></div>');
+ newNode.setAttribute('class', 'chat-item');
+ $(newNode).html('<img class="chat-item-photo" src="' + item.img + '" alt="' + item.name + '" /><div class="chat-body"><span class="chat-item-name">' + item.name + ' </span><span class="autotime chat-item-time" title="' + item.isotime + '">' + item.localtime + '</span><br /><span class="chat-item-text">' + item.text + '</span></div><div class="chat-item-end"></div>');
$('#chatLineHolder').append(newNode);
$(".autotime").timeago();