discourse/app/assets/javascripts/admin/controllers/admin_reports_controller.js
2014-06-10 11:54:38 -04:00

19 lines
483 B
JavaScript

Discourse.AdminReportsController = Ember.ObjectController.extend({
viewMode: 'table',
viewingTable: Em.computed.equal('viewMode', 'table'),
viewingBarChart: Em.computed.equal('viewMode', 'barChart'),
actions: {
// Changes the current view mode to 'table'
viewAsTable: function() {
this.set('viewMode', 'table');
},
// Changes the current view mode to 'barChart'
viewAsBarChart: function() {
this.set('viewMode', 'barChart');
}
}
});