correct layout for truncated lists
This commit is contained in:
parent
b45e5e6eb5
commit
8ccc3f04c3
2 changed files with 5 additions and 4 deletions
|
@ -35,6 +35,7 @@ module.exports = React.createClass({
|
||||||
name: React.PropTypes.string,
|
name: React.PropTypes.string,
|
||||||
title: React.PropTypes.string,
|
title: React.PropTypes.string,
|
||||||
avatarJsx: React.PropTypes.any, // <BaseAvatar />
|
avatarJsx: React.PropTypes.any, // <BaseAvatar />
|
||||||
|
className: React.PropTypes.string,
|
||||||
presenceState: React.PropTypes.string,
|
presenceState: React.PropTypes.string,
|
||||||
presenceActiveAgo: React.PropTypes.number,
|
presenceActiveAgo: React.PropTypes.number,
|
||||||
showInviteButton: React.PropTypes.bool,
|
showInviteButton: React.PropTypes.bool,
|
||||||
|
@ -76,7 +77,7 @@ module.exports = React.createClass({
|
||||||
render: function() {
|
render: function() {
|
||||||
var presenceClass = PRESENCE_CLASS[this.props.presenceState] || "mx_EntityTile_offline";
|
var presenceClass = PRESENCE_CLASS[this.props.presenceState] || "mx_EntityTile_offline";
|
||||||
var mainClassName = "mx_EntityTile ";
|
var mainClassName = "mx_EntityTile ";
|
||||||
mainClassName += presenceClass;
|
mainClassName += presenceClass + (this.props.className ? (" " + this.props.className) : "");
|
||||||
var nameEl;
|
var nameEl;
|
||||||
|
|
||||||
if (this.state.hover && !this.props.suppressOnHover) {
|
if (this.state.hover && !this.props.suppressOnHover) {
|
||||||
|
|
|
@ -262,10 +262,10 @@ module.exports = React.createClass({
|
||||||
// For now we'll pretend this is any entity. It should probably be a separate tile.
|
// For now we'll pretend this is any entity. It should probably be a separate tile.
|
||||||
var EntityTile = sdk.getComponent("rooms.EntityTile");
|
var EntityTile = sdk.getComponent("rooms.EntityTile");
|
||||||
var BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
|
var BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
|
||||||
var text = "and " + overflowCount + " more";
|
var text = "and " + overflowCount + " other" + (overflowCount > 1 : "s" : "") + "...";
|
||||||
return (
|
return (
|
||||||
<EntityTile avatarJsx={
|
<EntityTile className="mx_EntityTile_ellipsis" avatarJsx={
|
||||||
<BaseAvatar name="+" width={36} height={36} />
|
<BaseAvatar url="img/ellipsis.svg" name="..." width={36} height={36} />
|
||||||
} name={text} presenceState="online" suppressOnHover={true}
|
} name={text} presenceState="online" suppressOnHover={true}
|
||||||
onClick={this._showFullMemberList} />
|
onClick={this._showFullMemberList} />
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue