mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add some logic to jumpTop/jumpBottom when best of is enabled
This commit is contained in:
parent
68d849419b
commit
0d83f373b8
@ -126,11 +126,19 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
|
|||||||
},
|
},
|
||||||
|
|
||||||
jumpTop: function() {
|
jumpTop: function() {
|
||||||
Discourse.URL.routeTo(this.get('content.url'));
|
if (this.get('bestOf')) {
|
||||||
|
Discourse.TopicView.scrollTo(this.get('id'), this.get('posts').first().get('post_number'));
|
||||||
|
} else {
|
||||||
|
Discourse.URL.routeTo(this.get('url'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
jumpBottom: function() {
|
jumpBottom: function() {
|
||||||
Discourse.URL.routeTo(this.get('content.lastPostUrl'));
|
if (this.get('bestOf')) {
|
||||||
|
Discourse.TopicView.scrollTo(this.get('id'), this.get('posts').last().get('post_number'));
|
||||||
|
} else {
|
||||||
|
Discourse.URL.routeTo(this.get('lastPostUrl'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
cancelFilter: function() {
|
cancelFilter: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user