diff --git a/file/js/TimWolla.WCF.Chat.js b/file/js/TimWolla.WCF.Chat.js index 2aac98f..2ecdcb7 100644 --- a/file/js/TimWolla.WCF.Chat.js +++ b/file/js/TimWolla.WCF.Chat.js @@ -6,10 +6,15 @@ * @license Creative Commons Attribution-NonCommercial-ShareAlike * @package timwolla.wcf.chat */ -if (typeof TimWolla == undefined) var TimWolla = {}; -if (typeof TimWolla.WCF == undefined) var TimWolla.WCF = {}; +if (typeof TimWolla == 'undefined') var TimWolla = {}; +if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {}; -var TimWolla.WCF.Chat = {}; + (function ($, document) { - + TimWolla.WCF.Chat = function(roomID, messageID) { this.init(roomID, messageID); }; + TimWolla.WCF.Chat.prototype = { + init: function(roomID, messageID) { + history.replaceState({}, '', 'index.php/Chat/'+roomID); + } + }; })(jQuery, document); \ No newline at end of file diff --git a/file/lib/page/ChatPage.class.php b/file/lib/page/ChatPage.class.php index f3edb43..e0996f2 100644 --- a/file/lib/page/ChatPage.class.php +++ b/file/lib/page/ChatPage.class.php @@ -1,5 +1,6 @@ assign(array( + 'roomID' => $this->roomID + )); + } + + /** + * @see \wcf\page\IPage::readData() + */ + public function readData() { + parent::readData(); + } + + /** + * @see \wcf\page\IPage::readParameters() + */ + public function readParameters() { + parent::readParameters(); + + if (isset($_GET['id'])) $this->roomID = (int) $_GET['id']; + } + + /** + * @see \wcf\page\IPage::show() */ public function show() { \wcf\system\menu\page\PageMenu::getInstance()->setActiveMenuItem('wcf.header.menu.chat'); diff --git a/template/chat.tpl b/template/chat.tpl index 768628e..4a6eb7f 100644 --- a/template/chat.tpl +++ b/template/chat.tpl @@ -4,6 +4,11 @@ {lang}wcf.chat.title{/lang} - {PAGE_TITLE|language} {include file='headInclude' sandbox=false} +