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

Remove pagination of RoomList

This commit is contained in:
Tim Düsterhus 2013-04-05 22:23:52 +02:00
parent 035b03024f
commit 6971d32b3c
2 changed files with 23 additions and 9 deletions

View File

@ -4,7 +4,7 @@
//<![CDATA[
$(function() {
new WCF.Action.Delete('\\chat\\data\\room\\RoomAction', $('.chatRoomRow'));
new WCF.Sortable.List('roomList', '\\chat\\data\\room\\RoomAction', {@$startIndex-1});
new WCF.Sortable.List('roomList', '\\chat\\data\\room\\RoomAction');
});
//]]>
</script>
@ -26,7 +26,7 @@
</div>
{hascontent}
<section id="roomList" class="container containerPadding sortableListContainer marginTop shadow">
<ol class="sortableList" data-object-id="0" start="{$startIndex}">
<ol class="sortableList" data-object-id="0">
{content}
{foreach from=$objects item=chatRoom}
<li class="sortableNode sortableNoNesting chatRoomRow" data-object-id="{@$chatRoom->roomID}">

View File

@ -1,5 +1,6 @@
<?php
namespace chat\acp\page;
use \wcf\system\WCF;
/**
* Lists available chatrooms.
@ -10,7 +11,7 @@
* @package be.bastelstu.chat
* @subpackage acp.page
*/
class RoomListPage extends \wcf\page\MultipleLinkPage {
class RoomListPage extends \wcf\page\AbstractPage {
/**
* @see \wcf\page\AbstractPage::$activeMenuItem
*/
@ -25,17 +26,30 @@ class RoomListPage extends \wcf\page\MultipleLinkPage {
);
/**
* @see \wcf\page\MultipleLinkPage::$objectListClassName
* room list
* @var \chat\data\room\RoomListPage
*/
public $objectListClassName = '\chat\data\room\RoomList';
public $objects = null;
/**
* @see \wcf\page\MultipleLinkPage::$sortField
* @see \wcf\page\IPage::readData()
*/
public $sortField = 'position';
public function readData() {
parent::readData();
$this->objects = new \chat\data\room\RoomList();
$this->objects->sqlOrder = 'position ASC';
$this->objects->readObjects();
}
/**
* @see \wcf\page\MultipleLinkPage::$sortOrder
* @see wcf\page\IPage::assignVariables()
*/
public $sortOrder = 'ASC';
public function assignVariables() {
parent::assignVariables();
WCF::getTPL()->assign(array(
'objects' => $this->objects
));
}
}