mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-07 23:44:55 +08:00
fixes closing of notification modal window
This commit is contained in:
parent
8bd698e5c3
commit
dafa4a6f1f
1 changed files with 14 additions and 5 deletions
|
@ -13,9 +13,7 @@ import {
|
||||||
WILD_SAND_COLOR,
|
WILD_SAND_COLOR,
|
||||||
MYSTIC_COLOR
|
MYSTIC_COLOR
|
||||||
} from "../../../config/constants/colors";
|
} from "../../../config/constants/colors";
|
||||||
import {
|
import { SETTINGS_ACCOUNT_PREFERENCES } from "../../../config/routes";
|
||||||
SETTINGS_ACCOUNT_PREFERENCES
|
|
||||||
} from "../../../config/routes"
|
|
||||||
|
|
||||||
import NotificationItem from "./NotificationItem";
|
import NotificationItem from "./NotificationItem";
|
||||||
import Spinner from "../../Spinner";
|
import Spinner from "../../Spinner";
|
||||||
|
@ -104,6 +102,10 @@ class NotificationsDropdown extends Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closeDropdown() {
|
||||||
|
this.dropdown.click();
|
||||||
|
}
|
||||||
|
|
||||||
renderNotifications() {
|
renderNotifications() {
|
||||||
const list = this.state.notifications.map(notification => (
|
const list = this.state.notifications.map(notification => (
|
||||||
<NotificationItem key={notification.id} notification={notification} />
|
<NotificationItem key={notification.id} notification={notification} />
|
||||||
|
@ -133,7 +135,11 @@ class NotificationsDropdown extends Component {
|
||||||
noCaret
|
noCaret
|
||||||
id="notifications-dropdown"
|
id="notifications-dropdown"
|
||||||
title={
|
title={
|
||||||
<span>
|
<span
|
||||||
|
ref={el => {
|
||||||
|
this.dropdown = el;
|
||||||
|
}}
|
||||||
|
>
|
||||||
<i className="fa fa-bell" />
|
<i className="fa fa-bell" />
|
||||||
<span className="visible-xs-inline visible-sm-inline">
|
<span className="visible-xs-inline visible-sm-inline">
|
||||||
<FormattedMessage id="navbar.notifications_label" />
|
<FormattedMessage id="navbar.notifications_label" />
|
||||||
|
@ -148,7 +154,10 @@ class NotificationsDropdown extends Component {
|
||||||
<FormattedMessage id="notifications.dropdown_title" />
|
<FormattedMessage id="notifications.dropdown_title" />
|
||||||
</span>
|
</span>
|
||||||
<span className="pull-right">
|
<span className="pull-right">
|
||||||
<Link to={SETTINGS_ACCOUNT_PREFERENCES}>
|
<Link
|
||||||
|
to={SETTINGS_ACCOUNT_PREFERENCES}
|
||||||
|
onClick={this.closeDropdown}
|
||||||
|
>
|
||||||
<FormattedMessage id="notifications.dropdown_settings_link" />
|
<FormattedMessage id="notifications.dropdown_settings_link" />
|
||||||
</Link>
|
</Link>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in a new issue