diff --git a/scripts/communication/template/communication.css b/scripts/communication/template/communication.css index 9ec6ebde9b0..2b57d1b6ed4 100644 --- a/scripts/communication/template/communication.css +++ b/scripts/communication/template/communication.css @@ -73,10 +73,12 @@ ul, li, .date_time { font-style: italic; + padding-right: 0px; + font-size: 11px; } .message { - padding-top: 5px; + padding-top: 2px; } .tab-content { @@ -157,10 +159,16 @@ a:hover, a:visited { } .scroller-right { - float: right; + float: right; } .scroller-left { - float: left; + float: left; } +.message-height { + padding-right: 0px; +} + + + diff --git a/scripts/communication/template/communication.js b/scripts/communication/template/communication.js index 36a93c70f8a..835f31150c6 100644 --- a/scripts/communication/template/communication.js +++ b/scripts/communication/template/communication.js @@ -14,15 +14,16 @@ var events_module = { // builds the message to be displayed message = utils.build_message( msg ); - + // append only for non empty messages if (msg.data.length > 0) { utils.append_message( $el_all_messages, message ); + utils.vertical_center_align_gravatar( '#all_messages' ); // adding message to build full chat history - utils.store_append_message( uid, message ); + utils.store_append_message( uid, $el_all_messages.html() ); } // updates the user session storage with all the messages - sessionStorage['broadcast'] = $el_all_messages.html(); + sessionStorage[uid] = $el_all_messages.html(); // show the last item by scrolling to the end utils.fancyscroll_to_last( $("#all_chat_tab") ); // Alert user if needed @@ -71,6 +72,7 @@ var events_module = { var room = utils.check_room_by_roomname( click_events.connected_room, msg.chatroom ); $el_room_msg = $( '#all_messages_' + room.id ); utils.append_message( $el_room_msg, utils.build_message( msg ) ); + utils.vertical_center_align_gravatar( '#all_messages_' + room.id ); utils.fancyscroll_to_last( $( "#galaxy_tabroom_" + room.id ) ); // if the pushed message is for some other user, show notification if (uid !== msg.data) { @@ -368,7 +370,7 @@ var utils = { '