Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
Reload items on mark as read
Browse files Browse the repository at this point in the history
  • Loading branch information
SSilence committed Mar 28, 2013
1 parent f42552e commit a4cc2be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Version 2.4-SNAPSHOT
* add open in new window button for mobile view
* allow choosing tags in article list
* concurent multiples updates makes no longer duplicates entries
* Reload items on mark as read

Version 2.3
* new shortcut library jquery hotkeys (thanks a lot to Sigill)
Expand Down
19 changes: 9 additions & 10 deletions public/js/selfoss-events-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ selfoss.events.navigation = function() {
return;
}

// show loading
var content = $('#content');
var articleList = content.html();
$('#content').addClass('loading').html("");

$.ajax({
url: $('base').attr('href') + 'mark',
type: 'POST',
Expand All @@ -156,18 +161,12 @@ selfoss.events.navigation = function() {
if(selfoss.isSmartphone())
$('#nav-mobile-settings').click();

// update tags
selfoss.refreshTags(response.tags);

// update sources
selfoss.refreshSources(response.sources);

// update mark as read button for every entry
var button = $('.entry-unread');
button.removeClass('active');
button.html('mark as unread');
// refresh list
selfoss.reloadList();
},
error: function(jqXHR, textStatus, errorThrown) {
content.html(articleList);
$('#content').removeClass('loading');
alert('Can not mark all visible item: ' + errorThrown);
}
});
Expand Down

0 comments on commit a4cc2be

Please sign in to comment.