diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-06 15:06:27 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-04-11 17:20:47 +0100 |
commit | 552cde76fa96282dec4ba002cd1850d003a5b29f (patch) | |
tree | e296b4356ab0ab157930dce56ba5387a32ec5fb4 | |
parent | 99fe9c7b7703b1594c9cda571f43f20198f96b0f (diff) | |
download | gitlab-ce-552cde76fa96282dec4ba002cd1850d003a5b29f.tar.gz |
Hides notification after X amount of seconds
-rw-r--r-- | app/assets/javascripts/lib/notify.js.coffee | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/notify.js.coffee b/app/assets/javascripts/lib/notify.js.coffee index 3f9ca39912c..9e28353ac34 100644 --- a/app/assets/javascripts/lib/notify.js.coffee +++ b/app/assets/javascripts/lib/notify.js.coffee @@ -2,6 +2,11 @@ notificationGranted = (message, opts, onclick) -> notification = new Notification(message, opts) + # Hide the notification after X amount of seconds + setTimeout -> + notification.close() + , 8000 + if onclick notification.onclick = onclick |