|
|
@ -315,24 +315,15 @@
|
|
|
|
{% if not request.endpoint == 'login_page' %}
|
|
|
|
{% if not request.endpoint == 'login_page' %}
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(document).ready(function () {
|
|
|
|
BadgesAjax();
|
|
|
|
BadgesAjax();
|
|
|
|
$(window).on('load resize', function () {
|
|
|
|
|
|
|
|
if ($('body').hasClass('mini-sidebar')) {
|
|
|
|
$(window).on( 'ready orientationchange resize', function() {
|
|
|
|
$('#buttons_bars').width($(window).width());
|
|
|
|
adjustResponsiveUI();
|
|
|
|
$('.page-wrapper').attr('style', 'padding-top: 60px !important');
|
|
|
|
|
|
|
|
$('.badge').each(function() {
|
|
|
|
|
|
|
|
$(this).css('max-width', $(this).closest( "div" ).width());
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
$('form .row :first-child').each( function() {
|
|
|
|
|
|
|
|
$(this).removeClass('text-right');
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
$('.container-fluid .row :first-child').each( function() {
|
|
|
|
|
|
|
|
$(this).removeClass('text-right');
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$('#buttons_bars').width($('.page-wrapper').width());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.table').on( 'init.dt', function () {
|
|
|
|
|
|
|
|
adjustResponsiveUI();
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
|
|
$('.table').on('draw.dt', function () {
|
|
|
|
$('.table').on('draw.dt', function () {
|
|
|
|
$('[data-toggle="tooltip"]').tooltip({html: true});
|
|
|
|
$('[data-toggle="tooltip"]').tooltip({html: true});
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -416,12 +407,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if ($('#buttons_bar_left').children().length > 0 || $('#buttons_bar_right').children().length > 0) {
|
|
|
|
$(window).trigger('orientationchange');
|
|
|
|
$('#buttons_bars').show();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$('#buttons_bars').hide();
|
|
|
|
|
|
|
|
$('.page-wrapper').css('padding-top', '-=60');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Add apikey to all AJAX requests.
|
|
|
|
// Add apikey to all AJAX requests.
|
|
|
@ -461,6 +447,38 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function adjustResponsiveUI() {
|
|
|
|
|
|
|
|
if ($(window).width() <= 750) {
|
|
|
|
|
|
|
|
$('#buttons_bars').width($('body').width());
|
|
|
|
|
|
|
|
$('#buttons_bars').css('left', '30px');
|
|
|
|
|
|
|
|
} else if ($(window).width() <= 1152) {
|
|
|
|
|
|
|
|
$('#buttons_bars').width($('body').width() - 60);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$('#buttons_bars').width($('body').width() - 240);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.badge').each(function() {
|
|
|
|
|
|
|
|
$(this).css('max-width', $(this).closest( "div" ).width());
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($(window).width() <= 1170) {
|
|
|
|
|
|
|
|
$('form .row :first-child').each( function() {
|
|
|
|
|
|
|
|
$(this).removeClass('text-right');
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
$('.container-fluid .row :first-child').each( function() {
|
|
|
|
|
|
|
|
$(this).removeClass('text-right');
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($('#buttons_bar_left').children().length > 0 || $('#buttons_bar_right').children().length > 0) {
|
|
|
|
|
|
|
|
$('#buttons_bars').show();
|
|
|
|
|
|
|
|
$('.page-wrapper').attr('style', 'padding-top: 60px !important');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$('#buttons_bars').hide();
|
|
|
|
|
|
|
|
$('.page-wrapper').attr('style', 'padding-top: 0px !important');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$('#shutdown').on('click', function () {
|
|
|
|
$('#shutdown').on('click', function () {
|
|
|
|
document.open();
|
|
|
|
document.open();
|
|
|
|
document.write('Bazarr has shutdown.');
|
|
|
|
document.write('Bazarr has shutdown.');
|
|
|
|