From ef689ca6b6686cf73f887b285328d67e0add12db Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Sun, 31 Jan 2016 18:33:21 +0100 Subject: saving categ --- src/web/js/components/RightPanel.react.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/web/js') diff --git a/src/web/js/components/RightPanel.react.js b/src/web/js/components/RightPanel.react.js index b8f78050..009b40df 100644 --- a/src/web/js/components/RightPanel.react.js +++ b/src/web/js/components/RightPanel.react.js @@ -6,6 +6,7 @@ var ButtonGroup = require('react-bootstrap/lib/ButtonGroup'); var RightPanelActions = require('../actions/RightPanelActions'); var RightPanelStore = require('../stores/RightPanelStore'); +var MenuStore = require('../stores/MenuStore'); var JarrTime = require('./time.react'); var PanelMixin = { @@ -162,6 +163,7 @@ var Feed = React.createClass({ {'title': 'Site link', 'type': 'link', 'key': 'site_link'}, {'title': 'Enabled', 'type': 'bool', 'key': 'enabled'}, {'title': 'Filters', 'type': 'ignore', 'key': 'filters'}, + {'title': 'Category', 'type': 'ignore', 'key': 'category_id'}, ], getTitle: function() {return this.props.obj.title;}, getFilterRow: function(i, filter) { @@ -222,6 +224,30 @@ var Feed = React.createClass({ } return
{rows}
; }, + getCategorySelect: function() { + var content = null; + if(this.state.edit_mode) { + var categ_options = []; + for(var cat_id in MenuStore._datas.categories) { + categ_options.push( + ); + } + content = (); + } else { + content = MenuStore._datas.categories[this.props.obj.category_id].name; + } + return (
+
Category
{content}
+
); + }, + getBody: function() { return (
@@ -234,6 +260,7 @@ var Feed = React.createClass({ text={this.props.obj.last_retrieved} />
+ {this.getCategorySelect()} {this.getCore()} {this.getFilterRows()}
-- cgit