Hide the navigation bar when sorting won't work

This commit is contained in:
Andy Armstrong
2016-12-13 17:23:19 -05:00
parent 9bbf96391c
commit f58d920b13
3 changed files with 8 additions and 2 deletions

View File

@@ -100,7 +100,8 @@
this.threadListView = new DiscussionThreadListView({
el: this.$('.inline-threads'),
collection: self.discussion,
courseSettings: self.course_settings
courseSettings: self.course_settings,
hideRefineBar: true // TODO: re-enable the search/filter bar when it works correctly
});
this.threadListView.render();

View File

@@ -91,6 +91,7 @@
DiscussionThreadListView.prototype.initialize = function(options) {
var self = this;
this.courseSettings = options.courseSettings;
this.hideRefineBar = options.hideRefineBar;
this.supportsActiveThread = options.supportsActiveThread;
this.displayedCollection = new Discussion(this.collection.models, {
pages: this.collection.pages
@@ -221,6 +222,9 @@
}
this.showMetadataAccordingToSort();
this.renderMorePages();
if (this.hideRefineBar) {
this.$('.forum-nav-refine-bar').addClass('is-hidden');
}
this.trigger('threads:rendered');
};

View File

@@ -38,7 +38,8 @@
this.discussionThreadListView = new DiscussionThreadListView({
collection: this.discussion,
el: this.$('.inline-threads'),
courseSettings: this.courseSettings
courseSettings: this.courseSettings,
hideRefineBar: true // TODO: re-enable the search/filter bar when it works correctly
}).render();
this.discussionThreadListView.on('thread:selected', _.bind(this.navigateToThread, this));