aboutsummaryrefslogtreecommitdiff
path: root/src/web/js/components/Menu.react.js
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-28 11:44:20 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-28 11:44:20 +0100
commit9ac90ba4bb85e2fab5cfc73ad9d6f3ec71c5b854 (patch)
treef31a50459ca9021f1d7ca03f6c63ca95ec98c44d /src/web/js/components/Menu.react.js
parentredoing UI and finishing up sidebar (diff)
downloadnewspipe-9ac90ba4bb85e2fab5cfc73ad9d6f3ec71c5b854.tar.gz
newspipe-9ac90ba4bb85e2fab5cfc73ad9d6f3ec71c5b854.tar.bz2
newspipe-9ac90ba4bb85e2fab5cfc73ad9d6f3ec71c5b854.zip
restoring build command
Diffstat (limited to 'src/web/js/components/Menu.react.js')
-rw-r--r--src/web/js/components/Menu.react.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/web/js/components/Menu.react.js b/src/web/js/components/Menu.react.js
index 75255d41..f699f92e 100644
--- a/src/web/js/components/Menu.react.js
+++ b/src/web/js/components/Menu.react.js
@@ -20,7 +20,6 @@ var FeedItem = React.createClass({
render: function() {
var icon = null;
var badge_unread = null;
- var style = null;
if(this.props.icon_url){
icon = (<img width="16px" src={this.props.icon_url} />);
} else {
@@ -152,21 +151,30 @@ var MenuFilter = React.createClass({
if (this.props.feed_in_error) {
error_button = (
<Button active={this.props.filter == "error"}
- onMouseDown={() => MenuActions.setFilter("error")}
+ onMouseDown={this.setErrorFilter}
bsSize="small" bsStyle="warning">Error</Button>
);
}
return (<ButtonGroup className="nav nav-sidebar">
<Button active={this.props.filter == "all"}
- onMouseDown={() => MenuActions.setFilter("all")}
+ onMouseDown={this.setAllFilter}
bsSize="small">All</Button>
<Button active={this.props.filter == "unread"}
- onMouseDown={() => MenuActions.setFilter("unread")}
+ onMouseDown={this.setUnreadFilter}
bsSize="small">Unread</Button>
{error_button}
</ButtonGroup>
);
},
+ setAllFilter: function() {
+ MenuActions.setFilter("all");
+ },
+ setUnreadFilter: function() {
+ MenuActions.setFilter("unread");
+ },
+ setErrorFilter: function() {
+ MenuActions.setFilter("error");
+ },
});
var Menu = React.createClass({
bgstack15