1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
movim_ynh/sources/app/widgets/Chat/_chat.tpl
2015-08-10 23:42:45 +02:00

54 lines
2.2 KiB
Smarty

<div id="{$jid}_discussion" class="contained">
<section id="{$jid}_messages">
<ul class="{if="$muc"}thin simple{else}middle{/if}" id="{$jid}_conversation"></ul>
</section>
</div>
<div class="chat_box">
<ul class="thin">
<li class="action">
<span class="icon gray emojis_open" onclick="Chat_ajaxSmiley()">
{$c->ajaxSmileyGet('😃')}
</span>
<div class="action" data-jid="{$jid}" onclick="Chat.sendMessage(this.dataset.jid, {if="$muc"}true{else}false{/if})">
<i class="zmdi zmdi-mail-send"></i>
</div>
<form>
<div>
<textarea
rows="1"
id="chat_textarea"
data-jid="{$jid}"
onkeypress="
if(event.keyCode == 13) {
state = 0;
Chat.sendMessage(this.dataset.jid, {if="$muc"}true{else}false{/if});
return false;
} else {
{if="!$muc"}
if(state == 0 || state == 2) {
state = 1;
{$composing}
since = new Date().getTime();
}
{/if}
}
"
onkeyup="
movim_textarea_autoheight(this);
{if="!$muc"}
setTimeout(function()
{
if(state == 1 && since+5000 < new Date().getTime()) {
state = 2;
{$paused}
}
},5000);
{/if}
"
placeholder="{$c->__('chat.placeholder')}"
></textarea>
</div>
</form>
</li>
</ul>
</div>