aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/stores
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-25 12:40:23 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 23:47:57 +0100
commitf0dd6d526160fdb98a5f55b4e45b84652590df58 (patch)
treef2a4e82f7618f9d22052f954b22ce8a03ef80ee1 /src/web/js/stores
parentdoing some design (diff)
downloadnewspipe-f0dd6d526160fdb98a5f55b4e45b84652590df58.tar.gz
newspipe-f0dd6d526160fdb98a5f55b4e45b84652590df58.tar.bz2
newspipe-f0dd6d526160fdb98a5f55b4e45b84652590df58.zip
bootstraping right panel
Diffstat (limited to 'src/web/js/stores')
-rw-r--r--src/web/js/stores/RightPanelStore.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/web/js/stores/RightPanelStore.js b/src/web/js/stores/RightPanelStore.js
new file mode 100644
index 00000000..0bca9f54
--- /dev/null
+++ b/src/web/js/stores/RightPanelStore.js
@@ -0,0 +1,33 @@
+var JarrDispatcher = require('../dispatcher/JarrDispatcher');
+var RightPanelActionTypes = require('../constants/JarrConstants').RightPanelActionTypes;
+var MenuActionTypes = require('../constants/JarrConstants').MenuActionTypes;
+var EventEmitter = require('events').EventEmitter;
+var CHANGE_EVENT = 'change_middle_panel';
+var assign = require('object-assign');
+
+
+var RightPanelStore = assign({}, EventEmitter.prototype, {
+ _datas: {},
+ getAll: function() {
+ return this._datas;
+ },
+ emitChange: function() {
+ this.emit(CHANGE_EVENT);
+ },
+ addChangeListener: function(callback) {
+ this.on(CHANGE_EVENT, callback);
+ },
+ removeChangeListener: function(callback) {
+ this.removeListener(CHANGE_EVENT, callback);
+ },
+});
+
+
+RightPanelStore.dispatchToken = JarrDispatcher.register(function(action) {
+ switch(action.type) {
+ default:
+ // pass
+ }
+});
+
+module.exports = RightPanelStore;
bgstack15