hide publish button for nono TTRSS

This commit is contained in:
Jeena 2014-10-27 00:27:11 +01:00
parent d1c7059751
commit 3e4be0fe29
3 changed files with 45 additions and 54 deletions

View file

@ -83,7 +83,7 @@ label {
} }
.hidden { .hidden {
display: none; display: none !important;
} }
section { section {
@ -125,7 +125,6 @@ section > header h1 {
margin-left: 10px; margin-left: 10px;
} }
.invisible { display: none; }
.inactive { opacity: 0.4; } .inactive { opacity: 0.4; }
.settings, .list { .settings, .list {

View file

@ -87,7 +87,7 @@
<section id="full"> <section id="full">
<header class="bar"> <header class="bar">
<a class="button icon list" href="#list">&#57349;</a> <a class="button icon list" href="#list">&#57349;</a>
<a id="setpublished" class="button icon inactive invisible" href="#published">&#59194;</a> <a id="setpublished" class="button icon inactive hidden" href="#published">&#59194;</a>
<a id="setstarred" class="button icon inactive" href="#starred">&#9733;</a> <a id="setstarred" class="button icon inactive" href="#starred">&#9733;</a>
<a id="setunread" class="button icon inactive" href="#unread"></a> <a id="setunread" class="button icon inactive" href="#unread"></a>
<canvas width="40" height="40"></canvas> <canvas width="40" height="40"></canvas>

View file

@ -111,7 +111,7 @@ App.prototype.after_login = function(backend) {
this.backend = new Pond(this, localStorage.server_url, localStorage.session_id) this.backend = new Pond(this, localStorage.server_url, localStorage.session_id)
} else { } else {
this.backend = new TinyTinyRSS(this, localStorage.server_url, localStorage.session_id); this.backend = new TinyTinyRSS(this, localStorage.server_url, localStorage.session_id);
$("#setpublished").removeClass("invisible"); $("#setpublished").removeClass("hidden");
} }
var numArticles = localStorage.numArticles; var numArticles = localStorage.numArticles;
@ -174,8 +174,7 @@ App.prototype.gotUnreadFeeds = function(new_articles) {
alert("Your TinyTinyRSS session has expired. Please login again"); alert("Your TinyTinyRSS session has expired. Please login again");
this.login.fillLoginFormFromLocalStorage(); this.login.fillLoginFormFromLocalStorage();
this.login.log_in(); this.login.log_in();
} } else {
else {
// On other errors, load the saved unread articles. // On other errors, load the saved unread articles.
var old_articles = localStorage.unread_articles; var old_articles = localStorage.unread_articles;
if(old_articles) { if(old_articles) {
@ -199,8 +198,7 @@ App.prototype.gotUnreadFeeds = function(new_articles) {
} else { } else {
alert("Limit size reached: Downloaded: " + this.unread_articles.length + " articles. Reached: " + localStorage.unread_articles.length +" bytes"); alert("Limit size reached: Downloaded: " + this.unread_articles.length + " articles. Reached: " + localStorage.unread_articles.length +" bytes");
} }
} } catch (e) {
catch (e) {
alert("Reached maximum memory by app " + e.name + " " + e.message + ". We will keep working in anycase with: " + localStorage.unread_articles.length); alert("Reached maximum memory by app " + e.name + " " + e.message + ". We will keep working in anycase with: " + localStorage.unread_articles.length);
} }
this.populateList(); this.populateList();
@ -425,7 +423,6 @@ App.prototype.toggleAllRead = function() {
$("#all-read").removeClass('inactive'); $("#all-read").removeClass('inactive');
this.updateList(); this.updateList();
this.backend.setArticlesRead(articles); this.backend.setArticlesRead(articles);
} else { } else {
@ -441,7 +438,6 @@ App.prototype.toggleAllRead = function() {
this.updateList(); this.updateList();
this.backend.setArticlesUnread(articles); this.backend.setArticlesUnread(articles);
} }
}; };
@ -454,8 +450,7 @@ App.prototype.toggleStarred = function() {
this.updateList(); this.updateList();
this.backend.setArticleStarred(article); this.backend.setArticleStarred(article);
$("#setstarred").removeClass('inactive'); $("#setstarred").removeClass('inactive');
} } else {
else {
article.marked = false; article.marked = false;
this.updateList(); this.updateList();
this.backend.setArticleUnstarred(article); this.backend.setArticleUnstarred(article);
@ -472,8 +467,7 @@ App.prototype.togglePublished = function() {
article.published = true; article.published = true;
this.backend.setArticlePublished(article); this.backend.setArticlePublished(article);
$("#setpublished").removeClass('inactive'); $("#setpublished").removeClass('inactive');
} } else {
else {
article.published = false; article.published = false;
this.backend.setArticleUnpublished(article); this.backend.setArticleUnpublished(article);
$("#setpublished").addClass('inactive'); $("#setpublished").addClass('inactive');
@ -518,20 +512,18 @@ App.prototype.fontChange = function(size) {
}; };
App.prototype.numArticles= function(askfor) { App.prototype.numArticles = function(askfor) {
if(askfor < 200 && askfor > 0) { if(askfor < 200 && askfor > 0) {
localStorage.numArticles=askfor; localStorage.numArticles=askfor;
} } else {
else {
localStorage.numArticles=100; localStorage.numArticles=100;
} }
}; };
App.prototype.maxDownload= function(maxdata) { App.prototype.maxDownload = function(maxdata) {
if(maxdata < 5000000 && maxdata > 100000) { if(maxdata < 5000000 && maxdata > 100000) {
localStorage.maxDownload=maxdata; localStorage.maxDownload=maxdata;
} } else {
else {
localStorage.maxDownload=500000; localStorage.maxDownload=500000;
} }
}; };