Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show timestamp when you hover over a message #2

Merged
merged 1 commit into from
Jul 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion skins/base/css/molecules/MessageTile.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions skins/base/views/molecules/MessageTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? <MessageTimestamp ts={this.props.mxEvent.getTs()} /> : null;
var timestamp = <MessageTimestamp ts={this.props.mxEvent.getTs()} />
var avatar, sender, resend;
if (!this.props.continuation) {
avatar = (
Expand All @@ -84,4 +85,3 @@ module.exports = React.createClass({
);
},
});