diff --git a/apps/static/css/jumpserver.css b/apps/static/css/jumpserver.css index c3459298f..6b2639daf 100644 --- a/apps/static/css/jumpserver.css +++ b/apps/static/css/jumpserver.css @@ -91,12 +91,108 @@ table.dataTable tbody td.selected td i.text-navy color: white; } - -div.dataTables_wrapper div.dataTables_filter, -.dataTables_length { - float: right !important; +.m-0 { + margin: 0px !important; } - -div.dataTables_wrapper div.dataTables_filter { - margin-left: 15px; +.m-t-0 { + margin-top: 0px !important; +} +.m-b-0 { + margin-bottom: 0px !important; +} +.m-l-0 { + margin-left: 0px !important; +} +.m-r-0 { + margin-right: 0px !important; +} +.m-5 { + margin: 5px !important; +} +.m-t-5 { + margin-top: 5px !important; +} +.m-b-5 { + margin-bottom: 5px !important; +} +.m-l-5 { + margin-left: 5px !important; +} +.m-r-5 { + margin-right: 5px !important; +} +.m-10 { + margin: 10px !important; +} +.m-t-10 { + margin-top: 10px !important; +} +.m-b-10 { + margin-bottom: 10px !important; +} +.m-l-10 { + margin-left: 10px !important; +} +.m-r-10 { + margin-right: 10px !important; +} +.m-15 { + margin: 15px !important; +} +.m-t-15 { + margin-top: 15px !important; +} +.m-b-15 { + margin-bottom: 15px !important; +} +.m-l-15 { + margin-left: 15px !important; +} +.m-r-15 { + margin-right: 15px !important; +} +.m-20 { + margin: 20px !important; +} +.m-t-20 { + margin-top: 20px !important; +} +.m-b-20 { + margin-bottom: 20px !important; +} +.m-l-20 { + margin-left: 20px !important; +} +.m-r-20 { + margin-right: 20px !important; +} +.m-25 { + margin: 25px !important; +} +.m-t-25 { + margin-top: 25px !important; +} +.m-b-25 { + margin-bottom: 25px !important; +} +.m-l-25 { + margin-left: 25px !important; +} +.m-r-25 { + margin-right: 25px !important; +} +.m-30 { + margin: 30px !important; +} +.m-t-30 { + margin-top: 30px !important; +} +.m-b-30 { + margin-bottom: 30px !important; +} +.m-l-30 { + margin-left: 30px !important; +} +.m-r-30 { + margin-right: 30px !important; } diff --git a/apps/static/js/jumpserver.js b/apps/static/js/jumpserver.js index 9a26a5607..26843397a 100644 --- a/apps/static/js/jumpserver.js +++ b/apps/static/js/jumpserver.js @@ -257,6 +257,7 @@ $.fn.serializeObject = function() return o; }; var jumpserver = {}; +jumpserver.checked = false; jumpserver.initDataTable = function (options) { // options = { // ele *: $('#dataTable_id'), @@ -331,5 +332,16 @@ jumpserver.initDataTable = function (options) { $('#op').html(options.op_html || ''); $('#uc').html(options.uc_html || ''); }); + $('.ipt_check_all').on('click', function() { + if (!jumpserver.checked) { + $(this).closest('table').find('.ipt_check').prop('checked', true); + jumpserver.checked = true; + table.rows().select(); + } else { + $(this).closest('table').find('.ipt_check').prop('checked', false); + jumpserver.checked = false; + table.rows().deselect(); + } + }) return table; } diff --git a/apps/templates/_modal.html b/apps/templates/_modal.html index 1cbe53fa5..ad7f21ccc 100644 --- a/apps/templates/_modal.html +++ b/apps/templates/_modal.html @@ -1,6 +1,6 @@ {% load i18n %}