Refactored so the RoomSubList overflow element use RoomSubList CSS

This commit is contained in:
wmwragg 2016-09-16 10:57:55 +01:00
parent 737d1d8843
commit 4b50a8a56e
3 changed files with 67 additions and 72 deletions

View file

@ -422,22 +422,12 @@ var RoomSubList = React.createClass({
}, },
_createOverflowTile: function(overflowCount, totalCount) { _createOverflowTile: function(overflowCount, totalCount) {
var BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
// XXX: this is duplicated from RoomTile - factor it out
// return (
// <div className="mx_RoomTile mx_RoomTile_ellipsis" onClick={this._showFullMemberList}>
// <div className="mx_RoomTile_avatar">
// <BaseAvatar url="img/ellipsis.svg" name="..." width={24} height={24} />
// </div>
// <div className="mx_RoomTile_name">and { overflowCount } others...</div>
// </div>
// );
return ( return (
<div className="mx_RoomTile mx_RoomTile_ellipsis" onClick={this._showFullMemberList}> <div className="mx_RoomSubList_ellipsis" onClick={this._showFullMemberList}>
<div className="mx_RoomTile_line"></div> <div className="mx_RoomSubList_line"></div>
<div className="mx_RoomTile_more">more</div> <div className="mx_RoomSubList_more">more</div>
<div className="mx_RoomTile_moreBadge"></div> <div className="mx_RoomSubList_moreBadge"></div>
<div className="mx_RoomTile_chevronDown"></div> <div className="mx_RoomSubList_moreChevronDown"></div>
</div> </div>
); );
}, },

View file

@ -113,63 +113,6 @@ limitations under the License.
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.mx_RoomTile_ellipsis {
line-height: 11px;
height: auto;
margin-bottom: 4px;
}
.mx_RoomTile_line {
display: inline-block;
width: 159px;
border-top: dotted 2px #76cfa6;
vertical-align: middle;
}
.mx_RoomTile_more {
display: inline-block;
text-transform: uppercase;
font-size: 10px;
font-weight: 600;
text-align: left;
color: #76cfa6;
padding-left: 7px;
padding-right: 7px;
padding-left: 7px;
vertical-align: middle;
}
.mx_RoomTile_moreBadge {
display: inline-block;
min-width: 15px;
height: 13px;
position: absolute;
right: 8px; /*gutter */
top: -2px;
border-radius: 8px;
border: solid 1px #76cfa6;
color: #fff;
font-weight: 600;
font-size: 10px;
text-align: center;
padding-top: 1px;
padding-left: 4px;
padding-right: 4px;
background-color: #fff;
vertical-align: middle;
}
.mx_RoomTile_chevronDown {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 6px solid #76cfa6;
position: absolute;
top: 4px;
right: 16px;
}
.mx_RoomTile_invite { .mx_RoomTile_invite {
/* color: rgba(69, 69, 69, 0.5); */ /* color: rgba(69, 69, 69, 0.5); */
} }

View file

@ -148,3 +148,65 @@ limitations under the License.
border-bottom: 5px solid transparent; border-bottom: 5px solid transparent;
} }
/* The overflow section */
.mx_RoomSubList_ellipsis {
display: block;
line-height: 11px;
height: auto;
margin-bottom: 4px;
position: relative;
cursor: pointer;
font-size: 13px;
}
.mx_RoomSubList_line {
display: inline-block;
width: 159px;
border-top: dotted 2px #76cfa6;
vertical-align: middle;
}
.mx_RoomSubList_more {
display: inline-block;
text-transform: uppercase;
font-size: 10px;
font-weight: 600;
text-align: left;
color: #76cfa6;
padding-left: 7px;
padding-right: 7px;
padding-left: 7px;
vertical-align: middle;
}
.mx_RoomSubList_moreBadge {
display: inline-block;
min-width: 15px;
height: 13px;
position: absolute;
right: 8px; /*gutter */
top: -2px;
border-radius: 8px;
border: solid 1px #76cfa6;
color: #fff;
font-weight: 600;
font-size: 10px;
text-align: center;
padding-top: 1px;
padding-left: 4px;
padding-right: 4px;
background-color: #fff;
vertical-align: middle;
}
.mx_RoomSubList_moreChevronDown {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 6px solid #76cfa6;
position: absolute;
top: 4px;
right: 16px;
}