mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Made message marking functional
This commit is contained in:
parent
72d6c48236
commit
d9842fcb8d
@ -270,6 +270,19 @@ Toggle fullscreen mode.
|
||||
$('html').addClass 'fullscreen'
|
||||
else
|
||||
$('html').removeClass 'fullscreen'
|
||||
|
||||
|
||||
Toggle checkboxes
|
||||
|
||||
$('#timsChatMark').click (event) ->
|
||||
$('.timsChatMessageContainer').toggleClass 'markEnabled'
|
||||
|
||||
$(document).on 'click', '.timsChatMessage :checkbox', (event) ->
|
||||
if $(this).is ':checked'
|
||||
$(this).parents('.timsChatMessage').addClass('jsMarked')
|
||||
else
|
||||
$(this).parents('.timsChatMessage').removeClass('jsMarked')
|
||||
|
||||
|
||||
Scroll down when autoscroll is being activated.
|
||||
|
||||
@ -517,8 +530,7 @@ Build HTML of new user and append it.
|
||||
li.attr 'title', user.awayStatus
|
||||
li.data 'username', user.username
|
||||
|
||||
li.append @userTemplate.fetch
|
||||
user: user
|
||||
li.append @userTemplate.fetch user
|
||||
|
||||
menu = $ '<ul></ul>'
|
||||
menu.addClass 'dropdownMenu'
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?php
|
||||
namespace chat\page;
|
||||
use \wcf\system\exception\IllegalLinkException;
|
||||
use \wcf\system\WCF;
|
||||
|
||||
/**
|
||||
* Shows information about Tims chat.
|
||||
@ -39,9 +37,9 @@ class CopyrightPage extends \wcf\page\AbstractPage {
|
||||
public function assignVariables() {
|
||||
parent::assignVariables();
|
||||
|
||||
$images = explode("\n\n", file_get_contents(__FILE__, null, null, __COMPILER_HALT_OFFSET__+2));
|
||||
$images = explode("\n\n", file_get_contents(__FILE__, null, null, __COMPILER_HALT_OFFSET__ + 2));
|
||||
|
||||
WCF::getTPL()->assign(array(
|
||||
\wcf\system\WCF::getTPL()->assign(array(
|
||||
'background' => str_replace("\n", '', $images[array_rand($images)])
|
||||
));
|
||||
}
|
||||
|
@ -29,26 +29,60 @@
|
||||
height: 200px;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
display: none;
|
||||
|
||||
&.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&.markEnabled {
|
||||
ul {
|
||||
.timsChatMessage {
|
||||
&.jsMarked {
|
||||
background-color: @wcfSelectedBackgroundColor;
|
||||
color: @wcfSelectedColor;
|
||||
}
|
||||
|
||||
> {
|
||||
.markContainer {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
display: table;
|
||||
width: 100%;
|
||||
|
||||
|
||||
.timsChatMessage {
|
||||
min-height: 16px;
|
||||
display: table-row;
|
||||
.transition(opacity, .2s);
|
||||
|
||||
.username {
|
||||
font-weight: bold;
|
||||
&.unloaded {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
&::before {
|
||||
.icon;
|
||||
.icon16;
|
||||
}
|
||||
|
||||
&:nth-child(even) {
|
||||
background-color: @wcfContainerAccentBackgroundColor;
|
||||
}
|
||||
|
||||
> {
|
||||
time, .usernameContainer, .text {
|
||||
.markContainer, time, .usernameContainer, .text {
|
||||
display: table-cell;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.markContainer {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
time {
|
||||
&::before {
|
||||
content: "[";
|
||||
@ -63,25 +97,13 @@
|
||||
min-width: 100px;
|
||||
padding: 0px 5px;
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&.unloaded {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
&::before {
|
||||
.icon;
|
||||
.icon16;
|
||||
}
|
||||
|
||||
&:nth-child(even) {
|
||||
background-color: @wcfContainerAccentBackgroundColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
messageURL: '{link application="chat" controller="NewMessages"}{/link}',
|
||||
socketIOPath: '{@CHAT_SOCKET_IO_PATH|encodeJS}'
|
||||
},
|
||||
new WCF.Template('{ldelim}$title} - {'chat.general.title'|language|encodeJS} - {PAGE_TITLE|language|encodeJS}'),
|
||||
new WCF.Template('{ldelim}$title} - {"chat.general.title"|language|encodeJS} - {PAGE_TITLE|language|encodeJS}'),
|
||||
new WCF.Template('{@$messageTemplate|encodeJS}'),
|
||||
new WCF.Template('{@$userTemplate|encodeJS}')
|
||||
);
|
||||
@ -97,7 +97,7 @@
|
||||
<div>
|
||||
<p id="timsChatTopic" class="container{if $room->topic|language === ''} empty{/if}">{$room->topic|language}</p>
|
||||
|
||||
<div id="timsChatMessageContainer" class="timsChatMessageContainer marginTop container">
|
||||
<div id="timsChatMessageContainer" class="timsChatMessageContainer marginTop container active">
|
||||
<p class="error noJsOnly" style="display: none;">{lang}chat.general.noJs{/lang}</p>
|
||||
<ul>
|
||||
</ul>
|
||||
|
@ -1 +1 @@
|
||||
{literal}<time>{@$formattedTime}</time> <span class="usernameContainer"><span class="username">{@$formattedUsername}</span><span class="separator">{$separator}</span></span> <span class="text">{@$formattedMessage}</span>{/literal}
|
||||
{literal}<time>{@$formattedTime}</time> <span class="usernameContainer"><span class="username">{@$formattedUsername}</span><span class="separator">{$separator}</span></span> <span class="text">{@$formattedMessage}</span> <span class="markContainer"><input type="checkbox" value="{@$messageID}" /></span>{/literal}
|
@ -2,7 +2,7 @@
|
||||
<nav class="timsChatSidebarTabs">
|
||||
<ul>
|
||||
<li id="toggleUsers" class="active"><a title="{lang}chat.general.users{/lang}">{lang}chat.general.users{/lang} <span class="badge">0</span></a></li>
|
||||
<li id="toggleRooms"><a title="{lang}chat.general.rooms{/lang}" data-refresh-url="{link application='chat' controller='RoomList'}{/link}">{lang}chat.general.rooms{/lang} <span class="badge">{#$rooms|count}</span><span class="ajaxLoad icon icon32 icon-spinner"></span></a></li>
|
||||
<li id="toggleRooms"><a title="{lang}chat.general.rooms{/lang}">{lang}chat.general.rooms{/lang} <span class="badge">{#$rooms|count}</span><span class="ajaxLoad icon icon32 icon-spinner"></span></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
@ -1 +1 @@
|
||||
{literal}<a class="dropdownToggle userLink" data-user-id="{$user.userID.toString()}">{@$user.avatar['24']} {$user.username}</a>{/literal}
|
||||
{literal}<a class="dropdownToggle userLink" data-user-id="{$userID.toString()}">{@$avatar['24']} {$username}</a>{/literal}
|
Loading…
Reference in New Issue
Block a user