From f889dc1dad31fe8b246058167d6feb973ee31614 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 13 Mar 2022 16:41:27 -0400 Subject: [PATCH 1/2] Fix bug could not drag servers after searching --- app/frontend/templates/panel/dashboard.html | 38 ++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/app/frontend/templates/panel/dashboard.html b/app/frontend/templates/panel/dashboard.html index 7de22880..aad659e0 100644 --- a/app/frontend/templates/panel/dashboard.html +++ b/app/frontend/templates/panel/dashboard.html @@ -133,7 +133,7 @@ - + {% if server['user_command_permission'] %} {% if server['stats']['running'] %} - +
+
+ {{ server['stats']['world_size'] }} - + {% if server['stats']['int_ping_results'] %} {{ server['stats']['online'] }} / {{ server['stats']['max'] }} {{ translate('dashboard', 'max', data['lang']) }}
@@ -237,7 +237,7 @@ {% end %} - + {% if server['stats']['running'] %} {{ translate('dashboard', 'online', data['lang']) }} @@ -651,20 +651,20 @@ document.getElementById('first').setAttribute('draggable', false); $('.dataTables_length').addClass('bs-select'); }); - $('#servers_table').on('search.dt', function() { - let value = $('.dataTables_filter input').val() - if(value === ''){ - const table = document.querySelector("table"); - for (const row of table.rows) { - row.setAttribute('draggable', true) - } - }else{ - const table = document.querySelector("table"); - for (const row of table.rows) { - row.setAttribute('draggable', false) - } + $(document).mousedown(function( event ) { + let value = $('.dataTables_filter input').val() + if(value === ''){ + const table = document.querySelector("table"); + for (const row of table.rows) { + row.setAttribute('draggable', true) } - } ); + }else{ + const table = document.querySelector("table"); + for (const row of table.rows) { + row.setAttribute('draggable', false) + } + } +} ); {% end %} From 1f980484aee3b528cbe9d2cfae4f1a03a4c43974 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 13 Mar 2022 17:12:33 -0400 Subject: [PATCH 2/2] Adjust max size of motd --- app/frontend/templates/panel/dashboard.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/frontend/templates/panel/dashboard.html b/app/frontend/templates/panel/dashboard.html index aad659e0..a1df4a61 100644 --- a/app/frontend/templates/panel/dashboard.html +++ b/app/frontend/templates/panel/dashboard.html @@ -228,7 +228,7 @@ data['lang']) }}
{% if server['stats']['desc'] != 'False' %} -
{{ server['stats']['desc'] }}

+
{{ server['stats']['desc'] }}

{% end %} {% if server['stats']['version'] != 'False' %} @@ -438,7 +438,7 @@ var motd = ""; if (server.desc) { motd = `` + server.desc + ``; - server_infos = server_infos + '
' + motd + '
' + "
"; + server_infos = server_infos + '
' + motd + '
' + "
"; } /* Version */