mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 23:14:20 +08:00
fab36e6cf7
- Remove all `needs:` code
27 lines
640 B
JavaScript
27 lines
640 B
JavaScript
import debounce from 'discourse/lib/debounce';
|
|
|
|
export default Ember.Controller.extend({
|
|
application: Ember.inject.controller(),
|
|
queryParams: ["period", "order", "asc", "name"],
|
|
period: "weekly",
|
|
order: "likes_received",
|
|
asc: null,
|
|
name: "",
|
|
|
|
showTimeRead: Ember.computed.equal("period", "all"),
|
|
|
|
_setName: debounce(function() {
|
|
this.set("name", this.get("nameInput"));
|
|
}, 500).observes("nameInput"),
|
|
|
|
_showFooter: function() {
|
|
this.set("application.showFooter", !this.get("model.canLoadMore"));
|
|
}.observes("model.canLoadMore"),
|
|
|
|
actions: {
|
|
loadMore() {
|
|
this.get("model").loadMore();
|
|
}
|
|
}
|
|
});
|