X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/78644811ca0c6042212788dc67add42bc41fb74c..084544e4f7c9269b1445a9e5109fa641a3e1aaac:/platforma/static/js/views/flash.js?ds=inline diff --git a/platforma/static/js/views/flash.js b/platforma/static/js/views/flash.js index b2240e43..e67b0463 100644 --- a/platforma/static/js/views/flash.js +++ b/platforma/static/js/views/flash.js @@ -23,18 +23,20 @@ var FlashView = View.extend({ render: function() { this.element.html(render_template(this.template, this)); + setTimeout(function() {}, 0); }, - modelFirstFlashMessageChanged: function(property, value) { - this.element.fadeOut('slow', function() { - this.element.css({'z-index': 0}); - this.shownMessage = value; - this.render(); + modelFirstFlashMessageChanged: function(property, value) { + this.element.fadeOut(200, (function() { + + this.element.css({'z-index': 0}); + this.shownMessage = value; + this.render(); - if(this.shownMessage) { + if(this.shownMessage) { this.element.css({'z-index': 1000}); - this.element.fadeIn('slow'); - } - }.bind(this)); + this.element.fadeIn(); + }; + }).bind(this)); } });