Commit 40000a3a by David Baumgold

Make close tab on alerts close the alert

parent c0d69022
...@@ -7,5 +7,11 @@ CMS.Views.Alert = Backbone.View.extend({ ...@@ -7,5 +7,11 @@ CMS.Views.Alert = Backbone.View.extend({
render: function() { render: function() {
this.$el.html(this.template(this.model.attributes)); this.$el.html(this.template(this.model.attributes));
return this; return this;
},
events: {
"click .action-alert-close": "hide"
},
hide: function() {
this.model.set("shown", false);
} }
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment