From e4a15076f458be1416de25b2c45578975b914de5 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Wed, 23 Sep 2015 10:12:40 -0400
Subject: Implement UI theme colors.

---
 web/react/stores/user_store.jsx | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

(limited to 'web/react/stores/user_store.jsx')

diff --git a/web/react/stores/user_store.jsx b/web/react/stores/user_store.jsx
index f75c1d4c3..8842263fa 100644
--- a/web/react/stores/user_store.jsx
+++ b/web/react/stores/user_store.jsx
@@ -14,6 +14,7 @@ var CHANGE_EVENT_SESSIONS = 'change_sessions';
 var CHANGE_EVENT_AUDITS = 'change_audits';
 var CHANGE_EVENT_TEAMS = 'change_teams';
 var CHANGE_EVENT_STATUSES = 'change_statuses';
+var TOGGLE_IMPORT_MODAL_EVENT = 'toggle_import_modal';
 
 class UserStoreClass extends EventEmitter {
     constructor() {
@@ -34,6 +35,9 @@ class UserStoreClass extends EventEmitter {
         this.emitStatusesChange = this.emitStatusesChange.bind(this);
         this.addStatusesChangeListener = this.addStatusesChangeListener.bind(this);
         this.removeStatusesChangeListener = this.removeStatusesChangeListener.bind(this);
+        this.emitToggleImportModal = this.emitToggleImportModal.bind(this);
+        this.addImportModalListener = this.addImportModalListener.bind(this);
+        this.removeImportModalListener = this.removeImportModalListener.bind(this);
         this.setCurrentId = this.setCurrentId.bind(this);
         this.getCurrentId = this.getCurrentId.bind(this);
         this.getCurrentUser = this.getCurrentUser.bind(this);
@@ -114,6 +118,15 @@ class UserStoreClass extends EventEmitter {
     removeStatusesChangeListener(callback) {
         this.removeListener(CHANGE_EVENT_STATUSES, callback);
     }
+    emitToggleImportModal(value) {
+        this.emit(TOGGLE_IMPORT_MODAL_EVENT, value);
+    }
+    addImportModalListener(callback) {
+        this.on(TOGGLE_IMPORT_MODAL_EVENT, callback);
+    }
+    removeImportModalListener(callback) {
+        this.removeListener(TOGGLE_IMPORT_MODAL_EVENT, callback);
+    }
     setCurrentId(id) {
         this.gCurrentId = id;
         if (id == null) {
@@ -321,6 +334,9 @@ UserStore.dispatchToken = AppDispatcher.register(function registry(payload) {
         UserStore.pSetStatuses(action.statuses);
         UserStore.emitStatusesChange();
         break;
+    case ActionTypes.TOGGLE_IMPORT_THEME_MODAL:
+        UserStore.emitToggleImportModal(action.value);
+        break;
 
     default:
     }
-- 
cgit v1.2.3-1-g7c22

