2014-07-23 11:20:45 +08:00
|
|
|
export default Ember.ObjectController.extend({
|
2013-03-18 03:02:36 +08:00
|
|
|
viewMode: 'table',
|
2013-05-30 01:33:54 +08:00
|
|
|
viewingTable: Em.computed.equal('viewMode', 'table'),
|
|
|
|
viewingBarChart: Em.computed.equal('viewMode', 'barChart'),
|
2013-03-18 03:02:36 +08:00
|
|
|
|
2013-09-17 02:08:55 +08:00
|
|
|
actions: {
|
|
|
|
// Changes the current view mode to 'table'
|
|
|
|
viewAsTable: function() {
|
|
|
|
this.set('viewMode', 'table');
|
|
|
|
},
|
2013-03-18 03:02:36 +08:00
|
|
|
|
2013-09-17 02:08:55 +08:00
|
|
|
// Changes the current view mode to 'barChart'
|
|
|
|
viewAsBarChart: function() {
|
|
|
|
this.set('viewMode', 'barChart');
|
|
|
|
}
|
2013-03-18 03:02:36 +08:00
|
|
|
}
|
|
|
|
|
2014-06-10 23:54:38 +08:00
|
|
|
});
|