1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40: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> <p class="info">{lang}wcf.global.noItems{/lang}</p>
{/if} {/if}
{include file='footer'} {include file='footer'}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -167,22 +167,6 @@ public function send() {
return $returnValues['returnValues']; 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. * Validates getting messages.
*/ */
@ -200,6 +184,25 @@ public function validateGetMessages() {
if ($this->parameters['room'] === null) throw new \wcf\system\exception\IllegalLinkException(); 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() { public function validateSendAttachment() {
// read user data // read user data
$this->parameters['userData']['color1'] = WCF::getUser()->chatColor1; $this->parameters['userData']['color1'] = WCF::getUser()->chatColor1;
@ -243,6 +246,9 @@ public function validateSendAttachment() {
} }
} }
/**
* Creates a message linked to an attachment
*/
public function sendAttachment() { public function sendAttachment() {
$this->parameters['type'] = Message::TYPE_ATTACHMENT; $this->parameters['type'] = Message::TYPE_ATTACHMENT;
$this->parameters['text'] = '[attach]'. $this->parameters['objectID'] .'[/attach]'; $this->parameters['text'] = '[attach]'. $this->parameters['objectID'] .'[/attach]';

View File

@ -32,7 +32,7 @@ class CopyrightPage extends \wcf\page\AbstractPage {
public $templateName = '__copyright'; public $templateName = '__copyright';
/** /**
* @see \wcf\page\IPage::assignVariables() * @see \wcf\page\IPage::assignVariables()
*/ */
public function assignVariables() { public function assignVariables() {
parent::assignVariables(); parent::assignVariables();

View File

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

View File

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

View File

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