1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Remove chat log from frontend

This commit is a preparation for moving the chat log into ACP
This commit is contained in:
Maximilian Mader 2013-06-22 16:44:10 +02:00
parent 8fe56d9e01
commit 6fa0d3a3f2
5 changed files with 13 additions and 55 deletions

View File

@ -22,5 +22,12 @@
<permissions>admin.chat.canAddRoom</permissions>
<showorder>2</showorder>
</acpmenuitem>
<acpmenuitem name="chat.acp.menu.link.log">
<controller><![CDATA[chat\acp\page\MessageLogListPage]]></controller>
<parent>chat.acp.menu.link.chat</parent>
<permissions>admin.chat.canReadLog</permissions>
<showorder>4</showorder>
</acpmenuitem>
</import>
</data>

View File

@ -1,35 +0,0 @@
###
# be.bastelstu.WCF.Chat.Log
#
# @author Tim Düsterhus
# @copyright 2010-2013 Tim Düsterhus
# @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
# @package be.bastelstu.chat
###
(($, window) ->
be.bastelstu.Chat.Log = be.bastelstu.Chat.extend
init: (@chat) ->
handleMessages: (messages) ->
# Insert the messages
for message in messages
@events.newMessage.fire message
output = @chat.messageTemplate.fetch message
li = $ '<li></li>'
li.addClass 'timsChatMessage timsChatMessage'+message.type
li.addClass 'ownMessage' if message.sender is WCF.User.userID
li.append output
li.appendTo $ '#timsChatLog .timsChatMessageContainer > ul'
be.bastelstu.Chat.Log.loadOverlay = () ->
if !$.wcfIsset 'timsChatLogDialog'
container = $ '<fieldset id="timsChatLogDialog"></fieldset>'
$('#content').append container
# TODO: Proper path
$('#timsChatLogDialog').load 'http://127.0.0.1/wbb/wbb4/index.php/Chat/Log/1-Hauptchat/', () ->
WCF.showDialog 'timsChatLogDialog',
title: 'Log'
)(jQuery, @)

View File

@ -50,12 +50,6 @@
title: '<img width="246" height="90" alt="" src="{$__wcf->getPath("chat")|encodeJS}images/chatLogo.png"> {if SHOW_VERSION_NUMBER} {PACKAGE_VERSION}{/if}'
});
});
$('#chatLogLink').click(function (event) {
event.preventDefault();
be.bastelstu.Chat.Log.loadOverlay();
});
});
})(jQuery, this);
//]]>
@ -85,7 +79,6 @@
<body id="tpl{$templateName|ucfirst}">
{capture assign='sidebar'}{include application='chat' file='sidebar'}{/capture}
{capture assign='headerNavigation'}{include application='chat' file='navigationInclude'}{/capture}
{include file='header' sandbox=false sidebarOrientation='right'}
<div id="timsChatTopic" class="container{if $room->topic|language === ''} empty{/if}">{$room->topic|language}</div>

View File

@ -1,7 +0,0 @@
{if $__wcf->session->getPermission('mod.chat.canReadLog')}
<li>
<a id="chatLogLink" title="{lang}chat.general.protocol{/lang}" class="jsTooltip">
<span class="icon icon16 icon-eye-open"></span> <span>{lang}chat.general.protocol{/lang}</span>
</a>
</li>
{/if}

View File

@ -80,12 +80,6 @@
<defaultvalue>0</defaultvalue>
<admindefaultvalue>1</admindefaultvalue>
</option>
<option name="mod.chat.canReadLog">
<categoryname>mod.chat</categoryname>
<optiontype>boolean</optiontype>
<defaultvalue>0</defaultvalue>
<admindefaultvalue>1</admindefaultvalue>
</option>
<option name="admin.chat.canAddRoom">
<categoryname>admin.chat</categoryname>
<optiontype>boolean</optiontype>
@ -104,6 +98,12 @@
<defaultvalue>0</defaultvalue>
<admindefaultvalue>1</admindefaultvalue>
</option>
<option name="admin.chat.canReadLog">
<categoryname>admin.chat</categoryname>
<optiontype>boolean</optiontype>
<defaultvalue>0</defaultvalue>
<admindefaultvalue>1</admindefaultvalue>
</option>
</options>
</import>
</data>