87 lines
3.5 KiB
HTML
Executable File
87 lines
3.5 KiB
HTML
Executable File
<template name="chatbar">
|
|
<div id="{{id}}" {{visibility name}} class="component">
|
|
<div name="chatBodyContainer" class="chatBodyContainer">
|
|
{{#if inPrivateChat}}
|
|
<div class="privateChatTab" name="privatechatTab">
|
|
{{> makeButton id="close" btn_class="secondary tiny round toPublic " i_class="ion-ios-arrow-left" rel="tooltip"
|
|
data_placement="bottom" title="Back to public" label="Public"}}
|
|
<div class="privateChatName" name="privateChatName">
|
|
{{privateChatName}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
<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>
|
|
</div>
|
|
{{#if userExists}}
|
|
<div class="panel-footer">{{> chatInput}}</div>
|
|
{{/if}}
|
|
</div>
|
|
</template>
|
|
|
|
<template name="chatInput">
|
|
<div id="chatInput" class="chat-input-wrapper">
|
|
{{#if inPrivateChat}}
|
|
{{#if privateChatDisabled}}
|
|
<textarea id="newMessageInput" class="disabledChat" placeholder="Private chat is temporarily locked (disabled)" rel="tooltip" data-placement="top" title="Private chat is temporarily locked" disabled></textarea>
|
|
{{else}}
|
|
{{> chatInputControls}}
|
|
{{/if}}
|
|
{{else}}
|
|
{{#if publicChatDisabled}}
|
|
<textarea id="newMessageInput" class="disabledChat" placeholder="Public chat is temporarily locked (disabled)" rel="tooltip" data-placement="top" title="Public chat is temporarily locked" disabled></textarea>
|
|
{{else}}
|
|
{{> chatInputControls}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
</template>
|
|
|
|
<template name="chatInputControls">
|
|
<div class="button-group radius">
|
|
<textarea id="newMessageInput" rel="tooltip" data-placement="top" title="Write a new message"></textarea>
|
|
<input type="submit" id="sendMessageButton" class="button radius" rel="tooltip" data-placement="top" value="Send" />
|
|
</div>
|
|
</template>
|
|
|
|
<!-- Displays and styles an individual message in the chat -->
|
|
<template name="message">
|
|
<span style="float:left;">
|
|
{{#if message.from_username}}
|
|
<span class="userNameEntry" rel="tooltip" data-placement="bottom" title="{{message.from_username}}">
|
|
{{message.from_username}}
|
|
</span>
|
|
{{/if}}
|
|
</span>
|
|
<span style="float:right;">
|
|
{{#if message.from_time}}
|
|
<span {{messageFontSize}}>{{toClockTime message.from_time}}</span>
|
|
<span {{messageFontSize}} class="glyphicon glyphicon-time"></span>
|
|
{{/if}}
|
|
</span>
|
|
<br/>
|
|
<div style="color:{{colourToHex message.from_color}}">{{{sanitizeAndFormat message.message}}}</div>
|
|
{{autoscroll}}
|
|
</template>
|
|
|
|
<template name="optionsFontSize">
|
|
<fieldset class="desktopSettingsFieldset">
|
|
<legend><span class="chatOptionsText" >Chat Message Font Size</span><br/></legend>
|
|
<table id="fontSizeTable" align="center">
|
|
<tr>
|
|
<td>{{> makeButton id="decreaseFontSize" btn_class="displayButtons" i_class="fi-minus" rel="tooltip" title="Decrease Font Size"}}</td>
|
|
<td id="displayLabel"><label class="fontSizeLabel" {{messageFontSize}} >Size({{getInSession "messageFontSize"}})</label></td>
|
|
<td>{{> makeButton id="increaseFontSize" btn_class="displayButtons" i_class="fi-plus" rel="tooltip" title="Increase Font Size"}}</td>
|
|
</tr>
|
|
</table>
|
|
</fieldset>
|
|
</template>
|