diff --git a/src/mibew/libs/classes/Mibew/Controller/Chat/ThreadController.php b/src/mibew/libs/classes/Mibew/Controller/Chat/ThreadController.php new file mode 100644 index 00000000..b573875a --- /dev/null +++ b/src/mibew/libs/classes/Mibew/Controller/Chat/ThreadController.php @@ -0,0 +1,46 @@ +receiveRequest($request->request->get('data')); + $content = ob_get_clean(); + + return $content; + } +} diff --git a/src/mibew/libs/routing.yml b/src/mibew/libs/routing.yml index cf0f9314..3a4bf767 100644 --- a/src/mibew/libs/routing.yml +++ b/src/mibew/libs/routing.yml @@ -1,4 +1,8 @@ # Chat actions +chat_thread_update: + path: /thread/update + defaults: + _controller: Mibew\Controller\Chat\ThreadController::updateAction ## Operator's chat chat_operator: diff --git a/src/mibew/styles/dialogs/default/templates_src/server_side/chat.handlebars b/src/mibew/styles/dialogs/default/templates_src/server_side/chat.handlebars index 22fbd571..1220d7ad 100644 --- a/src/mibew/styles/dialogs/default/templates_src/server_side/chat.handlebars +++ b/src/mibew/styles/dialogs/default/templates_src/server_side/chat.handlebars @@ -77,7 +77,7 @@ jQuery(document).ready(function(){ Mibew.Application.start({ server: { - url: '{{mibewRoot}}/thread.php', + url: '{{mibewRoot}}/thread/update', requestsFrequency: {{frequency}} }, page: { diff --git a/src/mibew/thread.php b/src/mibew/thread.php deleted file mode 100644 index 4f850284..00000000 --- a/src/mibew/thread.php +++ /dev/null @@ -1,21 +0,0 @@ -receiveRequest($_POST['data']);