summaryrefslogtreecommitdiffstats
path: root/web/react/stores
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-23 14:38:34 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-23 14:38:34 -0700
commit7f3bfdbe0c2442714bb5a14adfdeac1576123601 (patch)
tree44962a914b86cf66a1da49300f12986db49f010e /web/react/stores
parent1626a6de6f16ba0878160b0a7eae9f49b8d34d4f (diff)
parentc7c644874e98db0ae83c5a44ec50ff811d9b3f46 (diff)
downloadchat-7f3bfdbe0c2442714bb5a14adfdeac1576123601.tar.gz
chat-7f3bfdbe0c2442714bb5a14adfdeac1576123601.tar.bz2
chat-7f3bfdbe0c2442714bb5a14adfdeac1576123601.zip
Fixing merge
Diffstat (limited to 'web/react/stores')
-rw-r--r--web/react/stores/user_store.jsx16
1 files changed, 16 insertions, 0 deletions
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:
}