From b32ca6c0f5968f5e9f59847db5012e3ef7f98631 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 2 Mar 2016 08:25:52 +0100 Subject: Code update. Some problems with CSRF token on Chromium... --- src/web/js/components/RightPanel.react.js | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'src/web/js/components/RightPanel.react.js') diff --git a/src/web/js/components/RightPanel.react.js b/src/web/js/components/RightPanel.react.js index 39b06f38..6005e954 100644 --- a/src/web/js/components/RightPanel.react.js +++ b/src/web/js/components/RightPanel.react.js @@ -35,6 +35,7 @@ var PanelMixin = { ); } btn_grp = ( + {this.getExtraButton()} {edit_button} {rem_button} ); @@ -169,13 +170,28 @@ var Article = React.createClass({ ], obj_type: 'article', getTitle: function() {return this.props.obj.title;}, + getExtraButton: function() { + if(!this.props.obj.readability_available) { + return null; + } + return (); + }, getBody: function() { return (
{this.getCore()} -
); }, + reloadParsed: function() { + if(this.props.obj.readability_available + && !this.props.obj.readability_parsed) { + RightPanelActions.loadArticle(this.props.obj.id, true, true); + } + }, }); var Feed = React.createClass({ @@ -188,10 +204,13 @@ var Feed = React.createClass({ {'title': 'Feed link', 'type': 'link', 'key': 'link'}, {'title': 'Site link', 'type': 'link', 'key': 'site_link'}, {'title': 'Enabled', 'type': 'bool', 'key': 'enabled'}, + {'title': 'Auto Readability', + 'type': 'bool', 'key': 'readability_auto_parse'}, {'title': 'Filters', 'type': 'ignore', 'key': 'filters'}, {'title': 'Category', 'type': 'ignore', 'key': 'category_id'}, ], getTitle: function() {return this.props.obj.title;}, + getExtraButton: function() {return null;}, getFilterRow: function(i, filter) { return (
@@ -317,8 +336,6 @@ var Feed = React.createClass({
-
Number of articles
-
{this.props.obj.nb_articles}
{this.getErrorFields()} {this.getCategorySelect()} @@ -353,6 +370,7 @@ var Category = React.createClass({ if(this.props.obj.id != 0) {return true;} else {return false;} }, + getExtraButton: function () {return null;}, isRemovable: function() {return this.isEditable();}, obj_type: 'category', fields: [{'title': 'Category name', 'type': 'string', 'key': 'name'}], @@ -423,9 +441,9 @@ var RightPanel = React.createClass({ key={this.state.category.id} />); } - return ( + return ( {breadcrum} {cntnt} -- cgit From 49d7ed4f2bd61504ff77f8dd5e78df2a2ec42f83 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 22 Mar 2016 13:36:08 +0100 Subject: Removed extra info fo rreadability. --- src/web/js/components/RightPanel.react.js | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/web/js/components/RightPanel.react.js') diff --git a/src/web/js/components/RightPanel.react.js b/src/web/js/components/RightPanel.react.js index 6005e954..275bcfb3 100644 --- a/src/web/js/components/RightPanel.react.js +++ b/src/web/js/components/RightPanel.react.js @@ -35,7 +35,6 @@ var PanelMixin = { ); } btn_grp = ( - {this.getExtraButton()} {edit_button} {rem_button} ); @@ -170,15 +169,6 @@ var Article = React.createClass({ ], obj_type: 'article', getTitle: function() {return this.props.obj.title;}, - getExtraButton: function() { - if(!this.props.obj.readability_available) { - return null; - } - return (); - }, getBody: function() { return (
{this.getCore()} @@ -204,13 +194,10 @@ var Feed = React.createClass({ {'title': 'Feed link', 'type': 'link', 'key': 'link'}, {'title': 'Site link', 'type': 'link', 'key': 'site_link'}, {'title': 'Enabled', 'type': 'bool', 'key': 'enabled'}, - {'title': 'Auto Readability', - 'type': 'bool', 'key': 'readability_auto_parse'}, {'title': 'Filters', 'type': 'ignore', 'key': 'filters'}, {'title': 'Category', 'type': 'ignore', 'key': 'category_id'}, ], getTitle: function() {return this.props.obj.title;}, - getExtraButton: function() {return null;}, getFilterRow: function(i, filter) { return (
@@ -370,7 +357,6 @@ var Category = React.createClass({ if(this.props.obj.id != 0) {return true;} else {return false;} }, - getExtraButton: function () {return null;}, isRemovable: function() {return this.isEditable();}, obj_type: 'category', fields: [{'title': 'Category name', 'type': 'string', 'key': 'name'}], -- cgit From 3d199ce8955c035a5a1bc4569058e2f84ef9cfe0 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 22 Mar 2016 14:30:54 +0100 Subject: fixes --- src/web/js/components/RightPanel.react.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/web/js/components/RightPanel.react.js') diff --git a/src/web/js/components/RightPanel.react.js b/src/web/js/components/RightPanel.react.js index 275bcfb3..f765607a 100644 --- a/src/web/js/components/RightPanel.react.js +++ b/src/web/js/components/RightPanel.react.js @@ -35,6 +35,7 @@ var PanelMixin = { ); } btn_grp = ( + {this.getExtraButton()} {edit_button} {rem_button} ); @@ -175,13 +176,7 @@ var Article = React.createClass({
); - }, - reloadParsed: function() { - if(this.props.obj.readability_available - && !this.props.obj.readability_parsed) { - RightPanelActions.loadArticle(this.props.obj.id, true, true); - } - }, + } }); var Feed = React.createClass({ @@ -198,6 +193,7 @@ var Feed = React.createClass({ {'title': 'Category', 'type': 'ignore', 'key': 'category_id'}, ], getTitle: function() {return this.props.obj.title;}, + getExtraButton: function() {return null;}, getFilterRow: function(i, filter) { return (
@@ -357,6 +353,7 @@ var Category = React.createClass({ if(this.props.obj.id != 0) {return true;} else {return false;} }, + getExtraButton: function () {return null;}, isRemovable: function() {return this.isEditable();}, obj_type: 'category', fields: [{'title': 'Category name', 'type': 'string', 'key': 'name'}], -- cgit