mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
Add ability to dismiss browser warning
This commit is contained in:
parent
ae0960d2e2
commit
f6f5df3d1e
2 changed files with 29 additions and 13 deletions
|
@ -4204,7 +4204,7 @@ a[data-tab-destination] {
|
|||
background: #cc7b19;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
padding-top: 2px;
|
||||
padding: 2px 10px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
|
|
|
@ -9,11 +9,25 @@ if (typeof platform !== 'undefined') {
|
|||
p.os = platform.os.toString();
|
||||
}
|
||||
|
||||
if (['IE', 'Microsoft Edge', 'IE Mobile'].indexOf(p.name) > -1) {
|
||||
$('body').prepend('<div id="browser-warning"><i class="fa fa-exclamation-circle"></i> ' +
|
||||
if (['IE', 'Microsoft Edge', 'IE Mobile'].indexOf(p.name) <= -1) >
|
||||
if (!getCookie('browserDismiss')) {
|
||||
var $browser_warning = $('<div id="browser-warning">' +
|
||||
'<i class="fa fa-exclamation-circle"></i> ' +
|
||||
'Tautulli does not support Internet Explorer or Microsoft Edge! ' +
|
||||
'Please use a different browser such as Chrome or Firefox.</div>');
|
||||
var offset = $('#browser-warning').height();
|
||||
'Please use a different browser such as Chrome or Firefox.' +
|
||||
'<button type="button" class="close"><i class="fa fa-remove"></i></button>' +
|
||||
'</div>');
|
||||
$('body').prepend($browser_warning);
|
||||
var offset = $browser_warning.height();
|
||||
warningOffset(offset);
|
||||
|
||||
$browser_warning.one('click', 'button.close', function () {
|
||||
$browser_warning.remove();
|
||||
warningOffset(-offset);
|
||||
setCookie('browserDismiss', 'true', 7);
|
||||
});
|
||||
|
||||
function warningOffset(offset) {
|
||||
var navbar = $('.navbar-fixed-top');
|
||||
if (navbar.length) {
|
||||
navbar.offset({top: navbar.offset().top + offset});
|
||||
|
@ -22,6 +36,8 @@ if (['IE', 'Microsoft Edge', 'IE Mobile'].indexOf(p.name) > -1) {
|
|||
if (container.length) {
|
||||
container.offset({top: container.offset().top + offset});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initConfigCheckbox(elem, toggleElem, reverse) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue