Skip to content

Commit 6e3afcd

Browse files
committed
dodgy fudge to put the edit button alongside the read receipts. in future I think we should turn it into a chevron next to the timestamp
1 parent d660068 commit 6e3afcd

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

src/skins/vector/css/molecules/EventTile.css

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ limitations under the License.
9191
.mx_EventTile_msgOption {
9292
float: right;
9393
text-align: right;
94-
margin-right: 10px;
9594
z-index: 1;
9695
position: relative;
96+
width: 100px;
9797
}
9898

9999
.mx_MessageTimestamp {
@@ -111,10 +111,9 @@ limitations under the License.
111111
}
112112

113113
.mx_EventTile_editButton {
114-
display: block;
115-
visibility: hidden;
116-
margin-left: auto;
117-
margin-right: 0px;
114+
position: absolute;
115+
display: inline-block;
116+
visibility: hidden;
118117
}
119118

120119
.mx_EventTile:hover .mx_EventTile_editButton {

src/skins/vector/views/molecules/EventTile.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,22 @@ module.exports = React.createClass({
172172
if (remainder > 0) {
173173
remText = <span className="mx_EventTile_readAvatarRemainder"
174174
onClick={this.toggleAllReadAvatars}
175-
style={ {left: left} }>+{ remainder }
175+
style={{ left: left }}>{ remainder }+
176176
</span>;
177177
}
178178
}
179179

180+
var editButton = (
181+
<input style={{ left: left+15 }}
182+
type="image" src="img/edit.png" alt="Edit" width="14" height="14"
183+
className="mx_EventTile_editButton" onClick={this.onEditClicked} />
184+
);
185+
180186
return <span className="mx_EventTile_readAvatars" ref={this.collectReadAvatarNode}>
181-
{remText}
182-
<Velociraptor transition={reorderTransitionOpts}>
183-
{avatars}
187+
{ editButton }
188+
{ remText }
189+
<Velociraptor transition={ reorderTransitionOpts }>
190+
{ avatars }
184191
</Velociraptor>
185192
</span>;
186193
},
@@ -217,12 +224,6 @@ module.exports = React.createClass({
217224
menu: this.state.menu,
218225
});
219226
var timestamp = <MessageTimestamp ts={this.props.mxEvent.getTs()} />
220-
var editButton = (
221-
<input
222-
type="image" src="img/edit.png" alt="Edit" width="14" height="14"
223-
className="mx_EventTile_editButton" onClick={this.onEditClicked}
224-
/>
225-
);
226227

227228
var aux = null;
228229
if (msgtype === 'm.image') aux = "sent an image";
@@ -247,7 +248,6 @@ module.exports = React.createClass({
247248
return (
248249
<div className={classes}>
249250
<div className="mx_EventTile_msgOption">
250-
{ editButton }
251251
{ timestamp }
252252
{ readAvatars }
253253
</div>

0 commit comments

Comments
 (0)