mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 19:35:09 +08:00
19 lines
462 B
JavaScript
19 lines
462 B
JavaScript
export default 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');
|
|
}
|
|
}
|
|
|
|
});
|