pull/997/head
Louis Vézina 5 years ago
parent fb6cfe0c55
commit e2fe834e1e

@ -511,7 +511,8 @@ if args.dev:
else: else:
server = create_server(app, server = create_server(app,
host=str(settings.general.ip), host=str(settings.general.ip),
port=int(args.port) if args.port else int(settings.general.port)) port=int(args.port) if args.port else int(settings.general.port),
threads=24)
if __name__ == "__main__": if __name__ == "__main__":
try: try:

@ -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.');

Loading…
Cancel
Save