From 554f4684622564fe496acb25cacb2daed3b9f3ac Mon Sep 17 00:00:00 2001
From: Grzegorz Bizon <grzegorz.bizon@ntsn.pl>
Date: Thu, 3 Dec 2015 08:51:37 +0100
Subject: [PATCH] Pin flash message to top if award note is invalid

---
 app/assets/javascripts/notes.js.coffee | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee
index ea190fa8b7..8eacd05d05 100644
--- a/app/assets/javascripts/notes.js.coffee
+++ b/app/assets/javascripts/notes.js.coffee
@@ -113,7 +113,9 @@ class @Notes
   renderNote: (note) ->
     unless note.valid
       if note.award
-        new Flash('You have already used this award emoji !', 'alert')
+        flash = new Flash('You have already used this award emoji !', 'alert')
+        flash.pinToTop()
+        flash.raise()
       return
 
     # render note if it not present in loaded list
-- 
2.30.9