From c593e0edef570ffb3e45d3d50f003780b19674c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaussoin=20Timoth=C3=A9e?= Date: Thu, 26 Mar 2015 23:54:55 +0100 Subject: [PATCH] - Fix the chat publish button - Fix the post create CSS - Add the Room Add button all the time in the chat header --- app/widgets/Chat/Chat.php | 2 +- app/widgets/Chat/_chat.tpl | 2 +- app/widgets/Chat/_chat_header.tpl | 9 ++++++++- app/widgets/Chat/_chat_header_room.tpl | 9 ++++++++- app/widgets/Chat/chat.js | 10 ---------- app/widgets/Post/_post_create.tpl | 2 +- composer.json | 1 + linker.php | 6 +++--- themes/material/css/style.css | 5 +++++ 9 files changed, 28 insertions(+), 18 deletions(-) diff --git a/app/widgets/Chat/Chat.php b/app/widgets/Chat/Chat.php index 252cbc234..93aee80c6 100644 --- a/app/widgets/Chat/Chat.php +++ b/app/widgets/Chat/Chat.php @@ -147,7 +147,7 @@ class Chat extends WidgetCommon RPC::call('MovimTpl.scrollPanel'); RPC::call('MovimTpl.showPanel'); - $this->prepareMessages($room); + $this->prepareMessages($room, true); } /** diff --git a/app/widgets/Chat/_chat.tpl b/app/widgets/Chat/_chat.tpl index 9f3783611..d434e81b8 100644 --- a/app/widgets/Chat/_chat.tpl +++ b/app/widgets/Chat/_chat.tpl @@ -10,7 +10,7 @@ {$c->ajaxSmileyGet('😃')} -
+
diff --git a/app/widgets/Chat/_chat_header.tpl b/app/widgets/Chat/_chat_header.tpl index 096acfc17..efb40d0cb 100644 --- a/app/widgets/Chat/_chat_header.tpl +++ b/app/widgets/Chat/_chat_header.tpl @@ -1,6 +1,13 @@
+
    +
  • + + + +
  • +
-

{$c->__('page.chats')}

+

{$c->__('page.chats')}

    diff --git a/app/widgets/Chat/_chat_header_room.tpl b/app/widgets/Chat/_chat_header_room.tpl index 105a01751..9be96c9c6 100644 --- a/app/widgets/Chat/_chat_header_room.tpl +++ b/app/widgets/Chat/_chat_header_room.tpl @@ -1,6 +1,13 @@
    +
      +
    • + + + +
    • +
    -

    {$c->__('page.chats')}

    +

    {$c->__('page.chats')}

      diff --git a/app/widgets/Chat/chat.js b/app/widgets/Chat/chat.js index ca8074db6..5177603ad 100644 --- a/app/widgets/Chat/chat.js +++ b/app/widgets/Chat/chat.js @@ -56,7 +56,6 @@ var Chat = { id = message.jidfrom + '_conversation'; bubble.querySelector('div').innerHTML = message.body; bubble.querySelector('span.info').innerHTML = message.published; - console.log(message.color); bubble.querySelector('span.user').className = 'user ' + message.color; bubble.querySelector('span.user').innerHTML = message.resource; } else { @@ -72,15 +71,6 @@ var Chat = { bubble.querySelector('div.bubble span.info').innerHTML = message.published; } - /* - bubble.querySelector('div.bubble div').innerHTML = message.body; - if(message.type == 'groupchat') { - bubble.querySelector('div.bubble div').innerHTML = '' + message.resource + ': ' + message.body; - bubble.querySelector('div.bubble').className = 'bubble room'; - } else { - - }*/ - movim_append(id, bubble.outerHTML); MovimTpl.scrollPanel(); diff --git a/app/widgets/Post/_post_create.tpl b/app/widgets/Post/_post_create.tpl index 56cc4319c..603e7c982 100644 --- a/app/widgets/Post/_post_create.tpl +++ b/app/widgets/Post/_post_create.tpl @@ -1,4 +1,4 @@ - +
      diff --git a/composer.json b/composer.json index e208a566c..2a20d5490 100755 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "cboden/ratchet": "0.3.*", "react/child-process": "0.5.*@dev", "ratchet/pawl": "dev-master", + "react/socket-client": "0.4.*@dev", "forxer/Gravatar": "~1.2", "respect/validation": "0.8.*" diff --git a/linker.php b/linker.php index ba71d19fc..98463048a 100755 --- a/linker.php +++ b/linker.php @@ -45,7 +45,7 @@ $connector($config->websocketurl, array('xmpp'))->then(function($conn) use (&$st $conn->on('message', function($message) use ($conn, $loop) { if($message != '') { - fwrite(STDERR, colorize($message, 'yellow')." : ".colorize('received', 'green')."\n"); + #fwrite(STDERR, colorize($message, 'yellow')." : ".colorize('received', 'green')."\n"); if($message == '') { $conn->close(); @@ -76,7 +76,7 @@ $connector($config->websocketurl, array('xmpp'))->then(function($conn) use (&$st } if(!empty($xml)) { - fwrite(STDERR, colorize(trim($xml), 'yellow')." : ".colorize('sent to XMPP', 'green')."\n"); + #fwrite(STDERR, colorize(trim($xml), 'yellow')." : ".colorize('sent to XMPP', 'green')."\n"); $conn->send(trim($xml)); } } @@ -118,7 +118,7 @@ $connector($config->websocketurl, array('xmpp'))->then(function($conn) use (&$st \Moxl\API::clear(); if(!empty($xml)) { - fwrite(STDERR, colorize(trim($xml), 'yellow')." : ".colorize('sent to XMPP', 'green')."\n"); + #fwrite(STDERR, colorize(trim($xml), 'yellow')." : ".colorize('sent to XMPP', 'green')."\n"); $conn->send(trim($xml)); } diff --git a/themes/material/css/style.css b/themes/material/css/style.css index 1a3579a89..2a6ce3f87 100644 --- a/themes/material/css/style.css +++ b/themes/material/css/style.css @@ -771,6 +771,11 @@ dl dd { padding-right: 2rem; box-sizing: border-box; } + + .padded_top_bottom { + padding: 0 2rem; + box-sizing: border-box; + } } /* Divided */