A free, self-hostable news aggregator…
Fusionne notification.js dans main.js
Alexandre Alapetite5c68233985b1
diff --git a/app/App_FrontController.php b/app/App_FrontController.phpindex 844956cf9..411550b38 100644--- a/app/App_FrontController.php+++ b/app/App_FrontController.php@@ -65,7 +65,6 @@ class App_FrontController extends FrontController {if ($this->conf->lazyload () === 'yes') {View::appendScript (Url::display ('/scripts/jquery.lazyload.min.js'));}- View::appendScript (Url::display ('/scripts/notification.js'));}private function loadNotifications () {diff --git a/public/scripts/main.js b/public/scripts/main.jsindex 72795be51..18df73820 100644--- a/public/scripts/main.js+++ b/public/scripts/main.js@@ -408,6 +408,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;@@ -418,5 +436,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.jsdeleted file mode 100644index 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;- });- }-});