From bb06484732a30dd6fedf9419836b3438926f9738 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 20 Jul 2015 08:24:38 -0700 Subject: [PATCH] fix up MemberInfo behaviour --- skins/base/css/molecules/MemberInfo.css | 14 ++++++++++++-- skins/base/views/molecules/MemberInfo.js | 11 +++++++++++ skins/base/views/organisms/MemberList.js | 14 +++++++++++++- skins/base/views/organisms/RoomView.js | 2 +- skins/base/views/templates/Register.js | 2 +- 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/skins/base/css/molecules/MemberInfo.css b/skins/base/css/molecules/MemberInfo.css index 32442305..db41c51e 100644 --- a/skins/base/css/molecules/MemberInfo.css +++ b/skins/base/css/molecules/MemberInfo.css @@ -22,7 +22,7 @@ limitations under the License. position: absolute; width: 200px; margin-left: -295px; - margin-top: -12px; + margin-top: 0px; z-index: 1000; padding: 6px; } @@ -34,6 +34,17 @@ limitations under the License. top: 0px; } +/* + * a hacky shim to extend the hitmask of the overlay to overlap + * better with the main menu itself + */ +.mx_MemberInfo_shim { + position: absolute; + left: 212px; + width: 40px; + height: 100%; +} + .mx_MemberInfo_avatar { padding: 6px; } @@ -44,7 +55,6 @@ limitations under the License. .mx_MemberInfo_field { padding: 6px; - font-weight: bold; } .mx_MemberInfo_button { diff --git a/skins/base/views/molecules/MemberInfo.js b/skins/base/views/molecules/MemberInfo.js index d8559dbb..3a81185b 100644 --- a/skins/base/views/molecules/MemberInfo.js +++ b/skins/base/views/molecules/MemberInfo.js @@ -25,6 +25,16 @@ module.exports = React.createClass({ displayName: 'MemberInfo', mixins: [MemberInfoController], + componentDidMount: function() { + var self = this; + + var memberInfo = this.getDOMNode(); + var memberListScroll = document.getElementsByClassName("mx_MemberList_border")[0]; + if (memberListScroll) { + memberInfo.style.top = (memberInfo.parentElement.offsetTop - memberListScroll.scrollTop) + "px"; + } + }, + getDuration: function(time) { if (!time) return; var t = parseInt(time / 1000); @@ -61,6 +71,7 @@ module.exports = React.createClass({ return (
+
-
+

Members

{this.makeMemberTiles()} diff --git a/skins/base/views/organisms/RoomView.js b/skins/base/views/organisms/RoomView.js index a93937f0..9130dcc0 100644 --- a/skins/base/views/organisms/RoomView.js +++ b/skins/base/views/organisms/RoomView.js @@ -109,7 +109,7 @@ module.exports = React.createClass({
-
+
diff --git a/skins/base/views/templates/Register.js b/skins/base/views/templates/Register.js index 346b40f8..784db4cf 100644 --- a/skins/base/views/templates/Register.js +++ b/skins/base/views/templates/Register.js @@ -182,7 +182,7 @@ module.exports = React.createClass({
- vector + vector
{this.registerContent()}