mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Added code to disabled sorting when the user is a mobile user
This commit is contained in:
parent
d234f51bab
commit
c303a866b6
@ -265,6 +265,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- content-wrapper ends -->
|
<!-- content-wrapper ends -->
|
||||||
|
<div id="mobile"></div>
|
||||||
<style>
|
<style>
|
||||||
.popover-body {
|
.popover-body {
|
||||||
color: white !important;
|
color: white !important;
|
||||||
@ -586,6 +587,11 @@
|
|||||||
<script src="/static/assets/js/jquery-ui.js"></script>
|
<script src="/static/assets/js/jquery-ui.js"></script>
|
||||||
<link rel="stylesheet" href="/static/assets/css/jquery-ui.css">
|
<link rel="stylesheet" href="/static/assets/css/jquery-ui.css">
|
||||||
<link rel="stylesheet" href="/static/assets/css/jquery-ui.structure.css">
|
<link rel="stylesheet" href="/static/assets/css/jquery-ui.structure.css">
|
||||||
|
<style>
|
||||||
|
@media only screen and (max-width: 760px) {
|
||||||
|
#mobile { display: none; }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
/* Search Bar */
|
/* Search Bar */
|
||||||
@ -601,8 +607,9 @@
|
|||||||
|
|
||||||
$(document).on("mousedown keyup click", function(event) {
|
$(document).on("mousedown keyup click", function(event) {
|
||||||
const value = $('.dataTables_filter input').val();
|
const value = $('.dataTables_filter input').val();
|
||||||
|
const is_mobile = $('#some-element').css('display')=='none';
|
||||||
|
|
||||||
if ($("table#servers_table tbody").sortable("toArray").length > 1 && value === '') {
|
if ($("table#servers_table tbody").sortable("toArray").length > 1 && value === '' && !is_mobile) {
|
||||||
$("table#servers_table tbody").sortable("enable");
|
$("table#servers_table tbody").sortable("enable");
|
||||||
} else {
|
} else {
|
||||||
$("table#servers_table tbody").sortable("disable");
|
$("table#servers_table tbody").sortable("disable");
|
||||||
|
Loading…
Reference in New Issue
Block a user