Browse Source
- Continue the implementation of the Chat
- Continue the implementation of the Chat
- Fix the navigation panel (new organisation) - Fix the Roster - Contact edit and Contac deletepull/16/head
25 changed files with 346 additions and 58 deletions
-
7app/assets/js/movim_tpl.js
-
2app/assets/js/movim_websocket.js
-
4app/views/chat.tpl
-
113app/widgets/Chat/Chat.php
-
67app/widgets/Chat/_chat.tpl
-
15app/widgets/Chat/_chat_header.tpl
-
21app/widgets/Chat/_chat_messages.tpl
-
26app/widgets/Chat/_chat_smiley.tpl
-
16app/widgets/Chat/chat.js
-
13app/widgets/Chat/locales.ini
-
12app/widgets/Chats/Chats.php
-
0app/widgets/Chats/_chats.tpl
-
0app/widgets/Chats/chats.tpl
-
2app/widgets/Contact/_contact_delete.tpl
-
4app/widgets/Contact/_contact_edit.tpl
-
2app/widgets/Contact/locales.ini
-
2app/widgets/Dialog/dialog.tpl
-
3app/widgets/Header/_header_chat.tpl
-
2app/widgets/Navigation/navigation.tpl
-
3app/widgets/Presence/_presence_list.tpl
-
4app/widgets/Roster/_roster_search.tpl
-
4themes/material/css/color.css
-
3themes/material/css/form.css
-
7themes/material/css/list.css
-
72themes/material/css/style.css
@ -1,17 +1,50 @@ |
|||
<ul class="thick"> |
|||
{loop="$messages"} |
|||
<li {if="$value->jidfrom == $jid"}class="oppose"{/if}> |
|||
<span class="icon bubble"> |
|||
{if="$value->jidfrom == $jid"} |
|||
<img src="{$contact->getPhoto('s')}"> |
|||
{else} |
|||
<img src="{$me->getPhoto('s')}"> |
|||
{/if} |
|||
</span> |
|||
<div class="bubble"> |
|||
{$value->body|prepareString} |
|||
<span class="info">{$value->delivered|strtotime|prepareDate}</span> |
|||
</div> |
|||
</li> |
|||
{/loop} |
|||
</ul> |
|||
<div id="{$jid}_discussion" class="actions fixed contained"> |
|||
<div id="{$jid}_messages"> |
|||
{$messages} |
|||
</div> |
|||
<div> |
|||
<ul> |
|||
<li> |
|||
<span class="icon gray"> |
|||
<i class="md md-create"></i> |
|||
</span> |
|||
<div class="control" onclick="{$smiley}"> |
|||
<i class="md md-mood"></i> |
|||
</div> |
|||
<form> |
|||
<div> |
|||
<textarea |
|||
rows="1" |
|||
id="textarea{$contact->jid}" |
|||
onkeypress=" |
|||
if(event.keyCode == 13) { |
|||
state = 0; |
|||
{$send} |
|||
return false; |
|||
} else { |
|||
if(state == 0 || state == 2) { |
|||
state = 1; |
|||
{$composing} |
|||
since = new Date().getTime(); |
|||
} |
|||
} |
|||
" |
|||
onkeyup=" |
|||
movim_textarea_autoheight(this); |
|||
setTimeout(function() |
|||
{ |
|||
if(state == 1 && since+5000 < new Date().getTime()) { |
|||
state = 2; |
|||
{$paused} |
|||
} |
|||
},5000); |
|||
" |
|||
placeholder="{$c->__('chat.placeholder')}" |
|||
></textarea> |
|||
<label>Your message</label> |
|||
</div> |
|||
</form> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
@ -0,0 +1,21 @@ |
|||
<ul class="thick"> |
|||
{loop="$messages"} |
|||
<li {if="$value->jidfrom == $jid"}class="oppose"{/if}> |
|||
<span class="icon bubble"> |
|||
{if="$value->jidfrom == $jid"} |
|||
<img src="{$contact->getPhoto('s')}"> |
|||
{else} |
|||
<img src="{$me->getPhoto('s')}"> |
|||
{/if} |
|||
</span> |
|||
<div class="bubble"> |
|||
{if="preg_match('#^\?OTR#', $value->body)"} |
|||
<i class="md md-lock"></i> {$c->__('message.encrypted')} |
|||
{else} |
|||
{$value->body|prepareString} |
|||
{/if} |
|||
<span class="info">{$value->delivered|strtotime|prepareDate}</span> |
|||
</div> |
|||
</li> |
|||
{/loop} |
|||
</ul> |
@ -0,0 +1,26 @@ |
|||
<section> |
|||
<h3>{$c->__('chat.smileys')}</h3> |
|||
<table> |
|||
<tr> |
|||
<td>1</td> |
|||
<td>2</td> |
|||
<td>3</td> |
|||
<td>1</td> |
|||
<td>2</td> |
|||
<td>3</td> |
|||
</tr> |
|||
<tr> |
|||
<td>1</td> |
|||
<td>2</td> |
|||
<td>3</td> |
|||
<td>1</td> |
|||
<td>2</td> |
|||
<td>3</td> |
|||
</tr> |
|||
</table> |
|||
</section> |
|||
<div> |
|||
<a onclick="Dialog.clear()" class="button flat"> |
|||
{$c->__('button.close')} |
|||
</a> |
|||
</div> |
@ -0,0 +1,16 @@ |
|||
var Chats = { |
|||
message: function(jid, html) { |
|||
movim_append('messages' + jid, html); |
|||
Chats.scroll(jid); |
|||
}, |
|||
addSmiley: function(smiley) { |
|||
|
|||
}, |
|||
sendMessage: function(n, jid) |
|||
{ |
|||
var text = n.value; |
|||
n.value = ""; |
|||
n.focus(); |
|||
return encodeURIComponent(text); |
|||
}, |
|||
} |
@ -0,0 +1,13 @@ |
|||
[message] |
|||
message.published = 'Message Published' |
|||
message.encrypted = 'Encrypted message' |
|||
message.composing = 'Composing...' |
|||
message.paused = 'Paused...' |
|||
|
|||
[chat] |
|||
chat.attention = '%s needs your attention' |
|||
chat.placeholder = 'Your message here...' |
|||
chat.smileys = 'Smileys' |
|||
|
|||
chatroom.connected = 'Connected to the chatroom' |
|||
chatroom.disconnected = 'Disconnected from the chatroom' |
@ -0,0 +1,12 @@ |
|||
<?php |
|||
|
|||
class Chats extends WidgetCommon |
|||
{ |
|||
function load() |
|||
{ |
|||
} |
|||
|
|||
function display() |
|||
{ |
|||
} |
|||
} |
@ -1 +1 @@ |
|||
<div id="dialog" class="dialog"></div> |
|||
<div id="dialog" class="dialog actions"></div> |
@ -1,6 +1,5 @@ |
|||
<header> |
|||
<header id="header"> |
|||
<span id="menu" class="on_mobile icon" onclick="MovimTpl.showMenu()"><i class="md md-menu"></i></span> |
|||
<span id="back" class="on_mobile icon" onclick="MovimTpl.hidePanel()"><i class="md md-arrow-back"></i></span> |
|||
<span class="on_desktop icon"><i class="md md-forum"></i></span> |
|||
<h2>{$c->__('page.chats')}</h2> |
|||
</header> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue