From be33cd8921f1e2d39e4dc0ed63276740bc2d76d5 Mon Sep 17 00:00:00 2001 From: Jeena Date: Wed, 18 Sep 2013 13:25:24 +0200 Subject: [PATCH] fixes --- js/App.js | 2 -- js/OwnCloud.js | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/js/App.js b/js/App.js index ab4878e..750017c 100644 --- a/js/App.js +++ b/js/App.js @@ -140,8 +140,6 @@ App.prototype.reload = function() { App.prototype.gotUnreadFeeds = function(new_articles) { - console.log(JSON.stringify(new_articles.length)) - if(new_articles == null || !this.validate(new_articles)) { // on error load the saved unread articles. var old_articles = localStorage.unread_articles; diff --git a/js/OwnCloud.js b/js/OwnCloud.js index 9c05116..c8ec464 100644 --- a/js/OwnCloud.js +++ b/js/OwnCloud.js @@ -87,13 +87,15 @@ OwnCloud.prototype.getUnreadFeeds = function(callback, skip) { this.doOperation("GET", "items", options, function(data) { var items = data.items; // FIXME + /* var feeds = {}; for (var i = 0; i < data.feeds.length; i++) { var feed = data.feeds[i]; feeds[feed.id] = feed; } + */ - callback(items.map(_this.normalize_article, feeds)); + callback(items.map(_this.normalize_article)); }); } @@ -163,7 +165,7 @@ OwnCloud.prototype.normalize_article = function(article) { id: article.id, title: article.title, content: article.body, - feed_title: feeds[article.feedId].title, + feed_title: "", // FIXME: feeds[article.feedId].title, excerpt: article.body.stripHTML().substring(0, 50), updated: article.pubDate, link: article.link, @@ -182,7 +184,6 @@ OwnCloud.login = function(server_url, user, password, callback) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { - console.log(xhr.status) if(xhr.readyState == 4) { if(xhr.status == 200) { callback(JSON.parse(xhr.responseText))