diff --git a/js/components/global_notification.js b/js/components/global_notification.js index b98c0154..82646976 100644 --- a/js/components/global_notification.js +++ b/js/components/global_notification.js @@ -3,7 +3,6 @@ import React from 'react'; import GlobalNotificationStore from '../stores/global_notification_store'; -import GlobalNotificationActions from '../actions/global_notification_actions'; import Row from 'react-bootstrap/lib/Row'; import Col from 'react-bootstrap/lib/Col'; @@ -37,20 +36,37 @@ let GlobalNotification = React.createClass({ }, render() { - let className = 'ascribe-global-notification '; + let notificationClass = 'ascribe-global-notification '; let message = this.state && this.state.message ? this.state.message : null; - className += message ? 'ascribe-global-notification-on' : 'ascribe-global-notification-off'; + if(message) { + let colors = { + warning: '#f0ad4e', + success: '#5cb85c', + info: 'rgba(2, 182, 163, 1)', + danger: '#d9534f' + }; - return ( - - -
-
{message ? message : null}
-
- -
- ); + let text = (
{message ? message : null}
); + + return ( + + +
+ {text} +
+ +
+ ); + } else { + return ( + + +
+ + + ); + } } }); diff --git a/js/components/header.js b/js/components/header.js index 915716d6..d46dd4b2 100644 --- a/js/components/header.js +++ b/js/components/header.js @@ -13,9 +13,6 @@ import MenuItem from 'react-bootstrap/lib/MenuItem'; import { getLangText } from '../utils/lang_utils'; -import GlobalNotificationActions from '../actions/global_notification_actions'; -import GlobalNotificationModel from '../models/global_notification_model'; - let Link = Router.Link; let Header = React.createClass({ @@ -37,11 +34,6 @@ let Header = React.createClass({ this.setState(state); }, - showNotification() { - let notification = new GlobalNotificationModel('transaction successful', 3500); - GlobalNotificationActions.appendGlobalNotification(notification); - }, - render() { return ( @@ -50,7 +42,6 @@ let Header = React.createClass({ ascribe - test notification