Sysdrivers page - css optimization

This commit is contained in:
bergware
2023-10-04 01:37:35 +02:00
parent 8b5fda3e25
commit 077770b71a
5 changed files with 46 additions and 77 deletions
+30 -77
View File
@@ -14,59 +14,20 @@ Tag="server"
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
global $var ;
$theme = $display['theme'] ;
?>
<style>
table.t1{margin-top:0; border-collapse: collapse; border-spacing: 0;}
table tr td{padding:0 0 3px 0;margin:0}
table tr td.thin{line-height:8px;height:8px}
table.t1 tr>td{width: 1%; ; text-align:centre ;white-space: nowrap;}
table.t1 tr>td+td{width: 1%; white-space: nowrap; }
table.t1 tr>td+td+td{width:auto ; text-align:left;}
table.t1 tr>td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td+td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td+td+td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td+td+td+td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td+td+td+td+td+td+td+td{text-align:left;}
table.t1 tr>td+td+td+td+td+td+td+td+td+td+td+td+td{text-align:left;}
.tablesorter .filtered {
display: none;
}
<?if ($theme == "black"):?>
table.tablesorter tbody tr.alt-row {background-color:#212121;}
table.tablesorter tbody tr.normal-row {background-color:#1c1b1b;}
input.search {color:#f2f2f2;background-color:#1c1b1b;}
<?endif;?>
<?if ($theme == "white"):?>
table.tablesorter tbody tr.alt-row {background-color:#ededed;}
table.tablesorter tbody tr.normal-row {background-color:#f2f2f2;}
input.search {color:#1c1b1b;background-color:#f2f2f2;}
<?endif;?>
<?if ($theme == "gray"):?>
table.tablesorter tbody tr.alt-row {solid #0c0f0b;}
table.tablesorter tbody tr.normal-row {background-color:#1b1d1b;}
input.search {color:#606e7f;background-color:#1b1d1b;}
table.tablesorter thead th {color:#606e7f;background-color:#1b1d1b;}
div.tablesorter-header-inner {color:#606e7f;background-color:#1b1d1b;}
<?endif;?>
<?if ($theme == "azure"):?>
table.tablesorter tbody tr.alt-row {background-color:#e4e2e4; }
table.tablesorter tbody tr.normal-row {solid #f3f0f4;}
input.search {color:#606e7f;background-color:#e4e2e4;}
table.tablesorter thead th {color:#606e7f;background-color:#e4e2e4;}
div.tablesorter-header-inner {color:#606e7f;background-color:#e4e2e4;}
<?endif;?>
table.t1 tr td{padding:0 0 3px 0;margin:0}
table.t1 tr td.thin{line-height:8px;height:8px}
table.t1 tr>td{width:1%;text-align:centre;white-space: nowrap}
table.t1 tr>td+td{width:1%;white-space:nowrap}
table.t1 tr>td+td+td{width:auto;text-align:left}
table.t1 tr>td+td+td+td{text-align:left}
table.t1 tr>td+td+td+td+td{text-align:left}
.t1.tablesorter .filtered{display:none}
</style>
<script type="text/javascript" src="/webGui/javascript/jquery.tablesorter.widgets.js"></script>
<script type="text/javascript" src="/webGui/javascript/jquery.tablesorter.widgets.js"></script>
<script type="text/javascript">
function showDrivers(options, init = false) {
@@ -75,36 +36,32 @@ function showDrivers(options, init = false) {
$('#driversearch').prop('disabled', true);
$('#select').prop('disabled', true);
$('#rebuild').prop('disabled', true);
$.post('/webGui/include/SysDrivers.php',{table:'t1load',option:"all"},function(data){
clearTimeout(timers.refresh);
$("#t1").trigger("destroy");
$("#t1").trigger("destroy");
$('#t1').html(data.html);
$('#t1').tablesorter({
sortList:[[0,0]],
sortAppend:[[0,0]],
widgets: ['stickyHeaders','filter', 'zebra'],
widgetOptions: {
// on black and white, offset is height of #menu
// on azure and gray, offset is height of #header
stickyHeaders_offset: ( $('#menu').height() < 50 ) ? $('#menu').height() : $('#header').height(),
filter_columnFilters: false,
zebra : [ "normal-row", "alt-row" ]
}
sortList:[[0,0]],
sortAppend:[[0,0]],
widgets: ['stickyHeaders','filter', 'zebra'],
widgetOptions: {
// on black and white, offset is height of #menu
// on azure and gray, offset is height of #header
stickyHeaders_offset: ( $('#menu').height() < 50 ) ? $('#menu').height() : $('#header').height(),
filter_columnFilters: false,
zebra : [ "normal-row", "alt-row" ]
}
});
$('div.spinner.fixed').hide('slow');
$('#driversearch').prop('disabled', false);
$('#select').prop('disabled', false);
$('#rebuild').prop('disabled', data.init);
},"json");
} else {
filter = [];
filterDrivers() ;
filterDrivers() ;
}
}
}
function filterDrivers() {
var totalColumns = $('#t1')[0].config.columns;
@@ -124,7 +81,7 @@ function showDriversupdate() {
$('#rebuild').prop('disabled', false);
showDrivers("all",true) ;
$('div.spinner.fixed').hide('slow');
}) ;
});
}
function textedit(module) {
@@ -132,11 +89,9 @@ function textedit(module) {
$('#text'+module).prop('disabled', false);
$('#save'+module).attr('hidden', false);
$('#text'+module).attr('hidden', false);
}
function removecfg(module)
{
function removecfg(module) {
swal({title:"_(Proceed)_?",text:"_(Remove custom modprobe.d configuration?)_: "+module,type:'warning',html:true,showCancelButton:true,confirmButtonText:"_(Proceed)_",cancelButtonText:"_(Cancel)_"},function(p){if (p) textsave(module, true); else return false;});
}
@@ -146,7 +101,7 @@ function textsave(module,remove = false) {
$('#save'+module).attr('hidden', true);
var x = (remove) ? "" : document.getElementById("text" + module).value;
$.post('/webGui/include/SysDrivers.php',{table:'update',module:module,conf:x},function(data){
if(data) {
if (data) {
formHasUnsavedChanges=false;
$('#text'+module).val(data.modprobe) ;
$('#status'+module).html(data.state) ;
@@ -159,24 +114,22 @@ function textsave(module,remove = false) {
if (data.supportpage == true) {
if (data.support == true) {
document.getElementById("link" + module).innerHTML = "<a href='" + data.supporturl + "'target='_blank'><i title='" + _("Support page")_ + "' class='fa fa-phone-square'></i></a>" ;
}
}
}
}
}
$('#t1').trigger("updateCell",[document.getElementById('text'+module), false, null]);
$('#t1').trigger("updateCell",[document.getElementById('status'+module), false, null]);
var message = "_(System Drivers)_: _(A reboot is required to apply changes)_";
addRebootNotice(message);
},"json");
},"json");
}
$('.tabs').append("<span class='status'><span class='lite label'>_(Select View)_:</span><select id='select' onchange='showDrivers(this.value)'><option value='all' >All Drivers</option><option value='inuse' selected >Inuse Drivers</option></select>");
showDrivers("all",true) ;
</script>
:sysdrivers_intro_help:
<form autocomplete="off" onsubmit="return false;"><span><input class="search" id="driversearch" type="search" placeholder="Search..." onchange="filterDrivers();"></span></form>
<pre><form id="sysdrivers" class="js-confirm-leave" onsubmit="return false"><table id='t1' class="t1 disk_status tablesorter " ><tr><td><div class="spinner"></div></td></tr></table></form></pre><br>
<form autocomplete="off" onsubmit="return false;"><span><input class="t1 search" id="driversearch" type="search" placeholder="Search..." onchange="filterDrivers();"></span></form>
<pre><form id="sysdrivers" class="js-confirm-leave" onsubmit="return false"><table id='t1' class="t1 disk_status tablesorter"><tr><td><div class="spinner"></div></td></tr></table></form></pre><br>
<input type="button" value="_(Done)_" onclick="done()"><input type="button" id="rebuild" value="_(Rebuild Modules)_" onclick="showDriversupdate()">
@@ -88,6 +88,11 @@ table.tablesorter.indexer thead tr>th+th{width:auto;text-align:left}
table.tablesorter.indexer thead tr>th+th+th{width:14%}
table.tablesorter.indexer tfoot td{padding-top:10px;font-size:1.1rem}
table.tablesorter.indexer tfoot tr{border-bottom:none}
table.t1.tablesorter thead th{color:#606e7f;background-color:#e4e2e4}
table.t1.tablesorter tbody tr.alt-row{background-color:#e4e2e4}
table.t1.tablesorter tbody tr.normal-row{solid #f3f0f4}
div.tablesorter-header-inner {color:#606e7f;background-color:#e4e2e4;}
input.t1.search{color:#606e7f;background-color:#e4e2e4}
span.select ul{display:none;list-style-type:none;margin:0 0 2px 0;padding:0}
span.select ul.unused{display:block}
span.select ul li.nosort{font-weight:bold}
@@ -88,6 +88,9 @@ table.tablesorter.indexer thead th,table.tablesorter.indexer tbody td,table.tabl
table.tablesorter.indexer thead tr>th+th{width:auto;text-align:left}
table.tablesorter.indexer thead tr>th+th+th{width:14%}
table.tablesorter.indexer tfoot td{padding-top:10px;font-size:1.1rem}
table.t1.tablesorter tbody tr.alt-row{background-color:#212121}
table.t1.tablesorter tbody tr.normal-row{background-color:#1c1b1b}
input.t1.search{color:#f2f2f2;background-color:#1c1b1b}
span.select ul{display:none;list-style-type:none;margin:0 0 2px 0;padding:0}
span.select ul.unused{display:block}
span.select ul li.nosort{font-weight:bold}
@@ -88,6 +88,11 @@ table.tablesorter.indexer thead tr>th+th{width:auto;text-align:left}
table.tablesorter.indexer thead tr>th+th+th{width:14%}
table.tablesorter.indexer tfoot td{padding-top:10px;font-size:1.1rem}
table.tablesorter.indexer tfoot tr{border-bottom:none}
table.t1.tablesorter thead th{color:#606e7f;background-color:#1b1d1b}
table.t1.tablesorter tbody tr.alt-row{solid #0c0f0b}
table.t1.tablesorter tbody tr.normal-row{background-color:#1b1d1b}
div.tablesorter-header-inner {color:#606e7f;background-color:#1b1d1b;}
input.t1.search{color:#606e7f;background-color:#1b1d1b}
span.select ul{display:none;list-style-type:none;margin:0 0 2px 0;padding:0}
span.select ul.unused{display:block}
span.select ul li.nosort{font-weight:bold}
@@ -88,6 +88,9 @@ table.tablesorter.indexer thead th,table.tablesorter.indexer tbody td,table.tabl
table.tablesorter.indexer thead tr>th+th{width:auto;text-align:left}
table.tablesorter.indexer thead tr>th+th+th{width:14%}
table.tablesorter.indexer tfoot td{padding-top:10px;font-size:1.1rem}
table.t1.tablesorter tbody tr.alt-row{background-color:#ededed}
table.t1.tablesorter tbody tr.normal-row{background-color:#f2f2f2}
input.t1.search{color:#1c1b1b;background-color:#f2f2f2}
span.select ul{display:none;list-style-type:none;margin:0 0 2px 0;padding:0}
span.select ul.unused{display:block}
span.select ul li.nosort{font-weight:bold}