When there are 2000 or more posts, only show the post number on the progress bar
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
<div id='topic-progress-wrapper' {{bindAttr class="dockedCounter:docked"}}>
|
||||
<nav id='topic-progress' title="{{i18n topic.progress.title}}" {{bindAttr class="hideProgress:hidden"}}>
|
||||
<button id='jump-top' title="{{i18n topic.progress.jump_top}}" {{bindAttr disabled="jumpTopDisabled"}} {{action jumpTop}}><i class="icon-circle-arrow-up"></i></button>
|
||||
<div class='nums'>
|
||||
<h4 title="{{i18n topic.progress.current}}">{{progressPosition}}</h4> <span>{{i18n of_value}}</span> <h4>{{highest_post_number}}</h4>
|
||||
<div class='nums' {{bindAttr title="progressPositionTitle"}}>
|
||||
<h4>{{progressPosition}}</h4><span {{bindAttr class="hugeNumberOfPosts:hidden"}}> <span>{{i18n of_value}}</span> <h4>{{highest_post_number}}</h4></span>
|
||||
</div>
|
||||
<button id='jump-bottom' title="{{i18n topic.progress.jump_bottom}}" {{bindAttr disabled="jumpBottomDisabled"}} {{action jumpBottom}}><i class="icon-circle-arrow-down"></i></button>
|
||||
<div class='bg'> </div>
|
||||
|
||||
Reference in New Issue
Block a user