Also changed "Jump To Post" to go to the post index in the stream rather than the post number
17 lines
423 B
JavaScript
17 lines
423 B
JavaScript
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
|
|
|
export default Ember.Controller.extend(ModalFunctionality, {
|
|
model: null,
|
|
postNumber: null,
|
|
|
|
actions: {
|
|
jump() {
|
|
const max = this.get("topic.postStream.filteredPostsCount");
|
|
const where = Math.min(max, Math.max(1, parseInt(this.get("postNumber"))));
|
|
|
|
this.jumpToIndex(where);
|
|
this.send('closeModal');
|
|
}
|
|
}
|
|
});
|