aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/stores
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-28 14:36:26 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-28 15:08:08 +0100
commit5c8f9fd0376afc034251a73023e43ada4041aa34 (patch)
tree5c97be7bfb9d40256704e5394f475b1250086fd6 /src/web/js/stores
parentrestoring build command (diff)
downloadnewspipe-5c8f9fd0376afc034251a73023e43ada4041aa34.tar.gz
newspipe-5c8f9fd0376afc034251a73023e43ada4041aa34.tar.bz2
newspipe-5c8f9fd0376afc034251a73023e43ada4041aa34.zip
implementing search through articles
Diffstat (limited to 'src/web/js/stores')
-rw-r--r--src/web/js/stores/MiddlePanelStore.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/web/js/stores/MiddlePanelStore.js b/src/web/js/stores/MiddlePanelStore.js
index bc7cee51..611808f7 100644
--- a/src/web/js/stores/MiddlePanelStore.js
+++ b/src/web/js/stores/MiddlePanelStore.js
@@ -7,14 +7,23 @@ var assign = require('object-assign');
var MiddlePanelStore = assign({}, EventEmitter.prototype, {
_datas: {filter: 'unread', articles: [],
- filter_type: null, filter_id: null},
+ filter_type: null, filter_id: null,
+ display_search: false, query: null,
+ search_title: true, search_content: false},
getAll: function() {
return this._datas;
},
getRequestFilter: function() {
- return {'filter': this._datas.filter,
- 'filter_type': this._datas.filter_type,
- 'filter_id': this._datas.filter_id};
+ var filters = {'filter': this._datas.filter,
+ 'filter_type': this._datas.filter_type,
+ 'filter_id': this._datas.filter_id,
+ };
+ if(this._datas.display_search) {
+ filters.query = this._datas.query;
+ filters.search_title = this._datas.search_title;
+ filters.search_content = this._datas.search_content;
+ };
+ return filters;
},
getArticles: function() {
var key = null;
bgstack15