2014-06-19 21:29:48 +08:00
|
|
|
<template name="chatbar">
|
2015-02-05 05:20:41 +08:00
|
|
|
<div id="{{id}}" {{visibility name}} class="component">
|
2015-02-10 23:17:26 +08:00
|
|
|
<h3 class="title gradientBar">
|
|
|
|
<span class="glyphicon glyphicon-comment"></span>
|
|
|
|
{{title}}
|
|
|
|
{{> extraConversations}}
|
|
|
|
</h3>
|
|
|
|
{{>tabButtons}} <!-- Display public/options tabs, and private chat tabs -->
|
|
|
|
{{#if getInSession "display_chatPane"}}
|
|
|
|
<div id="chatbody">
|
|
|
|
<ul class="chat" {{messageFontSize}}>
|
|
|
|
{{#each getCombinedMessagesForChat}}
|
|
|
|
{{#if message}}
|
|
|
|
<li>{{> message}}</li>
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
{{#unless userExists}}<li>The user has left</li>{{/unless}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{#if userExists}}
|
|
|
|
<div class="panel-footer">{{> chatInput}}</div>
|
2015-02-05 05:20:41 +08:00
|
|
|
{{/if}}
|
2015-02-10 23:17:26 +08:00
|
|
|
{{else}}
|
|
|
|
{{> optionsBar}}
|
|
|
|
{{/if}}
|
2015-02-05 05:20:41 +08:00
|
|
|
</div>
|
2014-06-19 21:29:48 +08:00
|
|
|
</template>
|
|
|
|
|
2014-08-09 00:04:04 +08:00
|
|
|
<template name="chatInput">
|
2015-01-15 23:50:59 +08:00
|
|
|
<div id="chatInput" class="chat-input-wrapper">
|
2015-02-24 07:29:12 +08:00
|
|
|
<textarea id="newMessageInput" placeholder="Write a message..." rel="tooltip" data-placement="top" title="Write a new message"></textarea>
|
2014-08-09 00:04:04 +08:00
|
|
|
<button type="submit" id="sendMessageButton" class="btn" rel="tooltip" data-placement="top" title="Click to send your message">
|
|
|
|
Send
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2014-08-16 01:17:51 +08:00
|
|
|
<template name="chatOptions">
|
|
|
|
<p>Chat Options:</p>
|
|
|
|
{{> optionsFontSize}}
|
|
|
|
</template>
|
|
|
|
|
2014-10-28 22:30:07 +08:00
|
|
|
<template name="extraConversations">
|
|
|
|
{{#if tooManyConversations}}
|
2014-11-06 23:27:43 +08:00
|
|
|
<div id="MoreChatsDrop" class="btn-group">
|
|
|
|
<button type="button" id="MoreChatsbutton" class="btn btn-default dropdown-toggle" data-toggle="dropdown">More Chats<span class="caret"></span></button>
|
2014-10-28 22:30:07 +08:00
|
|
|
<ul class="dropdown-menu extraConversationScrollableMenu" role="menu">
|
|
|
|
{{#each getExtraConversations}}
|
|
|
|
<li class="extraConversation" id="{{safeName name}}"><a href="#">{{safeName name}}</a></li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</template>
|
|
|
|
|
2014-06-26 23:13:29 +08:00
|
|
|
<!-- Displays and styles an individual message in the chat -->
|
2014-06-19 21:29:48 +08:00
|
|
|
<template name="message">
|
2014-12-18 02:58:57 +08:00
|
|
|
<span style="float:left;">
|
|
|
|
{{#if message.from_username}}
|
2015-02-05 02:01:14 +08:00
|
|
|
<span class="userNameEntry" rel="tooltip" data-placement="bottom" title="{{message.from_username}}">
|
2015-02-21 07:20:03 +08:00
|
|
|
{{message.from_username}}
|
2014-12-18 02:58:57 +08:00
|
|
|
</span>
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
<span style="float:right;">
|
2015-02-05 03:10:45 +08:00
|
|
|
{{#if message.from_time}}
|
2015-03-05 05:33:37 +08:00
|
|
|
<span {{messageFontSize}}>{{toClockTime message.from_time}}</span>
|
|
|
|
<span {{messageFontSize}} class="glyphicon glyphicon-time"></span>
|
2015-02-05 03:10:45 +08:00
|
|
|
{{/if}}
|
2014-12-18 02:58:57 +08:00
|
|
|
</span>
|
|
|
|
<br/>
|
2015-03-05 05:33:37 +08:00
|
|
|
<div style="color:{{colourToHex message.from_color}}">{{{sanitizeAndFormat message.message}}}</div>
|
2014-12-18 02:58:57 +08:00
|
|
|
{{autoscroll}}
|
2014-06-24 21:46:42 +08:00
|
|
|
</template>
|
|
|
|
|
2014-06-26 23:13:29 +08:00
|
|
|
<!-- Displays the list of options available -->
|
2014-06-24 21:46:42 +08:00
|
|
|
<template name="optionsBar">
|
2015-03-10 22:07:23 +08:00
|
|
|
<div class="optionsBar">
|
|
|
|
{{#if thereArePeopletoChatWith}} <!-- There are people we can chat with, display the user list -->
|
|
|
|
<p>Select a person to chat with privately:</p>
|
|
|
|
<div class="private-chat-user-box" rel="tooltip" data-placement="top" title="Select a participant to open a private chat">
|
2015-02-10 23:17:26 +08:00
|
|
|
<div class="private-chat-user-list">
|
|
|
|
{{#each getUsersInMeeting}}
|
2015-03-10 22:07:23 +08:00
|
|
|
{{#unless isCurrentUser userId}}
|
|
|
|
<div class="private-chat-user-entry">
|
2015-02-10 23:17:26 +08:00
|
|
|
{{user.name}}
|
2015-03-10 22:07:23 +08:00
|
|
|
</div>
|
|
|
|
{{/unless}}
|
2015-02-10 23:17:26 +08:00
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-03-10 22:07:23 +08:00
|
|
|
{{else}}
|
|
|
|
<p>There are no participants to chat with right now.</p>
|
|
|
|
{{/if}}
|
|
|
|
<br/>
|
|
|
|
{{> chatOptions}}
|
2015-02-10 23:17:26 +08:00
|
|
|
<br/><br/><br/>
|
2015-03-10 22:07:23 +08:00
|
|
|
</div>
|
2014-08-16 01:17:51 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<template name="optionsFontSize">
|
2015-03-17 21:45:49 +08:00
|
|
|
<div id="fontSizeControl">
|
|
|
|
<span >Chat Message Font Size: </span><br>
|
|
|
|
<button id="decreaseFontSize" class="glyphicon glyphicon-minus" ></button>
|
|
|
|
<label class="fontSizeLabel" >{{getInSession "messageFontSize"}}</label>
|
|
|
|
<button id="increaseFontSize" class="glyphicon glyphicon-plus"></button>
|
|
|
|
</div>
|
2014-06-24 21:46:42 +08:00
|
|
|
</template>
|
2014-06-25 02:36:22 +08:00
|
|
|
|
2014-06-26 23:13:29 +08:00
|
|
|
<!-- Display buttons on the chat tab, public, options, and all the private chat tabs -->
|
2014-06-25 02:36:22 +08:00
|
|
|
<template name="tabButtons">
|
2014-11-06 12:51:01 +08:00
|
|
|
<ul id="tabsList" class="nav nav-tabs">
|
|
|
|
{{#each grabChatTabs}}
|
2015-01-30 01:24:59 +08:00
|
|
|
<li class="{{isTabActive userId}} tab {{makeSafe class}} {{hasGotUnreadMailClass gotMail}}">
|
|
|
|
<a href='#' data-toggle='tab' id="#{{makeSafe name}}">
|
2015-01-30 00:59:32 +08:00
|
|
|
{{#if equals class "privateChatTab"}}
|
|
|
|
<p class="chatNameSelectorPrivate">{{makeSafe name}}</p>
|
2015-01-30 01:53:31 +08:00
|
|
|
<button type="button" class="close closeTab">X</button>
|
2015-01-30 00:59:32 +08:00
|
|
|
{{else}}
|
|
|
|
<p class="chatNameSelectorPublic">{{makeSafe name}}</p>
|
|
|
|
{{/if}}
|
2014-11-06 12:51:01 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
2014-06-25 02:36:22 +08:00
|
|
|
</template>
|