diff options
| author | 2013-11-04 14:16:14 -0800 | |
|---|---|---|
| committer | 2013-11-04 14:16:14 -0800 | |
| commit | 7cf5e8ef33fa51c777f82585dfa116e4fa926371 (patch) | |
| tree | ef751687dbd492087022ac94c214f57ec44ae7e0 /public | |
| parent | aff58561e94396f2078c4f724cc50ab8acf26898 (diff) | |
| parent | 5c68233985b19262f44ff667417e0127df003854 (diff) | |
Merge pull request #215 from Alkarex/notificationsMain
Fusionne notification.js dans main.js
Diffstat (limited to 'public')
| -rw-r--r-- | public/scripts/main.js | 19 | ||||
| -rw-r--r-- | public/scripts/notification.js | 17 |
2 files changed, 19 insertions, 17 deletions
diff --git a/public/scripts/main.js b/public/scripts/main.js index ea4f3bec6..ce589326e 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -453,6 +453,24 @@ function init_actualize() { }); } +function closeNotification () { + $(".notification").slideUp (200, function () { + $(".notification").remove (); + }); +} + +function init_notifications() { + notif = $(".notification"); + if (notif[0] !== undefined) { + timer = setInterval('closeNotification()', 5000); + + notif.find ("a.close").click (function () { + closeNotification (); + return false; + }); + } +} + $(function () { if (is_reader_mode()) { hide_posts = false; @@ -463,5 +481,6 @@ $(function () { init_stream_delegates($('#stream')); init_nav_entries(); init_templates(); + init_notifications(); init_actualize(); }); diff --git a/public/scripts/notification.js b/public/scripts/notification.js deleted file mode 100644 index e4f9fb649..000000000 --- a/public/scripts/notification.js +++ /dev/null @@ -1,17 +0,0 @@ -function closeNotification () { - $(".notification").slideUp (200, function () { - $(".notification").remove (); - }); -} - -$(document).ready (function () { - notif = $(".notification"); - if (notif[0] !== undefined) { - timer = setInterval('closeNotification()', 5000); - - notif.find ("a.close").click (function () { - closeNotification (); - return false; - }); - } -}); |
