mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 02:36:18 +08:00
424a3b042a
REFACTOR: ES6ified all the modals
22 lines
562 B
JavaScript
22 lines
562 B
JavaScript
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
|
import ObjectController from 'discourse/controllers/object';
|
|
|
|
export default ObjectController.extend(ModalFunctionality, {
|
|
previousSelected: Ember.computed.equal('selectedTab', 'previous'),
|
|
newSelected: Ember.computed.equal('selectedTab', 'new'),
|
|
|
|
onShow: function() {
|
|
this.send("selectNew");
|
|
},
|
|
|
|
actions: {
|
|
selectNew: function() {
|
|
this.set('selectedTab', 'new');
|
|
},
|
|
|
|
selectPrevious: function() {
|
|
this.set('selectedTab', 'previous');
|
|
}
|
|
}
|
|
});
|