From c726257e9b0ba30a4fabb7c3a6bbfaee23c1fe16 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 22 Jul 2015 17:34:10 +0100 Subject: [PATCH] Show timestamp when you hover over a message --- skins/base/css/molecules/MessageTile.css | 14 +++++++++++++- skins/base/views/molecules/MessageTile.js | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/skins/base/css/molecules/MessageTile.css b/skins/base/css/molecules/MessageTile.css index 45882de6..50a12c3a 100644 --- a/skins/base/css/molecules/MessageTile.css +++ b/skins/base/css/molecules/MessageTile.css @@ -26,7 +26,7 @@ limitations under the License. padding-right: 12px; margin-left: -64px; margin-top: -7px; - float: left; + float: left; } .mx_MessageTile_avatar img { @@ -78,3 +78,15 @@ limitations under the License. .mx_MessageTile_msgOption { float: right; } + +.mx_MessageTimestamp { + display: none; +} + +.mx_MessageTile_last .mx_MessageTimestamp { + display: block; +} + +.mx_MessageTile:hover .mx_MessageTimestamp { + display: block; +} diff --git a/skins/base/views/molecules/MessageTile.js b/skins/base/views/molecules/MessageTile.js index 15901791..d868b143 100644 --- a/skins/base/views/molecules/MessageTile.js +++ b/skins/base/views/molecules/MessageTile.js @@ -57,8 +57,9 @@ module.exports = React.createClass({ mx_MessageTile_notSent: this.props.mxEvent.status == 'not_sent', mx_MessageTile_highlight: this.shouldHighlight(), mx_MessageTile_continuation: this.props.continuation, + mx_MessageTile_last: this.props.last }); - var timestamp = this.props.last ? : null; + var timestamp = var avatar, sender, resend; if (!this.props.continuation) { avatar = ( @@ -84,4 +85,3 @@ module.exports = React.createClass({ ); }, }); -