diff --git a/application/modules/admin/views/scripts/head.phtml b/application/modules/admin/views/scripts/head.phtml index 938948483c2e989248644989cde9ab506403c1c0..d40f2c16121bdd7af1312621aac37c97a8ae45c3 100644 --- a/application/modules/admin/views/scripts/head.phtml +++ b/application/modules/admin/views/scripts/head.phtml @@ -11,6 +11,7 @@ 'subModal']) ->loadJQuery() ->loadJQueryUI() + ->loadNotificationJS() ->addInlineScript(sprintf('var baseUrl="%s"; var imagesUrl="%s"; var cssUrl="%s"; var userFilesUrl="%s"', BASE_URL, URL_ADMIN_IMG, URL_ADMIN_CSS, USERFILESURL)) ->addAdminScripts(['onload_utils', diff --git a/application/modules/admin/views/scripts/index/index.phtml b/application/modules/admin/views/scripts/index/index.phtml index d91a7ccc7e2e02c7a40ca35b1b58bd4738c5c124..5897bab2e18d5b6aed0ad0b74dc558c9268832cc 100644 --- a/application/modules/admin/views/scripts/index/index.phtml +++ b/application/modules/admin/views/scripts/index/index.phtml @@ -74,4 +74,17 @@ foreach ($modstats as $stat) { document.getElementById("forum_embed").src = "https://groups.google.com/forum/embed/?place=forum/afi-opac2" + "&showsearch=true&hl=fr&hideforumtitle=true&showpopout=true"; -</script> +</script> + + +<script> +(function() { + function supportsCanvas() { + return !!document.createElement('canvas').getContext; + } + + if (!supportsCanvas()) + showNotification({message: 'Votre navigateur ne permet pas d\'utiliser pleinement l\'interface d\'administration. Pour un fonctionnement optimal, nous recommandons d\'utiliser une version récente Firefox, Chrome, Safari ou Internet Explorer', + type: 'error'}); +})(); +</script> diff --git a/library/Class/ScriptLoader.php b/library/Class/ScriptLoader.php index e8b5ce33bb17b4f346fb3605695fa2f392c796fc..3b5832a8c4bb50e23aaa003ba24d3a3416e4ca27 100644 --- a/library/Class/ScriptLoader.php +++ b/library/Class/ScriptLoader.php @@ -279,9 +279,7 @@ class Class_ScriptLoader { */ public function notify($message) { return $this - ->addScript(URL_ADMIN_JS.'notification/js/jquery_notification_v.1') - ->addStyleSheet(URL_ADMIN_JS.'notification/css/jquery_notification') - ->addSkinStyleSheet('notification') + ->loadNotificationJS() ->addJQueryReady(sprintf('showNotification(%s)', json_encode(array('message' => $message, 'autoClose' => true, @@ -290,6 +288,14 @@ class Class_ScriptLoader { } + public function loadNotificationJS() { + return $this + ->addScript(URL_ADMIN_JS.'notification/js/jquery_notification_v.1') + ->addStyleSheet(URL_ADMIN_JS.'notification/css/jquery_notification') + ->addSkinStyleSheet('notification'); + } + + /** * @return ScriptLoader */