1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 08:27:42 +02:00

Move alerts to their own controller

This commit is contained in:
Toby Zerner
2015-02-08 15:51:40 +10:30
parent 28d213d868
commit 2d181933ea
8 changed files with 47 additions and 32 deletions

View File

@@ -0,0 +1,17 @@
import Ember from 'ember';
export default Ember.Controller.extend({
alerts: [],
actions: {
alert: function(message) {
this.get('alerts').pushObject(message);
},
dismissAlert: function(message) {
this.get('alerts').removeObject(message);
},
clearAlerts: function() {
this.get('alerts').clear();
}
}
});