mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing story titles header by not re-drawing the container every time.
This commit is contained in:
parent
d8309f9f73
commit
495ccac8ce
3 changed files with 23 additions and 11 deletions
|
@ -1294,14 +1294,23 @@ background: transparent;
|
|||
background-position: 4px 7px;
|
||||
}
|
||||
|
||||
.NB-feedbar:hover :not(.NB-no-hover) .NB-feedlist-manage-icon {
|
||||
.NB-feedbar:hover .NB-feedlist-manage-icon {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.NB-feedbar:hover .feed_favicon,
|
||||
.NB-feedbar:hover :not(.NB-no-hover) .NB-folder-icon {
|
||||
.NB-feedbar:hover .NB-no-hover .NB-feedlist-manage-icon {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.NB-feedbar:hover .feed_favicon,
|
||||
.NB-feedbar:hover .NB-folder-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.NB-feedbar:hover .NB-no-hover .NB-folder-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
NEWSBLUR.app.follow_requests_module = new NEWSBLUR.Views.FollowRequestsModule();
|
||||
NEWSBLUR.app.dashboard_search = new NEWSBLUR.Views.DashboardSearch();
|
||||
NEWSBLUR.app.taskbar_info = new NEWSBLUR.Views.ReaderTaskbarInfo().render();
|
||||
NEWSBLUR.app.story_titles_header = new NEWSBLUR.Views.StoryTitlesHeader();
|
||||
|
||||
this.load_intelligence_slider();
|
||||
this.handle_mouse_indicator_hover();
|
||||
|
@ -2291,10 +2292,10 @@
|
|||
NEWSBLUR.app.story_titles_header.remove();
|
||||
}
|
||||
|
||||
NEWSBLUR.app.story_titles_header = new NEWSBLUR.Views.StoryTitlesHeader({
|
||||
NEWSBLUR.app.story_titles_header.render({
|
||||
feed_id: this.active_feed,
|
||||
layout: NEWSBLUR.assets.preference('story_layout')
|
||||
}).render();
|
||||
});
|
||||
},
|
||||
|
||||
open_feed_intelligence_modal: function(score, feed_id, feed_loaded) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
NEWSBLUR.Views.StoryTitlesHeader = Backbone.View.extend({
|
||||
|
||||
el: ".NB-story-titles-header",
|
||||
|
||||
options: {
|
||||
'layout': 'split'
|
||||
},
|
||||
|
@ -13,13 +15,9 @@ NEWSBLUR.Views.StoryTitlesHeader = Backbone.View.extend({
|
|||
this.$story_titles_feedbar = $(".NB-story-titles-header");
|
||||
this.$feed_view_feedbar = $(".NB-feed-story-view-header");
|
||||
|
||||
this.showing_fake_folder = NEWSBLUR.reader.flags['river_view'] &&
|
||||
NEWSBLUR.reader.active_folder &&
|
||||
(NEWSBLUR.reader.active_folder.get('fake') || !NEWSBLUR.reader.active_folder.get('folder_title'));
|
||||
// if (this.options.layout == 'split' || this.options.layout == 'list') {
|
||||
this.$story_titles_feedbar.show();
|
||||
this.$feed_view_feedbar.hide();
|
||||
this.setElement(this.$story_titles_feedbar);
|
||||
// } else if (this.options.layout == 'full') {
|
||||
// this.$story_titles_feedbar.hide();
|
||||
// this.$feed_view_feedbar.show();
|
||||
|
@ -27,8 +25,12 @@ NEWSBLUR.Views.StoryTitlesHeader = Backbone.View.extend({
|
|||
// }
|
||||
},
|
||||
|
||||
render: function() {
|
||||
render: function(options) {
|
||||
var $view;
|
||||
this.options = _.extend({}, this.options, options);
|
||||
this.showing_fake_folder = NEWSBLUR.reader.flags['river_view'] &&
|
||||
NEWSBLUR.reader.active_folder &&
|
||||
(NEWSBLUR.reader.active_folder.get('fake') || !NEWSBLUR.reader.active_folder.get('folder_title'));
|
||||
|
||||
if (NEWSBLUR.reader.active_feed == 'starred') {
|
||||
$view = $(_.template('\
|
||||
|
@ -189,7 +191,7 @@ NEWSBLUR.Views.StoryTitlesHeader = Backbone.View.extend({
|
|||
}
|
||||
},
|
||||
|
||||
open_options_popover: function() {
|
||||
open_options_popover: function(e) {
|
||||
if (!this.showing_fake_folder) return;
|
||||
|
||||
NEWSBLUR.FeedOptionsPopover.create({
|
||||
|
|
Loading…
Add table
Reference in a new issue