From 796b066c5b46c4bcdc4854ada7c323cd8b0332f7 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 27 Aug 2020 06:54:42 +0000 Subject: [PATCH] Bug 26305: Detect Internet Explorer and show warning in Staff Interface Koha no longer works with Internet Explorer. Since this change, and Microsoft's own dropping of support for IE is quite recent, let us show a banner warning staff interface users, so they can understand why Koha does not work as expected when they try to use it in IE. This patch detects a Microsoft property in the window object, and displays an alert banner, when one uses Koha's staff interface in Internet Explorer. To test: 1) Go to http://localhost:8081 in Internet Explorer 2) Note the banner that says the following: "Koha no longer supports the Internet Explorer browser. Please use a supported browser such as Firefox, Chrome, or Edge." Signed-off-by: Henry Bolshaw --- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index 05681d3d8d..3fad2e552b 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -320,3 +320,11 @@ function getContextBiblioNumbers() { function resetSearchContext() { setContextBiblioNumbers( new Array() ); } + +//Warn users if they're using Internet Explorer +$(document).ready(function(){ + if (window.MSCompatibleInfo){ + var MSG_WARN_MS_BROWSER_COMPAT = _("Koha no longer supports the Internet Explorer browser. Please use a supported browser such as Firefox, Chrome, or Edge."); + $("body").prepend("
" + MSG_WARN_MS_BROWSER_COMPAT + "
"); + } +}); -- 2.11.0