datatables-std.css für Standard DT erstellt
datatables-std.js für Standard DT erstellt zugewiesen an: Device,Devicetype,Devicemanufactor,Pop,Filestore Pop Detail Ansicht erstellt Filestore auf DT umgebaut Bugfixing: * Bearbeiten aus verschiedenen Ansichten werden nun richtig zurückgeleitet (Devices/Pops) * Sortierung Devicetype in Devices wurde nun per Arraysort durchgeführt
This commit is contained in:
@@ -4,52 +4,7 @@ $pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Pops";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
|
||||
|
||||
<style>
|
||||
#filterrow input {
|
||||
width: 100%;
|
||||
padding: 3px;
|
||||
box-sizing: border-box;
|
||||
display: table-header-group;
|
||||
height: unset;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dataTables_filter {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dataTables_wrapper .dataTables_length {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.clear-fa {
|
||||
margin-left: 5px;
|
||||
font-size: 23px;
|
||||
vertical-align: middle;
|
||||
color: #cb2929;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.margina {
|
||||
margin-left: 30px !important;
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
.edit-width {
|
||||
width: 50px;
|
||||
}
|
||||
.font-weight-500
|
||||
{
|
||||
font-weight: 500;
|
||||
}
|
||||
.order-date-pill
|
||||
{
|
||||
margin: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css" rel="stylesheet" type="text/css"/>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -111,18 +66,19 @@ $pagination_entity_name = "Pops";
|
||||
$vlans = "";
|
||||
|
||||
if (!empty(trim($pop->vlan_public)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">Public: <span class="font-weight-500">' . $pop->vlan_public . '</span class="font-weight-500"></span>';
|
||||
$vlans .= ' <span class="order-date-pill active mb-0">Public: <span class="font-weight-500">' . $pop->vlan_public . '</span class="font-weight-500"></span>';
|
||||
if (!empty(trim($pop->vlan_nat)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">Nat: <span class="font-weight-500">' . $pop->vlan_nat . '</span></span>';
|
||||
$vlans .= ' <span class="order-date-pill active mb-0">Nat: <span class="font-weight-500">' . $pop->vlan_nat . '</span></span>';
|
||||
if (!empty(trim($pop->vlan_ipv6)))
|
||||
$vlans .= '<span class="order-date-pill active mb-0">IPv6: <span class="font-weight-500">' . $pop->vlan_ipv6 . '</span></span>';
|
||||
$vlans .= ' <span class="order-date-pill active mb-0">IPv6: <span class="font-weight-500">' . $pop->vlan_ipv6 . '</span></span>';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?= $pop->name ?></td>
|
||||
<td><a href="<?= self::getUrl("Pop", "Detail", ["id" => $pop->id]) ?>"><?= $pop->name ?></a>
|
||||
</td>
|
||||
<td><?= $pop->network->name ?></td>
|
||||
<td><?= $pop->location ?></td>
|
||||
<td class="text-center"><?= $vlans ?></td>
|
||||
<td class="text-center"><?= trim($vlans) ?></td>
|
||||
<td class="text-center"><a
|
||||
title="Google-Maps: <?= rtrim($pop->gps_lat, '0') ?> , <?= $pop->gps_long ?>"
|
||||
class="mapsLink"
|
||||
@@ -316,69 +272,11 @@ $pagination_entity_name = "Pops";
|
||||
<?php if(is_array($filter) && count($filter)): ?>
|
||||
//refreshMap();
|
||||
<?php endif; ?>
|
||||
let table;
|
||||
$('#filterrow th').each(function (i) {
|
||||
let title = $('#datatable thead th').eq($(this).index()).text();
|
||||
|
||||
if ($(this).index() == "5") {
|
||||
|
||||
} else {
|
||||
$(this).html('<input type="text" placeholder="' + title + '" class="form-control" data-index="' + i + '" value="" />');
|
||||
}
|
||||
});
|
||||
|
||||
table = $('#datatable').DataTable({
|
||||
buttons: [
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
text: 'XLSX Export',
|
||||
className: 'btn-success margina'
|
||||
|
||||
}
|
||||
],
|
||||
orderCellsTop: true,
|
||||
stateSave: true,
|
||||
"initComplete": function () {
|
||||
$('#datatable_filter').append('<i id="clear_cookie" class="fas fa-times clear-fa" title="Filter löschen" aria-hidden="true" ></i>');
|
||||
$('#clear_cookie').click(function () {
|
||||
$('input').val('');
|
||||
|
||||
table.search('').columns().search('').draw();
|
||||
});
|
||||
},
|
||||
"dom": 'flBrtip'
|
||||
|
||||
});
|
||||
|
||||
$('#filterrow').on('keyup', 'input', function () {
|
||||
|
||||
table
|
||||
.column($(this).data('index'))
|
||||
.search(this.value)
|
||||
.draw();
|
||||
|
||||
|
||||
});
|
||||
var state = table.state.loaded();
|
||||
if (state) {
|
||||
table.columns().eq(0).each(function (colIdx) {
|
||||
var colSearch = state.columns[colIdx].search;
|
||||
|
||||
if (colSearch.search) {
|
||||
|
||||
|
||||
$('#filterrow').find("[data-index='" + colIdx + "']").val(colSearch.search);
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
table.draw();
|
||||
}
|
||||
var hidesearch = [5];
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="<?= self::getResourcePath() ?>assets/js/datatables-std.js"></script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
Reference in New Issue
Block a user