From 0fe5ecbb24ca44cf4af831fbb9ab927bf4ed3777 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 5 Dec 2013 15:50:15 -0500 Subject: [PATCH] When there are 2000 or more posts, only show the post number on the progress bar --- .../javascripts/discourse/controllers/topic_controller.js | 8 ++++++++ .../javascripts/discourse/templates/topic.js.handlebars | 4 ++-- app/assets/stylesheets/desktop/topic.scss | 2 +- config/locales/client.en.yml | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/topic_controller.js b/app/assets/javascripts/discourse/controllers/topic_controller.js index 56b0a663fc..5fffb498a4 100644 --- a/app/assets/javascripts/discourse/controllers/topic_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic_controller.js @@ -293,6 +293,14 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected return false; }.property('postStream.loaded', 'currentPost', 'postStream.filteredPostsCount'), + hugeNumberOfPosts: function() { + return (this.get('postStream.filteredPostsCount') >= 1000); + }.property('postStream.filteredPostsCount'), + + progressPositionTitle: function() { + return I18n.t("topic.progress.position", {current: this.get('progressPosition'), total: this.get('highest_post_number')}); + }.property('progressPosition', 'highest_post_number'), + deselectPost: function(post) { this.get('selectedPosts').removeObject(post); diff --git a/app/assets/javascripts/discourse/templates/topic.js.handlebars b/app/assets/javascripts/discourse/templates/topic.js.handlebars index b785637b65..8f4627b625 100644 --- a/app/assets/javascripts/discourse/templates/topic.js.handlebars +++ b/app/assets/javascripts/discourse/templates/topic.js.handlebars @@ -51,8 +51,8 @@