fix up dynamically loaded svgs, and fix bottomleftmenu
This commit is contained in:
parent
bbf08d99cc
commit
b996022db2
11 changed files with 103 additions and 9 deletions
|
@ -50,9 +50,9 @@ module.exports = React.createClass({
|
|||
return (
|
||||
<div className="mx_BottomLeftMenu">
|
||||
<div className="mx_BottomLeftMenu_options">
|
||||
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/create-big.png" label="Create new room" onClick={ this.onCreateRoomClick }/>
|
||||
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/directory-big.png" label="Directory" onClick={ this.onRoomDirectoryClick }/>
|
||||
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/settings-big.png" label="Settings" onClick={ this.onSettingsClick }/>
|
||||
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/create-big.svg" label="Create new room" onClick={ this.onCreateRoomClick }/>
|
||||
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/directory-big.svg" label="Directory" onClick={ this.onRoomDirectoryClick }/>
|
||||
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/settings-big.svg" label="Settings" onClick={ this.onSettingsClick }/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -262,11 +262,16 @@ var RoomSubList = React.createClass({
|
|||
});
|
||||
},
|
||||
|
||||
onSvgLoad: function(event) {
|
||||
dis.dispatch({ action: "svg_onload", svg: event.target });
|
||||
},
|
||||
|
||||
_getHeaderJsx: function() {
|
||||
return (
|
||||
<h2 onClick={ this.onClick } className="mx_RoomSubList_label">
|
||||
{ this.props.collapsed ? '' : this.props.label }
|
||||
<object type="image/svg+xml" className="mx_RoomSubList_chevron mx_Svg"
|
||||
onLoad={ this.onSvgLoad }
|
||||
data={ this.state.hidden ? "img/list-close.svg" : "img/list-open.svg" }
|
||||
width="10" height="10" />
|
||||
</h2>
|
||||
|
|
|
@ -48,7 +48,7 @@ module.exports = React.createClass({
|
|||
return (
|
||||
<div className="mx_RoomTile" onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave} onClick={this.props.onClick}>
|
||||
<div className="mx_RoomTile_avatar">
|
||||
<img src={ this.props.img } width="24" height="24"/>
|
||||
<img src={ this.props.img } width="26" height="26"/>
|
||||
</div>
|
||||
{ label }
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue