Merge branch 'master' into reactsdk-unfork

This commit is contained in:
David Baker 2015-09-28 11:32:40 +01:00
commit 91c0df4450
4 changed files with 4 additions and 55 deletions

View File

@ -34,15 +34,6 @@ h2 {
margin-bottom: 16px;
}
/* FIXME: show them on hoverover, and fix for firefox */
::-webkit-scrollbar {
display: none;
}
html {
overflow: -moz-scrollbars-none;
}
.mx_ContextualMenu_background {
position: fixed;
top: 0;
@ -153,4 +144,4 @@ html {
font-weight: bold;
font-size: 20px;
line-height: 1.4;
}
}

View File

@ -1,30 +0,0 @@
/*
Copyright 2015 OpenMarket Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';
var React = require('react');
module.exports = React.createClass({
displayName: 'ContextualMenu',
render: function() {
return (
<div className="mx_ContextualMenu">
</div>
);
}
});

View File

@ -128,9 +128,9 @@ module.exports = React.createClass({
if (this.state.hover || this.state.menu) {
var presence;
// FIXME: make presence data update whenever User.presence changes...
var active = this.props.member.user ? (this.props.member.user.lastActiveAgo || -1) : -1;
var active = this.props.member.user ? ((Date.now() - (this.props.member.user.lastPresenceTs - this.props.member.user.lastActiveAgo)) || -1) : -1;
if (active >= 0) {
presence = <div className="mx_MemberTile_presence">{ this.getPrettyPresence(this.props.member.user) } for { this.getDuration(active) }</div>;
presence = <div className="mx_MemberTile_presence">{ this.getPrettyPresence(this.props.member.user) } { this.getDuration(active) } ago</div>;
}
else {
presence = <div className="mx_MemberTile_presence">{ this.getPrettyPresence(this.props.member.user) }</div>;

View File

@ -32,18 +32,6 @@ module.exports = React.createClass({
return { editing: false };
},
// FIXME: combine this more nicely with the MemberInfo positioning stuff...
onMemberListScroll: function(ev) {
if (this.refs.memberListScroll) {
var memberListScroll = this.refs.memberListScroll.getDOMNode();
// offset the current MemberInfo bubble
var memberInfo = document.getElementsByClassName("mx_MemberInfo")[0];
if (memberInfo) {
memberInfo.style.top = (memberInfo.parentElement.offsetTop - memberListScroll.scrollTop) + "px";
}
}
},
makeMemberTiles: function() {
var MemberTile = sdk.getComponent("molecules.MemberTile");
@ -97,7 +85,7 @@ module.exports = React.createClass({
<div className="mx_MemberList_chevron">
<img src="img/chevron.png" width="24" height="13"/>
</div>
<div className="mx_MemberList_border" ref="memberListScroll" onScroll={ this.onMemberListScroll }>
<div className="mx_MemberList_border">
<h2>Members</h2>
<div className="mx_MemberList_wrapper">
{this.makeMemberTiles()}