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

Fix formatting

This commit is contained in:
Tim Düsterhus 2014-02-28 17:06:50 +01:00
parent 40bc1163f4
commit f4c294a77c
59 changed files with 101 additions and 96 deletions

View File

@ -163,5 +163,4 @@
<p class="info">{lang}wcf.global.noItems{/lang}</p>
{/if}
{include file='footer'}

View File

@ -15,7 +15,6 @@
{/if}
{/if}
<header class="boxHeadline">
<h1>{lang}{@$pageTitle}{/lang}</h1>
</header>

View File

@ -27,6 +27,7 @@
</nav>
{/hascontent}
</div>
{if $objects|count}
<section id="roomList" class="container containerPadding sortableListContainer marginTop">
<ol class="sortableList" data-object-id="0">

View File

@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php
namespace be\bastelstu\chat;
/**
* Builds the Chat
*

View File

@ -56,5 +56,6 @@ public function execute() {
));
}
}
$install = new Install();
$install->execute();

View File

@ -52,5 +52,6 @@ public function execute() {
}
}
}
$update = new Update();
$update->execute();

View File

@ -167,22 +167,6 @@ public function send() {
return $returnValues['returnValues'];
}
/**
* Fetches messages in between the specified timestamps.
*
* @return array Array containing message table, containerID and information about an empty message table.
*/
public function getMessages() {
// read messages
$messages = ViewableMessageList::getMessagesBetween($this->parameters['room'], $this->parameters['start'], $this->parameters['end']);
return array(
'noMessages' => (count($messages) == 0) ? true : null,
'containerID' => $this->parameters['containerID'],
'template' => WCF::getTPL()->fetch('__messageLogTable', 'chat', array('messages' => $messages), true)
);
}
/**
* Validates getting messages.
*/
@ -200,6 +184,25 @@ public function validateGetMessages() {
if ($this->parameters['room'] === null) throw new \wcf\system\exception\IllegalLinkException();
}
/**
* Fetches messages in between the specified timestamps.
*
* @return array Array containing message table, containerID and information about an empty message table.
*/
public function getMessages() {
// read messages
$messages = ViewableMessageList::getMessagesBetween($this->parameters['room'], $this->parameters['start'], $this->parameters['end']);
return array(
'noMessages' => (count($messages) == 0) ? true : null,
'containerID' => $this->parameters['containerID'],
'template' => WCF::getTPL()->fetch('__messageLogTable', 'chat', array('messages' => $messages), true)
);
}
/**
* Validates setting an attachment.
*/
public function validateSendAttachment() {
// read user data
$this->parameters['userData']['color1'] = WCF::getUser()->chatColor1;
@ -243,6 +246,9 @@ public function validateSendAttachment() {
}
}
/**
* Creates a message linked to an attachment
*/
public function sendAttachment() {
$this->parameters['type'] = Message::TYPE_ATTACHMENT;
$this->parameters['text'] = '[attach]'. $this->parameters['objectID'] .'[/attach]';

View File

@ -48,10 +48,6 @@ public function canDownload($objectID) {
return false;
}
public function canPreview($objectID) {
return $this->canDownload($objectID);
}
/**
* @see wcf\system\attachment\IAttachmentObjectType::canUpload()
*/

View File

@ -3,7 +3,7 @@
<head>
<title>{if $room}{$room} - {/if}{lang}chat.global.title{/lang} - {PAGE_TITLE|language}</title>
{include file='headInclude' sandbox=false}
{include file='headInclude'}
{if $room}
{include file='javascriptInclude' application='chat'}
<script data-relocate="true">

View File

@ -6,6 +6,7 @@
</ul>
</div>
</fieldset>
<fieldset id="timsChatRoomListContainer">
<legend>{lang}chat.global.rooms{/lang}</legend>
<div id="timsChatRoomList">