Commit 630ae5e4 authored by Matthew Taylor's avatar Matthew Taylor

fix formatting for numbers and for dismiss icon

fixes #1494
parent 3dee0e46
...@@ -21,10 +21,10 @@ var AdminMessage = React.createClass({ ...@@ -21,10 +21,10 @@ var AdminMessage = React.createClass({
</span> </span>
<Button <Button
className="mod-admin-message-dismiss" className="mod-admin-message-dismiss"
onClick={this.props.onDismiss.bind(this, 'notification', this.props.id)} onClick={this.props.onDismiss}
> >
<img <img
className="mod-admin-message-icon" className="admin-message-icon"
src="/svgs/modal/close-x.svg" src="/svgs/modal/close-x.svg"
alt="close-icon" alt="close-icon"
/> />
......
...@@ -25,11 +25,7 @@ var AdminMessage = injectIntl(React.createClass({ ...@@ -25,11 +25,7 @@ var AdminMessage = injectIntl(React.createClass({
</span> </span>
<Button <Button
className="mod-scratcher-invite-dismiss" className="mod-scratcher-invite-dismiss"
onClick={ onClick={this.props.onDismiss}
function () {
this.props.onDismiss('invite', this.props.id);
}.bind(this)
}
> >
<img <img
className="mod-scratcher-invite-icon" className="mod-scratcher-invite-icon"
......
...@@ -39,6 +39,20 @@ ...@@ -39,6 +39,20 @@
list-style-type: none; list-style-type: none;
} }
.messages-header {
display: flex;
align-items: center;
}
.messages-header-unread {
margin-left: 1rem;
border-radius: 1rem;
background-color: $ui-orange;
padding: .25rem .5rem;
line-height: 1rem;
color: $type-white;
}
.admin-message { .admin-message {
border: 1px solid darken($ui-gray, 10); border: 1px solid darken($ui-gray, 10);
border-radius: 5px; border-radius: 5px;
...@@ -51,6 +65,10 @@ ...@@ -51,6 +65,10 @@
align-items: center; align-items: center;
} }
.admin-message-icon {
vertical-align: middle;
}
.admin-message-content { .admin-message-content {
margin: 0; margin: 0;
} }
...@@ -70,14 +88,6 @@ ...@@ -70,14 +88,6 @@
} }
} }
.messages-social-title-unread {
margin-left: 1rem;
border-radius: 1rem;
background-color: $ui-orange;
padding: .25rem .5rem;
color: $type-white;
}
.messages-social-list { .messages-social-list {
border: 1px solid $ui-border; border: 1px solid $ui-border;
border-bottom-width: 0; border-bottom-width: 0;
......
...@@ -181,11 +181,11 @@ var SocialMessagesList = React.createClass({ ...@@ -181,11 +181,11 @@ var SocialMessagesList = React.createClass({
<section className="messages-social"> <section className="messages-social">
{this.props.messages.length > 0 ? [ {this.props.messages.length > 0 ? [
<div className="messages-social-title" key="messages-social-title"> <div className="messages-social-title" key="messages-social-title">
<h4> <h4 className="messages-header">
<FormattedMessage id='messages.messageTitle' /> <FormattedMessage id='messages.messageTitle' />
<span className="messages-social-title-unread"> <div className="messages-header-unread">
<FormattedNumber value={this.props.numNewMessages} /> <FormattedNumber value={this.props.numNewMessages} />
</span> </div>
</h4> </h4>
</div>, </div>,
<ul className="messages-social-list" key="messages-social-list"> <ul className="messages-social-list" key="messages-social-list">
...@@ -270,11 +270,11 @@ var MessagesPresentation = injectIntl(React.createClass({ ...@@ -270,11 +270,11 @@ var MessagesPresentation = injectIntl(React.createClass({
{this.props.adminMessages.length > 0 || Object.keys(this.props.scratcherInvite).length > 0 ? [ {this.props.adminMessages.length > 0 || Object.keys(this.props.scratcherInvite).length > 0 ? [
<section className="messages-admin"> <section className="messages-admin">
<div className="messages-admin-title"> <div className="messages-admin-title">
<h4> <h4 className="messages-header">
<FormattedMessage id='messages.scratchTeamTitle' /> <FormattedMessage id='messages.scratchTeamTitle' />
<span className="messages-social-title-unread"> <div className="messages-header-unread">
<FormattedNumber value={adminMessageLength} /> <FormattedNumber value={adminMessageLength} />
</span> </div>
</h4> </h4>
</div> </div>
<ul className="messages-admin-list"> <ul className="messages-admin-list">
...@@ -283,7 +283,9 @@ var MessagesPresentation = injectIntl(React.createClass({ ...@@ -283,7 +283,9 @@ var MessagesPresentation = injectIntl(React.createClass({
id={this.props.scratcherInvite.id} id={this.props.scratcherInvite.id}
username={this.props.user.username} username={this.props.user.username}
datetimeCreated={this.props.scratcherInvite.datetime_created} datetimeCreated={this.props.scratcherInvite.datetime_created}
onDismiss={this.props.handleAdminDismiss} onDismiss={function () {
this.props.handleAdminDismiss('invite', this.props.scratcherInvite.id);
}.bind(this)}
/> />
] : []} ] : []}
{this.props.adminMessages.map(function (item) { {this.props.adminMessages.map(function (item) {
...@@ -292,11 +294,9 @@ var MessagesPresentation = injectIntl(React.createClass({ ...@@ -292,11 +294,9 @@ var MessagesPresentation = injectIntl(React.createClass({
id={item.id} id={item.id}
message={item.message} message={item.message}
datetimeCreated={item.datetime_created} datetimeCreated={item.datetime_created}
onDismiss={ onDismiss={function () {
function () { this.props.handleAdminDismiss('notification', item.id);
this.props.handleAdminDismiss('notification', item.id); }.bind(this)}
}.bind(this)
}
/>; />;
}.bind(this))} }.bind(this))}
</ul> </ul>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment