1
0
mirror of https://github.com/exane/not-gwent-online synced 2025-11-05 00:58:26 +00:00

some notification changes

This commit is contained in:
exane
2015-06-30 13:43:03 +02:00
parent 4863e0e634
commit 521116027e
5 changed files with 64 additions and 25 deletions

View File

@@ -865,6 +865,9 @@ let Preview = Backbone.View.extend({
let Notification = Backbone.View.extend({
className: "notification",
template: require("../templates/notification.handlebars"),
events: {
"click .alert": "onClick"
},
initialize: function(opt){
this.opt = opt;
$(".notifications").append(this.el);
@@ -880,7 +883,7 @@ let Notification = Backbone.View.extend({
}, {
duration: 600,
complete: this.hide.bind(this)
}).delay(2500);
}).delay(2000);
},
hide: function(){
@@ -889,6 +892,9 @@ let Notification = Backbone.View.extend({
}, {
complete: this.remove.bind(this)
})
},
onClick: function(e) {
this.remove();
}
});