Merge pull request #4763 from Icinga/drop-internet-explorer-support
Drop IE support
This commit is contained in:
commit
de424ddadb
|
@ -16,7 +16,6 @@ $innerLayoutScript = $this->layout()->innerLayout . '.phtml';
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="google" value="notranslate">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta http-equiv="cleartype" content="on">
|
||||
<title><?= $this->title ? $this->escape($this->title) : $this->defaultTitle ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
|
|
|
@ -28,7 +28,6 @@ $innerLayoutScript = $this->layout()->innerLayout . '.phtml';
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="google" value="notranslate">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta http-equiv="cleartype" content="on">
|
||||
<title><?= $this->title ? $this->escape($this->title) . ' :: ' : '' ?><?= $this->defaultTitle ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<?php if (isset($this->layout()->redirectUrl)): ?>
|
||||
<meta name="redirectUrl" content="<?= $this->layout()->redirectUrl; ?>">
|
||||
<?php endif ?>
|
||||
</head>
|
||||
<body>
|
||||
<?= $this->render('inline.phtml'); ?>
|
||||
</body>
|
||||
</html>
|
|
@ -23,10 +23,6 @@ or sub-category here:
|
|||
If your desired browser and its version is showing up in green when visiting the respective link,
|
||||
it's probably okay to use it for Icinga Web 2.
|
||||
|
||||
!!! note
|
||||
|
||||
Support for Internet Explorer will be completely dropped with version 2.11
|
||||
|
||||
## Upgrade <a id="upgrade"></a>
|
||||
|
||||
In case you are upgrading from an older version of Icinga Web 2
|
||||
|
|
|
@ -5,6 +5,7 @@ v2.6 to v2.8 requires to follow the instructions for v2.7 too.
|
|||
|
||||
## Upgrading to Icinga Web 2 2.11.x
|
||||
|
||||
* Support for Internet Explorer 11 has been removed.
|
||||
* The Vagrant file and all its assets have been removed.
|
||||
* The `IniStore` class has been removed due to the deprecation of the Preferences ini backend.
|
||||
* The `DbStore` class has been removed and its methods have been added to `PreferencesStore` class.
|
||||
|
|
|
@ -56,22 +56,18 @@ if (in_array($path, $special)) {
|
|||
|
||||
switch ($path) {
|
||||
case 'css/icinga.css':
|
||||
$forIe11 = (bool) preg_match('/Trident\/7.0;.*rv:11/', $_SERVER['HTTP_USER_AGENT']);
|
||||
Stylesheet::send(false, $forIe11);
|
||||
Stylesheet::send();
|
||||
exit;
|
||||
case 'css/icinga.min.css':
|
||||
$forIe11 = (bool) preg_match('/Trident\/7.0;.*rv:11/', $_SERVER['HTTP_USER_AGENT']);
|
||||
Stylesheet::send(true, $forIe11);
|
||||
Stylesheet::send(true);
|
||||
exit;
|
||||
|
||||
case 'js/icinga.dev.js':
|
||||
$forIe11 = (bool) preg_match('/Trident\/7.0;.*rv:11/', $_SERVER['HTTP_USER_AGENT']);
|
||||
JavaScript::send(false, $forIe11);
|
||||
JavaScript::send();
|
||||
exit;
|
||||
|
||||
case 'js/icinga.min.js':
|
||||
$forIe11 = (bool) preg_match('/Trident\/7.0;.*rv:11/', $_SERVER['HTTP_USER_AGENT']);
|
||||
JavaScript::sendMinified($forIe11);
|
||||
JavaScript::sendMinified();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -10,14 +10,8 @@ require_once 'lessphp/lessc.inc.php';
|
|||
|
||||
class LessParser extends lessc
|
||||
{
|
||||
/**
|
||||
* @param bool $disableModes Disable replacing compiled Less colors with CSS var() function calls and don't inject
|
||||
* light mode calls
|
||||
*/
|
||||
public function __construct($disableModes = false)
|
||||
public function __construct()
|
||||
{
|
||||
if (! $disableModes) {
|
||||
$this->setOption('plugins', [new Visitor()]);
|
||||
}
|
||||
$this->setOption('plugins', [new Visitor()]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1168,9 +1168,6 @@ class Form extends Zend_Form
|
|||
|| $this->getUidDisabled()
|
||||
|| $this->wasSent($formData)
|
||||
) {
|
||||
if (($frameUpload = (bool) $request->getUrl()->shift('_frameUpload', false))) {
|
||||
$this->getView()->layout()->setLayout('wrapped');
|
||||
}
|
||||
$this->populate($formData); // Necessary to get isSubmitted() to work
|
||||
if (! $this->getSubmitLabel() || $this->isSubmitted()) {
|
||||
if ($this->isValid($formData)
|
||||
|
@ -1192,10 +1189,8 @@ class Form extends Zend_Form
|
|||
$this->getResponse()->json()
|
||||
->setSuccessData($message !== null ? array('message' => $message) : null)
|
||||
->sendResponse();
|
||||
} elseif (! $frameUpload) {
|
||||
$this->getResponse()->redirectAndExit($this->getRedirectUrl());
|
||||
} else {
|
||||
$this->getView()->layout()->redirectUrl = $this->getRedirectUrl()->getAbsoluteUrl();
|
||||
$this->getResponse()->redirectAndExit($this->getRedirectUrl());
|
||||
}
|
||||
// TODO: Still bad. An api target must not behave as one if it's not an api request
|
||||
} elseif ($this->getIsApiTarget() || $this->getRequest()->isApiRequest()) {
|
||||
|
|
|
@ -53,9 +53,9 @@ class JavaScript
|
|||
'js/define.js'
|
||||
];
|
||||
|
||||
public static function sendMinified($forIe11 = false)
|
||||
public static function sendMinified()
|
||||
{
|
||||
self::send(true, $forIe11);
|
||||
self::send(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,7 +65,7 @@ class JavaScript
|
|||
*
|
||||
* @param bool $minified Whether to compress the client side script code
|
||||
*/
|
||||
public static function send($minified = false, $forIe11 = false)
|
||||
public static function send($minified = false)
|
||||
{
|
||||
header('Content-Type: application/javascript');
|
||||
$basedir = Icinga::app()->getBootstrapDirectory();
|
||||
|
@ -91,11 +91,9 @@ class JavaScript
|
|||
$files[] = $filePath;
|
||||
}
|
||||
|
||||
if (! $forIe11) {
|
||||
// Prepare library file list
|
||||
foreach (Icinga::app()->getLibraries() as $library) {
|
||||
$files = array_merge($files, $library->getJsAssets());
|
||||
}
|
||||
// Prepare library file list
|
||||
foreach (Icinga::app()->getLibraries() as $library) {
|
||||
$files = array_merge($files, $library->getJsAssets());
|
||||
}
|
||||
|
||||
// Prepare core file list
|
||||
|
@ -151,28 +149,26 @@ class JavaScript
|
|||
$baseJs .= file_get_contents($file) . "\n\n\n";
|
||||
}
|
||||
|
||||
if (! $forIe11) {
|
||||
// Library files need to be namespaced first before they can be included
|
||||
foreach (Icinga::app()->getLibraries() as $library) {
|
||||
foreach ($library->getJsAssets() as $file) {
|
||||
$alreadyMinified = false;
|
||||
if ($minified && file_exists(($minFile = substr($file, 0, -3) . '.min.js'))) {
|
||||
$alreadyMinified = true;
|
||||
$file = $minFile;
|
||||
}
|
||||
// Library files need to be namespaced first before they can be included
|
||||
foreach (Icinga::app()->getLibraries() as $library) {
|
||||
foreach ($library->getJsAssets() as $file) {
|
||||
$alreadyMinified = false;
|
||||
if ($minified && file_exists(($minFile = substr($file, 0, -3) . '.min.js'))) {
|
||||
$alreadyMinified = true;
|
||||
$file = $minFile;
|
||||
}
|
||||
|
||||
$content = self::optimizeDefine(
|
||||
file_get_contents($file),
|
||||
$file,
|
||||
$library->getJsAssetPath(),
|
||||
$library->getName()
|
||||
);
|
||||
$content = self::optimizeDefine(
|
||||
file_get_contents($file),
|
||||
$file,
|
||||
$library->getJsAssetPath(),
|
||||
$library->getName()
|
||||
);
|
||||
|
||||
if ($alreadyMinified) {
|
||||
$out .= ';' . ltrim(trim($content), ';') . "\n";
|
||||
} else {
|
||||
$js .= $content . "\n\n\n";
|
||||
}
|
||||
if ($alreadyMinified) {
|
||||
$out .= ';' . ltrim(trim($content), ';') . "\n";
|
||||
} else {
|
||||
$js .= $content . "\n\n\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,13 +58,10 @@ class LessCompiler
|
|||
|
||||
/**
|
||||
* Create a new LESS compiler
|
||||
*
|
||||
* @param bool $disableModes Disable replacing compiled Less colors with CSS var() function calls and don't inject
|
||||
* light mode calls
|
||||
*/
|
||||
public function __construct($disableModes = false)
|
||||
public function __construct()
|
||||
{
|
||||
$this->lessc = new LessParser($disableModes);
|
||||
$this->lessc = new LessParser();
|
||||
// Discourage usage of import because we're caching based on an explicit list of LESS files to compile
|
||||
$this->lessc->importDisabled = true;
|
||||
}
|
||||
|
|
|
@ -106,15 +106,12 @@ class StyleSheet
|
|||
|
||||
/**
|
||||
* Create the StyleSheet
|
||||
*
|
||||
* @param bool $disableModes Disable replacing compiled Less colors with CSS var() function calls and don't inject
|
||||
* light mode calls
|
||||
*/
|
||||
public function __construct($disableModes = false)
|
||||
public function __construct()
|
||||
{
|
||||
$app = Icinga::app();
|
||||
$this->app = $app;
|
||||
$this->lessCompiler = new LessCompiler($disableModes);
|
||||
$this->lessCompiler = new LessCompiler();
|
||||
$this->pubPath = $app->getBaseDir('public');
|
||||
$this->collect();
|
||||
}
|
||||
|
@ -224,13 +221,11 @@ class StyleSheet
|
|||
*
|
||||
* Does not cache the stylesheet if the HTTP header Cache-Control or Pragma is set to no-cache.
|
||||
*
|
||||
* @param bool $minified Whether to compress the stylesheet
|
||||
* @param bool $disableModes Disable replacing compiled Less colors with CSS var() function calls and don't inject
|
||||
* light mode calls
|
||||
* @param bool $minified Whether to compress the stylesheet
|
||||
*/
|
||||
public static function send($minified = false, $disableModes = false)
|
||||
public static function send($minified = false)
|
||||
{
|
||||
$styleSheet = new self($disableModes);
|
||||
$styleSheet = new self();
|
||||
|
||||
$request = $styleSheet->app->getRequest();
|
||||
$response = $styleSheet->app->getResponse();
|
||||
|
|
|
@ -14,8 +14,6 @@ body {
|
|||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// Prevent nav-level-2 flyovers from being covered by #main
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
#content-wrapper {
|
||||
|
@ -58,10 +56,6 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
#fileupload-frame-target {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#responsive-debug {
|
||||
font-size: 0.9em;
|
||||
font-family: Courier new, monospace;
|
||||
|
|
|
@ -340,13 +340,13 @@ a:hover > .icon-cancel {
|
|||
}
|
||||
|
||||
> i.collapse-icon {
|
||||
display: inline;
|
||||
display: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.collapsible.collapsed + .collapsible-control button {
|
||||
> i.expand-icon {
|
||||
display: inline;
|
||||
display: unset;
|
||||
}
|
||||
|
||||
> i.collapse-icon {
|
||||
|
|
|
@ -31,10 +31,6 @@
|
|||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-level-2 {
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
#layout:not(.sidebar-collapsed) #menu .nav-item > a:first-of-type {
|
||||
|
|
|
@ -86,12 +86,6 @@
|
|||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
/* IE */
|
||||
@-ms-keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
/* Opera < 12.1 */
|
||||
@-o-keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
/*! Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
|
||||
|
||||
/* IE11 Polyfills */
|
||||
|
||||
if (window.NodeList && !NodeList.prototype.forEach) {
|
||||
NodeList.prototype.forEach = Array.prototype.forEach;
|
||||
}
|
||||
|
||||
/* jQuery Plugins */
|
||||
(function ($) {
|
||||
|
||||
|
|
|
@ -448,7 +448,6 @@
|
|||
// the highest precedence before hrefs defined in the tr itself and regular links
|
||||
var $a = $('a[href].rowaction', el).first();
|
||||
if ($a.length) {
|
||||
// TODO: Find out whether we leak memory on IE with this:
|
||||
$(el).attr('href', $a.attr('href'));
|
||||
return;
|
||||
}
|
||||
|
@ -461,11 +460,6 @@
|
|||
}
|
||||
});
|
||||
|
||||
// IE will not ignore user-select unless we cancel selectstart
|
||||
$('table.action.multiselect tr, table.table-row-selectable.multiselect tr', container).each(function(idx, el) {
|
||||
$(el).on('selectstart', false);
|
||||
});
|
||||
|
||||
// draw all active selections that have disappeared on reload
|
||||
_this.tables().each(function(i, el) {
|
||||
new Selection(el, _this.icinga).refresh();
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
var toCollapse = [];
|
||||
|
||||
$.each(document.querySelectorAll('.collapsible'), function (_, collapsible) {
|
||||
if ($(collapsible).is('.can-collapse')) {
|
||||
if (collapsible.matches('.can-collapse')) {
|
||||
if (! _this.canCollapse(collapsible)) {
|
||||
var toggleSelector = collapsible.dataset.toggleElement;
|
||||
if (! toggleSelector) {
|
||||
|
@ -98,7 +98,7 @@
|
|||
Collapsible.prototype.onExpand = function(collapsiblePath) {
|
||||
var collapsible = $(collapsiblePath)[0];
|
||||
|
||||
if (collapsible && $(collapsible).is('.can-collapse')) {
|
||||
if (collapsible && collapsible.matches('.can-collapse')) {
|
||||
this.expand(collapsible);
|
||||
}
|
||||
};
|
||||
|
@ -134,7 +134,7 @@
|
|||
_this.icinga.logger.error(
|
||||
'[Collapsible] Collapsible control has no associated .collapsible: ', $target[0]);
|
||||
} else if (typeof collapsible.dataset.noPersistence !== 'undefined') {
|
||||
if ($(collapsible).is('.collapsed')) {
|
||||
if (collapsible.matches('.collapsed')) {
|
||||
_this.expand(collapsible);
|
||||
} else {
|
||||
_this.collapse(collapsible, _this.calculateCollapsedHeight(collapsible));
|
||||
|
@ -200,9 +200,9 @@
|
|||
return '';
|
||||
}
|
||||
|
||||
if (collapsible.tagName === 'TABLE') {
|
||||
if (collapsible.matches('table')) {
|
||||
return '> tbody > tr';
|
||||
} else if (collapsible.tagName === 'UL' || collapsible.tagName === 'OL') {
|
||||
} else if (collapsible.matches('ul, ol')) {
|
||||
return '> li:not(.collapsible-control)';
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* @param icinga
|
||||
* @constructor
|
||||
*/
|
||||
var InputEnrichment = function (icinga) {
|
||||
let InputEnrichment = function (icinga) {
|
||||
Icinga.EventListener.call(this, icinga);
|
||||
|
||||
this.on('beforerender', '#main > .container, #modal-content', this.onBeforeRender, this);
|
||||
|
@ -76,8 +76,8 @@
|
|||
let inputs = event.target.querySelectorAll('[data-enrichment-type]');
|
||||
|
||||
// Remember current instances
|
||||
inputs.forEach(function (input) {
|
||||
var enrichment = _this._enrichments.get(input);
|
||||
inputs.forEach((input) => {
|
||||
let enrichment = _this._enrichments.get(input);
|
||||
if (enrichment) {
|
||||
_this._cachedEnrichments[_this.icinga.utils.getDomPath(input).join(' > ')] = enrichment;
|
||||
}
|
||||
|
@ -95,9 +95,9 @@
|
|||
|
||||
if (autorefresh) {
|
||||
// Apply remembered instances
|
||||
for (var inputPath in _this._cachedEnrichments) {
|
||||
var enrichment = _this._cachedEnrichments[inputPath];
|
||||
var input = container.querySelector(inputPath);
|
||||
for (let inputPath in _this._cachedEnrichments) {
|
||||
let enrichment = _this._cachedEnrichments[inputPath];
|
||||
let input = container.querySelector(inputPath);
|
||||
if (input !== null) {
|
||||
enrichment.refresh(input);
|
||||
_this._enrichments.set(input, enrichment);
|
||||
|
@ -110,9 +110,9 @@
|
|||
}
|
||||
|
||||
// Create new instances
|
||||
var inputs = container.querySelectorAll('[data-enrichment-type]');
|
||||
inputs.forEach(function (input) {
|
||||
var enrichment = _this._enrichments.get(input);
|
||||
let inputs = container.querySelectorAll('[data-enrichment-type]');
|
||||
inputs.forEach((input) => {
|
||||
let enrichment = _this._enrichments.get(input);
|
||||
if (! enrichment) {
|
||||
switch (input.dataset.enrichmentType) {
|
||||
case 'search-bar':
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
*/
|
||||
window.addEventListener('storage', function(event) {
|
||||
var url = icinga.utils.parseUrl(event.url);
|
||||
if (! url.path.substring(0, icinga.config.baseUrl.length) === icinga.config.baseUrl) {
|
||||
if (! url.path.startsWith(icinga.config.baseUrl)) {
|
||||
// A localStorage is shared between all paths on the same origin.
|
||||
// So we need to make sure it's us who made a change.
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue