mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 12:51:41 -05:00
24 lines
560 B
JavaScript
24 lines
560 B
JavaScript
/**
|
|
This route is used when a topic's "best of" filter is applied
|
|
|
|
@class TopicBestOfRoute
|
|
@extends Discourse.Route
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.TopicBestOfRoute = Discourse.Route.extend({
|
|
|
|
setupController: function(controller, params) {
|
|
var topicController;
|
|
params = params || {};
|
|
params.trackVisit = true;
|
|
params.bestOf = true;
|
|
topicController = this.controllerFor('topic');
|
|
topicController.cancelFilter();
|
|
topicController.set('bestOf', true);
|
|
topicController.loadPosts(params);
|
|
}
|
|
|
|
});
|
|
|
|
|