mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Showing hidden stories now shows them slightly translucent.
This commit is contained in:
parent
35e59fa4b6
commit
11b57f5bf7
3 changed files with 25 additions and 4 deletions
|
|
@ -586,7 +586,11 @@ def mark_story_as_read(request):
|
||||||
logging.info(" ---> [%s] ~FYRead story in feed: %s" % (request.user, usersub.feed))
|
logging.info(" ---> [%s] ~FYRead story in feed: %s" % (request.user, usersub.feed))
|
||||||
|
|
||||||
for story_id in story_ids:
|
for story_id in story_ids:
|
||||||
story = MStory.objects(story_feed_id=feed_id, story_guid=story_id)[0]
|
try:
|
||||||
|
story = MStory.objects(story_feed_id=feed_id, story_guid=story_id)[0]
|
||||||
|
except IndexError:
|
||||||
|
# Story has been deleted, probably by feed_fetcher.
|
||||||
|
continue
|
||||||
now = datetime.datetime.utcnow()
|
now = datetime.datetime.utcnow()
|
||||||
m = MUserStory(story=story, user_id=request.user.pk, feed_id=feed_id, read_date=now)
|
m = MUserStory(story=story, user_id=request.user.pk, feed_id=feed_id, read_date=now)
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -1120,6 +1120,9 @@ background: transparent;
|
||||||
line-height: 10px;
|
line-height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#story_titles .NB-story-hidden-visible {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
/* ======================== */
|
/* ======================== */
|
||||||
/* = Story Titles - Story = */
|
/* = Story Titles - Story = */
|
||||||
/* ======================== */
|
/* ======================== */
|
||||||
|
|
|
||||||
|
|
@ -2680,7 +2680,8 @@
|
||||||
this.show_story_titles_above_intelligence_level({
|
this.show_story_titles_above_intelligence_level({
|
||||||
'unread_view_name': 'neutral',
|
'unread_view_name': 'neutral',
|
||||||
'animate': true,
|
'animate': true,
|
||||||
'follow': true
|
'follow': true,
|
||||||
|
'temporary': true
|
||||||
});
|
});
|
||||||
$indicator.removeClass('unread_threshold_positive').addClass('unread_threshold_neutral');
|
$indicator.removeClass('unread_threshold_positive').addClass('unread_threshold_neutral');
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -2688,7 +2689,8 @@
|
||||||
this.show_story_titles_above_intelligence_level({
|
this.show_story_titles_above_intelligence_level({
|
||||||
'unread_view_name': 'negative',
|
'unread_view_name': 'negative',
|
||||||
'animate': true,
|
'animate': true,
|
||||||
'follow': true
|
'follow': true,
|
||||||
|
'temporary': true
|
||||||
});
|
});
|
||||||
$indicator.removeClass('unread_threshold_positive')
|
$indicator.removeClass('unread_threshold_positive')
|
||||||
.removeClass('unread_threshold_neutral')
|
.removeClass('unread_threshold_neutral')
|
||||||
|
|
@ -3861,7 +3863,8 @@
|
||||||
var defaults = {
|
var defaults = {
|
||||||
'unread_view_name': null,
|
'unread_view_name': null,
|
||||||
'animate': true,
|
'animate': true,
|
||||||
'follow': true
|
'follow': true,
|
||||||
|
'temporary': false
|
||||||
};
|
};
|
||||||
var options = $.extend({}, defaults, opts);
|
var options = $.extend({}, defaults, opts);
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
@ -3881,10 +3884,21 @@
|
||||||
$stories_show = $('.story,.NB-feed-story')
|
$stories_show = $('.story,.NB-feed-story')
|
||||||
.filter('.NB-story-positive,.NB-story-neutral');
|
.filter('.NB-story-positive,.NB-story-neutral');
|
||||||
$stories_hide = $('.story,.NB-feed-story').filter('.NB-story-negative');
|
$stories_hide = $('.story,.NB-feed-story').filter('.NB-story-negative');
|
||||||
|
if (options['temporary']) {
|
||||||
|
$stories_show.filter('.NB-story-neutral').addClass('NB-story-hidden-visible');
|
||||||
|
} else {
|
||||||
|
$stories_show.filter('.NB-story-hidden-visible').removeClass('NB-story-hidden-visible');
|
||||||
|
}
|
||||||
} else if (unread_view_name == 'negative') {
|
} else if (unread_view_name == 'negative') {
|
||||||
$stories_show = $('.story,.NB-feed-story')
|
$stories_show = $('.story,.NB-feed-story')
|
||||||
.filter('.NB-story-positive,.NB-story-neutral,.NB-story-negative');
|
.filter('.NB-story-positive,.NB-story-neutral,.NB-story-negative');
|
||||||
$stories_hide = $();
|
$stories_hide = $();
|
||||||
|
if (options['temporary']) {
|
||||||
|
$stories_show.filter('.NB-story-negative,.NB-story-neutral:not(:visible)')
|
||||||
|
.addClass('NB-story-hidden-visible');
|
||||||
|
} else {
|
||||||
|
$stories_show.filter('.NB-story-hidden-visible').removeClass('NB-story-hidden-visible');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.story_view == 'feed' && this.model.preference('feed_view_single_story')) {
|
if (this.story_view == 'feed' && this.model.preference('feed_view_single_story')) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue