Mobile Integration,Pop Multiple Networks,DataTables responsible update,Migrations

Mobile Integration:
* in footer.php js eingefügt damit das mobile Menu funktioniert
* in menu.php bzw. app.css neue Klasse eingefügt mobile-hide um in der mobilen Version Menupünkte zu verstecken

Pop Multiple Networks
* Pops können nun mehrere Netzgebiete haben
* Netzgebiete und Pop ansicht angepasst
* (Script muss ausgeführt werden um die PopNetwork Table vom Bestand zu befüllen)

DataTables responsible update
* Datatables update und responsible addon
* Diverse Anpassungen für Responsible in:
  - Pops, Geräte Hersteller, Geräte Typen, Devices, Benutzer

Migrations
* PopNetwork
* Poprackmodulepatch
This commit is contained in:
Spitzer Daniel
2024-01-01 14:16:31 +01:00
parent 1948e58a7c
commit 02497d8e98
34 changed files with 74059 additions and 45561 deletions

View File

@@ -5,6 +5,7 @@
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<style>
.card-border {
border-left: 1px solid #428bca;
@@ -180,7 +181,7 @@ if ($devices->power != "0.0") {
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-5 card-border">
<div class="col-12 col-lg-5 card-border">
<div>
<h4>Allgemeine Informationen </h4>
@@ -262,7 +263,7 @@ if ($devices->power != "0.0") {
}
?>
<div class="col-4 card-border">
<div class="col-12 col-lg-4 card-border">
<div>
<h4><?= $StdHeader ?></h4>
</div>
@@ -325,7 +326,7 @@ if ($devices->power != "0.0") {
}
?>
</div>
<div class="col-3 card-border">
<div class="col-12 col-lg-3 card-border">
<div class="overflow-auto">
<h4 class="float-left">Config Backups</h4>
<?php if ($devices->devicetype->devicemanufactor->config_backup > count()): ?>
@@ -390,7 +391,7 @@ if ($devices->power != "0.0") {
<?php
if ($devices->devicetype->olt && TT_MBI_API_ENABLE) :
?>
<button id="olt-info-button" class="btn btn-success">OLT/ONT Infos</button>
<button id="olt-info-button" class="btn btn-success d-none d-lg-block">OLT/ONT Infos</button>
<div class="spinner-big text-info" style="display:none">
<i class="fas fa-spinner fa-spin spinner-ico font-24 "></i>
</div>
@@ -1062,8 +1063,10 @@ if ($devices->power != "0.0") {
var portid = button.closest('table').data('portid');
if (typeof customers[button.data('snr')] !== "undefined") {
customerid = customers[button.data('snr')]['customer_number'];
if (customers[button.data('snr')]['lastname'] != "") {
if (customers[button.data('snr')]['lastname'] != "" && customers[button.data('snr')]['lastname'] != null) {
customername = customerid + " / " + customers[button.data('snr')]['lastname'] + " " + customers[button.data('snr')]['firstname'];
} else if (customers[button.data('snr')]['lastname'] == null) {
customername = customers[button.data('snr')]['street'] + ", " + customers[button.data('snr')]['zip'] + " " + customers[button.data('snr')]['city'];
} else {
customername = customerid + " / " + customers[button.data('snr')]['company'] + " (C)";
}
@@ -1083,6 +1086,7 @@ if ($devices->power != "0.0") {
$('#ont-detail-refresh').data('portid', button.data('portid'));
$('#ont-detail-refresh').data('port', button.data('port'));
$('#ont-detail-refresh').data('ontid', button.data('ontid'));
$('#ont-detail-refresh').data('snr', button.data('snr'));
$('#ont-detail-mac-refresh').data('snr', button.data('snr'));
$('#ont-detail-mac-refresh').data('portid', button.data('portid'));
$('#ont-detail-mac-refresh').data('port', button.data('port'));
@@ -1179,8 +1183,10 @@ if ($devices->power != "0.0") {
var portid = button.closest('table').data('portid');
if (typeof customers[button.data('snr')] !== "undefined") {
customerid = customers[button.data('snr')]['customer_number'];
if (customers[button.data('snr')]['lastname'] != "") {
if (customers[button.data('snr')]['lastname'] != "" && customers[button.data('snr')]['lastname'] != null) {
customername = customerid + " / " + customers[button.data('snr')]['lastname'] + " " + customers[button.data('snr')]['firstname'];
} else if (customers[button.data('snr')]['lastname'] == null) {
customername = customers[button.data('snr')]['street'] + ", " + customers[button.data('snr')]['zip'] + " " + customers[button.data('snr')]['city'];
} else {
customername = customerid + " / " + customers[button.data('snr')]['company'] + " (C)";
}

View File

@@ -21,8 +21,11 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "device-detail") {
$cancelUrl = self::getUrl("Device");
}
?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<!-- start page title -->
<div class="row">
<div class="col-12">

View File

@@ -7,9 +7,8 @@ $pagination_entity_name = "Device";
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<style>
table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
padding-right: 1.5rem;
}
</style>
<!-- start page title -->
<div class="row">
@@ -36,20 +35,21 @@ $pagination_entity_name = "Device";
<div class="float-left">
<h4 class="header-title">Liste aller Devices</h4>
</div>
<div class="float-right">
<div class="float-right ">
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Device", "add") ?>"><i
class="fas fa-plus"></i> Neues Device anlegen</a>
class="fas fa-plus"></i><span
class="d-none d-lg-inline"> Neues Device anlegen</span></a>
</div>
</div>
</div>
<table id="datatable" class="table table-striped table-hover table-sm font-13">
<thead>
<tr>
<th style="min-width: 250px;">Device Name</th>
<th class="text-center">Geräte Typ</th>
<th class="text-center">Hersteller</th>
<th class="text-center">Pop/Adresse</th>
<th class="text-center">IP-Adresse</th>
<th class="all">Device Name</th>
<th class="text-center ">Geräte Typ</th>
<th class="text-center ">Hersteller</th>
<th class="text-center ">Pop/Adresse</th>
<th class="text-center all">IP-Adresse</th>
<th class="text-center">Mac-Adresse</th>
<th class="text-center">Seriennummer</th>
<th class="text-center">Preis</th>
@@ -112,8 +112,9 @@ $pagination_entity_name = "Device";
?>
<tr>
<td>
<a href="<?= self::getUrl("Device", "Detail", ["id" => $device->id]) ?>"><?= $device->name ?></a>
<td class="text-nowrap">
<a class=" text-nowrap"
href="<?= self::getUrl("Device", "Detail", ["id" => $device->id]) ?>"><?= $device->name ?></a>
</td>
<td class="text-center"><?= $device->devicetype->name ?></td>
<td class="text-center"><?= $device->devicetype->devicemanufactor->name ?></td>

View File

@@ -31,7 +31,8 @@ $pagination_entity_name = "Devicemanufactor";
</div>
<div class="float-right">
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Devicemanufactor", "add") ?>"><i
class="fas fa-plus"></i> Neuen Gerätehersteller anlegen</a>
class="fas fa-plus"></i><span
class="d-none d-lg-inline"> Neuen Gerätehersteller anlegen</span></a>
</div>
</div>
</div>

View File

@@ -4,7 +4,8 @@ $pagination_baseurl_params = ["filter" => $filter];
$pagination_entity_name = "Devicetype";
?>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?=self::getResourcePath()?>assets/css/datatables-std.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<!-- start page title -->
<div class="row">
<div class="col-12">
@@ -32,14 +33,11 @@ $pagination_entity_name = "Devicetype";
</div>
<div class="float-right">
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Devicetype", "add") ?>"><i
class="fas fa-plus"></i> Neuen Gerätetyp anlegen</a>
class="fas fa-plus"></i><span
class="d-none d-lg-inline"> Neuen Gerätetyp anlegen</span></a>
</div>
</div>
</div>
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination.php"); ?>
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination-summary.php"); ?>
<table id="datatable" class="table table-striped table-hover table-sm">
<thead>
<tr>
@@ -98,15 +96,15 @@ $pagination_entity_name = "Devicetype";
</div>
<script type="text/javascript">
var hidesearch=[5];
var hidesearch = [5];
$(document).ready(function () {
});
</script>
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/datatables-std.js?<?=date('U')?>"></script>
<script type="text/javascript"
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>

View File

@@ -107,12 +107,12 @@
</tr>
<?php foreach($network->pops as $pop): ?>
<tr>
<td><?=$pop->name?></td>
<td><?=$pop->gps_lat?>, <?=$pop->gps_long?></td>
<td><?=nl2br($pop->location)?></td>
<td><?=$pop->pop->name?></td>
<td><?=$pop->pop->gps_lat?>, <?=$pop->pop->gps_long?></td>
<td><?=nl2br($pop->pop->location)?></td>
<td class="controls" style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?=self::getUrl("Pop", "edit", ["id" => $pop->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
<a href="<?=self::getUrl("Pop", "delete", ["id" => $pop->id])?>" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
<a href="<?=self::getUrl("Pop", "edit", ["id" => $pop->pop->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
<a href="<?=self::getUrl("Pop", "delete", ["id" => $pop->pop->id])?>" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
</td>
</tr>
<?php endforeach; ?>

View File

@@ -1,5 +1,5 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css" rel="stylesheet" type="text/css"/>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet" type="text/css"/>
<style>
.card-border {
@@ -134,18 +134,18 @@ $plugs[3] = "E2000";
$vlans = "";
if (!empty(trim($pops->vlan_public)))
$vlans .= '<span class="order-date-pill active mb-0">Public: <span class="font-weight-500">' . $pops->vlan_public . '</span class="font-weight-500"></span>';
$vlans .= '<span class="order-date-pill active mb-0 d-inline-block d-lg-inline">Public: <span class="font-weight-500">' . $pops->vlan_public . '</span class="font-weight-500"></span>';
if (!empty(trim($pops->vlan_nat)))
$vlans .= '<span class="order-date-pill active mb-0">Nat: <span class="font-weight-500">' . $pops->vlan_nat . '</span></span>';
$vlans .= '<span class="order-date-pill active mb-0 d-inline-block d-lg-inline">Nat: <span class="font-weight-500">' . $pops->vlan_nat . '</span></span>';
if (!empty(trim($pops->vlan_ipv6)))
$vlans .= '<span class="order-date-pill active mb-0">IPv6: <span class="font-weight-500">' . $pops->vlan_ipv6 . '</span></span>';
$vlans .= '<span class="order-date-pill active mb-0 d-inline-block d-lg-inline">IPv6: <span class="font-weight-500">' . $pops->vlan_ipv6 . '</span></span>';
?>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-5 card-border">
<div class="col-12 col-lg-5 card-border">
<div>
<h4>Allgemeine Informationen </h4>
@@ -154,8 +154,8 @@ if (!empty(trim($pops->vlan_ipv6)))
<table class="table table-sm">
<tbody>
<tr>
<th style="min-width: 250px; width: 300px;">Netzgebiet</th>
<td><?= $pops->network->name ?> </td>
<th class="w-30">Netzgebiet</th>
<td><?= $popnetwork ?> </td>
</tr>
<tr>
<th>Name</th>
@@ -171,15 +171,15 @@ if (!empty(trim($pops->vlan_ipv6)))
, <?= rtrim($pops->gps_long, 0) ?></a></td>
</tr>
<tr>
<th>Standort Info</th>
<th class="text-nowrap">Standort Info</th>
<td><?= nl2br($pops->location) ?> </td>
</tr>
<tr>
<th>Access VLANs</th>
<th class="text-nowrap">Access VLANs</th>
<td><?= $vlans ?> </td>
</tr>
<tr>
<th>Interne Notiz</th>
<th class="text-nowrap">Interne Notiz</th>
<td><?= nl2br($pops->note) ?> </td>
</tr>
@@ -189,7 +189,7 @@ if (!empty(trim($pops->vlan_ipv6)))
</div>
<div class="col-7 card-border">
<div class="col-12 col-lg-7 card-border">
<div>
<h4>Pop Devices</h4>
</div>
@@ -197,18 +197,18 @@ if (!empty(trim($pops->vlan_ipv6)))
if (!empty($devices)) {
?>
<div>
<table id="datatable" class="table table-striped table-hover">
<table id="datatable" class="table table-striped table-hover" style="width: 100%">
<thead>
<tr>
<th>Geräte Name</th>
<th class="text-center">Geräte Typ</th>
<th class="text-center">Hersteller</th>
<th class="text-center">IP-Adresse</th>
<th class="text-center">Seriennummer</th>
<th class="text-center">Preis</th>
<th class="all">Geräte Name</th>
<th class="text-center ">Geräte Typ</th>
<th class="text-center ">Hersteller</th>
<th class="text-center all">IP-Adresse</th>
<th class="text-center " >Seriennummer</th>
<th class="text-center ">Preis</th>
<th title="maximale Leistung" class="text-center text-nowrap">max. P.</th>
</tr>
<tr id="filterrow">
<tr id="filterrow" class="d-none d-lg-table-row">
<th></th>
<th></th>
<th></th>
@@ -309,6 +309,15 @@ if (!empty(trim($pops->vlan_ipv6)))
</div>
</div>
<?php if ($popracks) : ?>
<div class="modal fade bd-example-modal-xl" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
...
</div>
</div>
</div>
<div class="modal fade " id="rackModuleModal" tabindex="-1" role="dialog" aria-labelledby="rackModuleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
@@ -498,7 +507,7 @@ if (!empty(trim($pops->vlan_ipv6)))
$extTextspan = "";
foreach ($module['slots'] as $slots) {
$extText = "";
$title=$slots['modulname'];
$title = $slots['modulname'];
if ($slots['type'] == '0') {
$color = '#9fff6e';
$colorclass = "rack-color-lwl";
@@ -507,7 +516,7 @@ if (!empty(trim($pops->vlan_ipv6)))
$extTextspan = "<span style='font-size: 12px;font-weight: 400'>" . $extText . "</span>";
}
} else if ($slots['type'] == '1') {
$slots['modulname']='<a style="color: #000000;text-decoration: underline;" target="_self" href="'.self::getUrl("Device", "detail", ["id" => $slots['device_id']]).'">'.$slots['modulname'].'</a>';
$slots['modulname'] = '<a style="color: #000000;text-decoration: underline;" target="_self" href="' . self::getUrl("Device", "detail", ["id" => $slots['device_id']]) . '">' . $slots['modulname'] . '</a>';
?>
<script>
$("#module-device-id option[value='<?= $slots['device_id'] ?>']").remove();
@@ -605,542 +614,17 @@ if (!empty(trim($pops->vlan_ipv6)))
<script type="text/javascript" src="<?= self::getResourcePath() ?>assets/js/Sortable.js"></script>
<script type="text/javascript">
var hidesearch = [5, 6];
var trigger;
$(document).ready(function () {
if ($('#sortracklist').length > 0) {
Sortable.create(sortracklist, {
handle: '.move-handle',
onEnd: function () {
var popid = $('#sortracklist').data('popid');
var racksortids = [];
$('#sortracklist').find('th').each(function (index, value) {
racksortids.push($(this).data('rackid'));
});
$.post("<?= self::getUrl("Poprack", "api", ['do' => 'sortRack']) ?>&pop_id=" + popid, {
racksortids: racksortids
}, function (data) {
if (data.success === true) {
}
}, "json");
}
});
}
$('#pop-rack-div').show();
$('#rackModal').on('show.bs.modal', function (event) {
var thisclick = $(event.relatedTarget);
var rackhe = thisclick.closest('table').find('th').data('rackhe');
var rackid = thisclick.closest('table').find('th').data('rackid');
var rackname = $.trim(thisclick.closest('table').find('th').text());
var minhe = 1;
var modal = $(this);
var edit = 0;
modal.find('.alert').text('');
modal.find('.alert').hide();
if (rackid === undefined) {
$('#rack-name').val('');
$('#rack-he').val('');
var popid = thisclick.data('popid');
$('#rack-add').data('popid', popid);
$('#rack-update').hide();
$('#rack-remove').hide();
$('#rack-add').show();
} else {
edit = 1;
$('#rack-remove').hide();
$('#rack-add').hide();
$('#rack-update').show();
$('#rack-he').val(rackhe);
$('#rack-name').val(rackname);
for (let i = 1; i <= rackhe; i++) {
if (!thisclick.closest('table').find('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
minhe = i;
}
}
if (minhe === 1) {
$('#rack-remove').data('rackid', rackid);
$('#rack-remove').show();
}
$('#rack-update').data('rackid', rackid);
$('#rack-update').data('rackminhe', minhe);
}
}
)
;
$('#rackModuleModal').on('show.bs.modal', function (event) {
trigger = $(event.relatedTarget);
var destinationname = trigger.closest('table').find('th').text();
var rackhe = trigger.closest('table').find('th').data('rackhe');
var modal = $(this);
modal.find('.modal-title').html('<span id="module-info">Modul (' + destinationname + ')</span>');
modal.find('.alert').text('');
modal.find('.alert').hide();
var options;
var selected;
var hemaxcount = 1;
var hemaxcountactive = 1;
var edit = 0;
var parent = trigger.closest('tr');
if (trigger.closest('tr').find('td').eq(1).html() === undefined) {
edit = 1;
parent = trigger.closest('tr').prev();
for (let i = 1; i <= rackhe; i++) {
if (parent.find('td').eq(1).html() !== undefined) {
break;
} else {
parent = parent.prev();
}
}
}
if (parent.find('td').eq(1).data('id') || parent.find('td').eq(2).data('id') || parent.find('td').eq(3).data('id') || parent.find('td').eq(4).data('id')) {
var counttd = parent.find('td').length - 1;
var newmodule = false;
if (counttd > 1) {
var options;
for (let i = 1; i <= counttd; i++) {
options = options + '<option value="' + i + '">' + i + '</option>';
}
$('#module-slot').html(options);
$('#module-position').html(options);
$('#module-slot-div').show();
}
$('#module-width').attr('disabled', 'disabled');
$('#he-count-div').html(`<select required="required" id="module-he-count" name="module-he-count" class="form-control" disabled="disabled"><option value="` + parent.find('td').eq(1).attr('rowspan') + `">` + parent.find('td').eq(1).attr('rowspan') + `</option><select>`);
$('#he-start-div').html(`<select required="required" id="module-he-start" name="module-he-start" class="form-control" disabled="disabled"><option value="` + parent.find('td').eq(0).data('he') + `">` + parent.find('td').eq(0).data('he') + `</option></select>`);
if (parent.find('td').eq(1).data('id') === undefined) {
newmodule = true;
}
var modwidth = 12 / counttd;
$('#module-width').val(modwidth);
if (!newmodule) {
$('#module-remove').show();
$('#module-update').show();
$('#module-add').hide();
$('#module-type').val(parent.find('td').eq(1).data('type')).change();
if ($('#module-type').val() == "1") {
$('#module-device-id').hide();
$('#module-device-text').text(parent.find('td').eq(1).data('name'));
$('#module-device-text').show();
}
if (parent.find('td').eq(1).data('ports') != "") {
$('#module-ports').val(parent.find('td').eq(1).data('ports')).change();
$('#module-plug').val(parent.find('td').eq(1).data('plug'));
}
$('#module-type').attr('disabled', 'disabled');
$('#module-name').val(parent.find('td').eq(1).data('name'));
// $('#module-name').attr('disabled', 'disabled');
$('#module-remove').data('moduleid', parent.find('td').eq(1).data('id'));
$('#module-update').data('moduleid', parent.find('td').eq(1).data('id'));
} else {
$('#module-remove').hide();
$('#module-update').hide();
$('#module-add').show();
$('#module-name-div').show();
$('#module-name').removeAttr('disabled');
$('#module-device-div').hide();
$('#module-device-id').show();
$('#module-device-id').attr('disabled', 'disabled');
$('#module-type').val('0').change();
$('#module-type').removeAttr('disabled');
$('#module-plug').removeAttr('disabled');
$('#module-ports').removeAttr('disabled');
$('#module-name').val('');
$('#module-ports').val('48');
$('#module-ports').trigger("change");
$('#module-position-div').hide();
$('#module-update').hide();
$('#module-device-text').hide();
}
} else {
$('#module-remove').hide();
$('#module-update').hide();
$('#module-add').show();
for (let i = 1; i <= rackhe; i++) {
if (i == trigger.data('he')) {
selected = 'selected="selected"';
} else {
selected = '';
}
if (trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
options = options + '<option ' + selected + ' value="' + i + '">' + i + '</option>';
}
if (hemaxcountactive == 1 && i > trigger.data('he') && !trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
hemaxcountactive = 0;
}
if (hemaxcountactive == 1 && i > trigger.data('he') && trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
hemaxcount++;
}
}
$('#he-start-div').html(`<select required="required" id="module-he-start" name="module-he-start" class="form-control">` + options + `</select>`);
options = "";
selected = "";
for (let i = 1; i <= hemaxcount; i++) {
options = options + '<option ' + selected + ' value="' + i + '">' + i + '</option>';
}
$('#he-count-div').html(`<select required="required" id="module-he-count" name="module-he-count" class="form-control">` + options + `</select>`);
if (edit == 0) {
$('#module-name-div').show();
$('#module-name').removeAttr('disabled');
$('#module-device-div').hide();
$('#module-device-id').attr('disabled', 'disabled');
$('#module-type').val('0').change();
$('#module-type').removeAttr('disabled');
$('#module-width').removeAttr('disabled');
$('#module-plug').removeAttr('disabled');
$('#module-ports').removeAttr('disabled');
$('#module-name').val('');
$('#module-width').val('12');
$('#module-ports').val('48');
$('#module-ports').trigger("change");
$('#module-position').empty();
$('#module-position-div').hide();
$('#module-device-text').hide();
$('#module-device-id').show();
}
}
});
$("body").on("change", "#module-type", function () {
if (parseInt($(this).val()) === 1) {
$('#module-name-div').hide();
$('#module-name').attr('disabled', 'disabled');
$('#module-device-div').show();
$('#module-device-id').removeAttr('disabled');
$('#module-ports-div').hide();
$('#module-plug-div').hide();
} else if (parseInt($(this).val()) === 0) {
$('#module-name-div').show();
$('#module-name').removeAttr('disabled');
$('#module-device-div').hide();
$('#module-device-id').attr('disabled', 'disabled');
$('#module-ports-div').show();
$('#module-plug-div').show();
} else {
$('#module-name-div').show();
$('#module-name').removeAttr('disabled');
$('#module-device-div').hide();
$('#module-device-id').attr('disabled', 'disabled');
$('#module-ports-div').hide();
$('#module-plug-div').hide();
}
});
$("body").on("change", "#module-he-start", function () {
var rackhe = trigger.closest('table').find('th').data('rackhe');
var hemaxcount = 1;
var hemaxcountactive = 1
var options;
var selected;
for (let i = 1; i <= rackhe; i++) {
if (hemaxcountactive == 1 && i > $(this).val() && !trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
hemaxcountactive = 0;
}
if (hemaxcountactive == 1 && i > $(this).val() && trigger.closest('tbody').find('tr').eq(i - 1).find('td').eq(1).hasClass('he-free')) {
hemaxcount++;
}
}
for (let i = 1; i <= hemaxcount; i++) {
options = options + '<option ' + selected + ' value="' + i + '">' + i + '</option>';
}
$('#he-count-div').html(`<select required="required" id="module-he-count" name="module-he-count" class="form-control">` + options + `</select>`);
});
$("body").on("click", "#module-add", function () {
var error;
var rackid = trigger.closest('table').find('th').data('rackid');
var endhe = parseInt($.trim($('#module-he-start').val())) + parseInt($.trim($('#module-he-count').val())) - 1;
if (!$.trim($('#module-name').val()) && $.trim($('#module-type').val()) != "1") {
error = "Modul Name darf nicht leer sein";
}
if ($.trim($('#module-type').val()) == "1" && !$.trim($('#module-device-id').val())) {
error = "Kein Device ausgewählt";
}
if (!error) {
$.post("<?= self::getUrl("Poprackmodule", "api", ['do' => 'addModule']) ?>&poprack_id=" + rackid, {
type: $.trim($('#module-type').val()),
device_id: $.trim($('#module-device-id').val()),
name: $.trim($('#module-name').val()),
start_he: $.trim($('#module-he-start').val()),
end_he: endhe,
ports: $.trim($('#module-ports').val()),
plug: $.trim($('#module-plug').val()),
width: $.trim($('#module-width').val()),
position: $.trim($('#module-position').val())
}, function (data) {
if (data.success === true) {
$('#rackModuleModal').modal('toggle');
$.get("<?= self::getUrl("Poprack", "api", ['do' => 'generateRack']) ?>&id=" + rackid, function (data, status) {
trigger.closest('tbody').html(data);
});
}
}, "json");
} else {
$(this).closest('.modal').find('.alert').text(error);
$(this).closest('.modal').find('.alert').show();
}
});
$("body").on("click", "#module-remove", function () {
var moduleid = $(this).data('moduleid');
var rackid = trigger.closest('table').find('th').data('rackid');
if (confirm("Modul entfernen?")) {
$.post("<?= self::getUrl("Poprackmodule", "api", ['do' => 'removeModule']) ?>", {
id: moduleid
}, function (data) {
if (data.success === true) {
$('#rackModuleModal').modal('toggle');
$.get("<?= self::getUrl("Poprack", "api", ['do' => 'generateRack']) ?>&id=" + rackid, function (data, status) {
trigger.closest('tbody').html(data);
});
}
}, "json");
}
});
$("body").on("click", "#module-update", function () {
var moduleid = $(this).data('moduleid');
var rackid = trigger.closest('table').find('th').data('rackid');
var error;
if (!$.trim($('#module-name').val())) {
error = "Modul Name darf nicht leer sein";
}
if (!error) {
$.post("<?= self::getUrl("Poprackmodule", "api", ['do' => 'updateModule']) ?>", {
id: moduleid,
name: $.trim($('#module-name').val()),
ports: $.trim($('#module-ports').val()),
plug: $.trim($('#module-plug').val())
}, function (data) {
if (data.success === true) {
$('#rackModuleModal').modal('toggle');
$.get("<?= self::getUrl("Poprack", "api", ['do' => 'generateRack']) ?>&id=" + rackid, function (data, status) {
trigger.closest('tbody').html(data);
});
}
}, "json");
} else {
$(this).closest('.modal').find('.alert').text(error);
$(this).closest('.modal').find('.alert').show();
}
});
$("body").on("click", "#rack-update", function () {
var rackid = $(this).data('rackid');
var rackmin = $(this).data('rackminhe');
var error;
if ($('#rack-he').val() < rackmin) {
error = "Minimale Höheneinheiten: " + rackmin;
}
if ($('#rack-he').val() > 60) {
error = "Maximale Höheneinheiten: 60";
}
if (!$.isNumeric($('#rack-he').val())) {
error = "Bitte Zahl bei Höheneinheiten eingeben";
}
if (!$.trim($('#rack-he').val())) {
error = "Höheneinheiten darf nicht leer sein";
}
if (!$.trim($('#rack-name').val())) {
error = "Schrank Name darf nicht leer sein";
}
if (!error) {
$.post("<?= self::getUrl("Poprack", "api", ['do' => 'editRack']) ?>&poprack_id=" + rackid, {
name: $.trim($('#rack-name').val()),
he: $.trim($('#rack-he').val())
}, function (data) {
if (data.success === true) {
$('#rackModal').modal('toggle');
location.reload();
}
}, "json");
} else {
$(this).closest('.modal').find('.alert').text(error);
$(this).closest('.modal').find('.alert').show();
}
});
$("body").on("click", "#rack-add", function () {
var popid = $(this).data('popid');
var error;
if ($('#rack-he').val() < 1) {
error = "Minimale Höheneinheiten: " + 1;
}
if ($('#rack-he').val() > 60) {
error = error = "Maximale Höheneinheiten: 60";
}
if (!$.isNumeric($('#rack-he').val())) {
error = "Bitte Zahl bei Höheneinheiten eingeben";
}
if (!$.trim($('#rack-he').val())) {
error = "Höheneinheiten darf nicht leer sein";
}
if (!$.trim($('#rack-name').val())) {
error = "Schrank Name darf nicht leer sein";
}
if (!error) {
$.post("<?= self::getUrl("Poprack", "api", ['do' => 'addRack']) ?>&pop_id=" + popid, {
name: $.trim($('#rack-name').val()),
he: $.trim($('#rack-he').val())
}, function (data) {
if (data.success === true) {
$('#rackModal').modal('toggle');
location.reload();
}
}, "json");
} else {
$(this).closest('.modal').find('.alert').text(error);
$(this).closest('.modal').find('.alert').show();
}
});
$("body").on("click", "#rack-remove", function () {
var rackid = $(this).data('rackid');
$.post("<?= self::getUrl("Poprack", "api", ['do' => 'removeRack']) ?>", {
id: rackid
}, function (data) {
if (data.success === true) {
$('#rackModal').modal('toggle');
location.reload();
}
}, "json");
});
$("body").on("change", "#module-width", function () {
if ($(this).val() == "12") {
$('#module-position-div').hide();
} else if ($(this).val() == "6") {
$('#module-position').html(`<option value="1">1</option>
<option value="2">2</option>
`);
$('#module-position-div').show();
} else if ($(this).val() == "4") {
$('#module-position').html(`<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
`);
$('#module-position-div').show();
} else if ($(this).val() == "3") {
$('#module-position').html(`<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
`);
$('#module-position-div').show();
}
});
$("body").on("change", "#module-ports", function () {
var plugs = [];
if ($(this).find(':selected').data('plugs') !== undefined) {
plugs = $(this).find(':selected').data('plugs').split(';');
$("#module-plug option").each(function () {
if (plugs.includes($(this).val())) {
$(this).show();
} else {
if ($(this).val() == $('#module-plug').val()) {
$('#module-plug').val(plugs[0]);
}
$(this).hide();
}
});
}
});
$("body").on("change", "#module-slot", function () {
$('#module-position').val($(this).val());
var parent = trigger.closest('tr');
if (trigger.closest('tr').find('td').eq(1).html() === undefined) {
parent = trigger.closest('tr').prev();
for (let i = 1; i <= rackhe; i++) {
if (parent.find('td').eq(1).html() !== undefined) {
break;
} else {
parent = parent.prev();
}
}
}
var newmodule = false;
var tdnumber = parseInt($(this).val())
if (parent.find('td').eq(tdnumber).data('id') === undefined) {
newmodule = true;
}
if (!newmodule) {
$('#module-remove').show();
$('#module-update').show();
$('#module-add').hide();
$('#module-type').val(parent.find('td').eq(tdnumber).data('type')).change();
if ($('#module-type').val() == "1") {
$('#module-device-id').hide();
$('#module-device-text').text(parent.find('td').eq(tdnumber).data('name'));
$('#module-device-text').show();
}
if (parent.find('td').eq(tdnumber).data('ports') != "") {
$('#module-ports').val(parent.find('td').eq(tdnumber).data('ports')).change();
$('#module-plug').val(parent.find('td').eq(tdnumber).data('plug'));
}
$('#module-type').attr('disabled', 'disabled');
$('#module-name').val(parent.find('td').eq(tdnumber).data('name'));
// $('#module-name').attr('disabled', 'disabled');
$('#module-remove').data('moduleid', parent.find('td').eq(tdnumber).data('id'));
$('#module-update').data('moduleid', parent.find('td').eq(tdnumber).data('id'));
} else {
$('#module-remove').hide();
$('#module-update').hide();
$('#module-add').show();
$('#module-name-div').show();
$('#module-name').removeAttr('disabled');
$('#module-device-div').hide();
$('#module-device-id').show();
$('#module-device-id').attr('disabled', 'disabled');
$('#module-type').val('0').change();
$('#module-type').removeAttr('disabled');
$('#module-plug').removeAttr('disabled');
$('#module-ports').removeAttr('disabled');
$('#module-name').val('');
$('#module-ports').val('48');
$('#module-ports').trigger("change");
$('#module-position-div').hide();
$('#module-update').hide();
$('#module-device-text').hide();
}
});
});
let trigger;
let linkSorTracklist = "<?= self::getUrl("Poprack", "api", ['do' => 'sortRack']) ?>";
let linkAddModule = "<?= self::getUrl("Poprackmodule", "api", ['do' => 'addModule']) ?>";
let linkRemoveModule = "<?= self::getUrl("Poprackmodule", "api", ['do' => 'removeModule']) ?>";
let linkGenerateRack = "<?= self::getUrl("Poprack", "api", ['do' => 'generateRack']) ?>";
let linkUpdateModule = "<?= self::getUrl("Poprackmodule", "api", ['do' => 'updateModule']) ?>";
let linkEditRack = "<?= self::getUrl("Poprack", "api", ['do' => 'editRack']) ?>";
let linkAddRack = "<?= self::getUrl("Poprack", "api", ['do' => 'addRack']) ?>";
let linkRemoveRack = "<?= self::getUrl("Poprack", "api", ['do' => 'removeRack']) ?>";
</script>
<script type="text/javascript" src="<?= self::getResourcePath() ?>js/pages/pop/detail.js"></script>
<script type="text/javascript" src="<?= self::getResourcePath() ?>assets/js/datatables-std.js"></script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>

View File

@@ -2,17 +2,16 @@
if (isset($_GET['returnto']) && $_GET['returnto'] == "pop-detail") {
$cancelUrl = self::getUrl("Pop", "Detail", ["id" => $pop->id]);
$cancelText="Pop Detail";
$cancelText = "Pop Detail";
} else if (isset($_GET['returnto'])) {
$cancelUrl = self::getUrl("Pop");
$cancelText="Pops";
} else
{
$cancelText = "Pops";
} else {
$cancelUrl = self::getUrl("Network");
}
?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<!-- start page title -->
<div class="row">
<div class="col-12">
@@ -62,10 +61,11 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "pop-detail") {
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="network_id">Netzgebiet</label>
<div class="col-lg-10">
<select class="select2 form-control " name="network_id" id="owner_id">
<select class="select2 form-control " multiple="multiple" name="network_id[]"
id="owner_id">
<option></option>
<?php foreach ($networks as $network): ?>
<option value="<?= $network->id ?>" <?= ($pop->network_id == $network->id) ? "selected='selected'" : "" ?>><?= ($network->name) ?></option>
<option value="<?= $network->id ?>" <?= (in_array($network->id, $popnetwork)) ? "selected='selected'" : "" ?>><?= ($network->name) ?></option>
<?php endforeach; ?>
</select>
</div>
@@ -183,6 +183,7 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "pop-detail") {
$('form').on('blur', 'input[type=number]', function (e) {
$(this).off('wheel.disableScroll')
});
$(".select2").select2();
</script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>

View File

@@ -4,7 +4,8 @@ $pagination_baseurl_params = ["filter" => $filter];
$pagination_entity_name = "Pops";
?>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css" rel="stylesheet" type="text/css"/>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<!-- start page title -->
<div class="row">
<div class="col-12">
@@ -24,7 +25,7 @@ $pagination_entity_name = "Pops";
<div class="card">
<div class="card-body mb-3">
<div class="card-body mb-3 p-1 p-lg-3">
<div class="row">
<div class="col-12">
<div class="float-left">
@@ -32,16 +33,12 @@ $pagination_entity_name = "Pops";
</div>
<div class="float-right">
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Pop", "add", ['returnto' => "pop"]) ?>"><i
class="fas fa-plus"></i> Neuen Pop anlegen</a>
class="fas fa-plus"></i><span
class="d-none d-lg-inline"> Neuen Pop anlegen</span></a>
</div>
</div>
</div>
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination.php"); ?>
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination-summary.php"); ?>
<table id="datatable" class="table table-striped table-hover table-sm font-13">
<table id="datatable" class="table table-striped table-hover table-sm font-13" style="width: 100%">
<thead>
<tr>
<th>Name</th>
@@ -75,9 +72,10 @@ $pagination_entity_name = "Pops";
?>
<tr>
<td><a href="<?= self::getUrl("Pop", "Detail", ["id" => $pop->id]) ?>"><?= $pop->name ?></a>
<td class="text-nowrap"><a
href="<?= self::getUrl("Pop", "Detail", ["id" => $pop->id]) ?>"><?= $pop->name ?></a>
</td>
<td><?= $pop->network->name ?></td>
<td><?= $pop->networks ?></td>
<td><?= $pop->location ?></td>
<td class="text-center"><?= trim($vlans) ?></td>
<td class="text-center"><a
@@ -109,7 +107,7 @@ $pagination_entity_name = "Pops";
</div>
</div>
<script src="https://cdn.datatables.net/responsive/2.5.0/js/dataTables.responsive.min.js"></script>
<script type="text/javascript">
function toggleBuilding(id) {

View File

@@ -105,7 +105,7 @@ $pagination_entity_name = "Benutzer";
}
?>
<tr>
<td><?= $user->username ?></td>
<td class="text-nowrap"><?= $user->username ?></td>
<td><?= $user->name ?></td>
<td><?= ($user->address->company) ? $user->address->company : $user->address->getFullName() ?></td>
<td><?= $user->email ?></td>
@@ -121,7 +121,7 @@ $pagination_entity_name = "Benutzer";
<a href="<?= self::getUrl("User", "delete", ['id' => $user->id]) ?>"
class="text-danger" title="User löschen"
onclick="if(!confirm('Benutzer wirklich löschen?')) return false;"><i
class="far fa-trash-alt"></i></a>
class="fas fa-trash"></i></a>
<?php endif; ?>
</td>
</tr>

View File

@@ -1,4 +1,6 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<!-- start page title -->
<style>
@@ -8,6 +10,11 @@
font-size: 16px;
margin-left: 5px;
}
.alert {
margin-bottom: 0px;
}
</style>
<div class="row">
<div class="col-12">
@@ -67,9 +74,11 @@ if ($twofa == 0) {
value="<?= $userprofile->email ?>" <?php if ($twofa == 1) : ?> disabled="disabled" <?php endif; ?> />
</div>
<?php if ($twofa == 1) : ?>
<div class="col-lg-4 col-form-label">
<div class="col-lg-4 ">
<span class="info-span alert alert-info"> Um die Email Adresse zu ändern bitte 2FA auf SMS umschalten.</span>
<div class="info-span alert alert-info"> Um die Email Adresse zu ändern
bitte 2FA auf SMS umschalten.
</div>
</div>
<?php endif; ?>
@@ -84,7 +93,7 @@ if ($twofa == 0) {
value="<?= $userprofile->mobile ?>" <?php if ($twofa == 2) : ?> disabled="disabled" <?php endif; ?>/>
</div>
<?php if ($twofa == 2) : ?>
<div class="col-lg-4 col-form-label">
<div class="col-lg-4 ">
<span class="info-span alert alert-info"> Um die Mobilnummer zu ändern bitte 2FA auf Email umschalten.</span>
</div>
<?php endif; ?>

View File

@@ -1,29 +1,8 @@
<?php
?>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<?php var_dump($userprofile); ?>
<!-- start page title -->
<style>
.fa-exclamation-triangle {
font-size: 19px;
color: red;
}
.fa-new-code {
cursor: pointer;
color: #007bff;
font-size: 16px;
margin-left: 5px;
}
.fa-envelope, .fa-mobile-retro {
font-size: 25px;
vertical-align: sub;
margin-right: 5px;
}
</style>
<div class="row">
<div class="col-12">
<div class="page-title-box">
@@ -31,64 +10,97 @@
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
</li>
<li class="breadcrumb-item active">Gerätetyp</li>
</ol>
</div>
<h4 class="page-title">Benutzerprofil</h4>
<h4 class="page-title">Gerätetyp</h4>
</div>
</div>
</div>
<!-- end page title -->
<?php
if ($userprofile->twofactor == 0) {
$twoFactorsym = '<i class="fa fa-exclamation-triangle mr-1"></i>';
$twoFactorbtn = '<button class="btn btn-success mb-3 ">Aktivieren</button>';
$twoFactortype = '<div class="col-lg-2">
<select class="select2 form-control" name="twofactor" id="twofactor">
<option value="1">Email</option>
<option value="2">SMS</option>
</select></div>';
$twoFactorFormaction = "code2faaction";
} else if ($userprofile->twofactor == 1) {
$twoFactorsym = '<i class="fa-regular fa-circle-check mr-1"></i>';
$twoFactorbtn = '<button class="btn btn-success mb-3 ">Ändern zu SMS</button>';
$twoFactortype = '<label class="col-lg-2 col-form-label"><input type="hidden" name="twofactor" value="2"/><i class="fa-light fa-envelope"></i> Email</label>';
$twoFactorFormaction = "change2faaction";
} else if ($userprofile->twofactor == 2) {
$twoFactorsym = '<i class="fa-regular fa-circle-check mr-1"></i>';
$twoFactorbtn = '<button class="btn btn-success mb-3 ">Ändern zu Email</button>';
$twoFactortype = '<label class="col-lg-2 col-form-label"><input type="hidden" name="twofactor" value="1"/><i class="fa-light fa-mobile-retro"></i> Mobiltelefon (SMS)</label>';
$twoFactorFormaction = "change2faaction";
}
?>
<i class="bi bi-exclamation-triangle"></i>
<div class="row">
<div class="col-lg">
<div class="card">
<div class="card-body">
<h4 class=" mb-2">Allgemeine Daten</h4>
<div class="form-group row">
<div class="col-lg-2 font-weight-500">Name</div>
<div class="col-lg-10">
<?= $userprofile->name ?>
<div class="card-body mb-3">
<div class="row">
<div class="col-12">
<div class="float-left">
<h4 class="header-title">Liste aller Gerätetypen</h4>
</div>
<div class="float-right">
<a class="btn btn-primary mb-2" href="<?= self::getUrl("Devicetype", "add") ?>"><i
class="fas fa-plus"></i> Neuen Gerätetyp anlegen</a>
</div>
</div>
<div class="form-group row">
<div class="col-lg-2 font-weight-500">Email</div>
<div class="col-lg-10">
<?= $userprofile->email ?>
</div>
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination.php"); ?>
<!-- --><?php //include(realpath(dirname(__FILE__) . "/../") . "/tpl/pagination-summary.php"); ?>
<table id="datatable" class="table table-striped table-hover">
<thead>
<tr>
<th>Name</th>
<th class="text-center">Hersteller</th>
<th class="text-right">Preis</th>
<th class="text-right">max. Leistung</th>
<th class="text-right">erstellt von</th>
<th class="edit-weight"></th>
</tr>
<tr id="filterrow">
<th>Name</th>
<th>Hersteller</th>
<th>Preis</th>
<th></th>
<th></th>
<th></th>
</tr>
<thead>
<tbody>
<?php foreach ($devicetypes as $devicetype): ?>
<tr>
<td><?= $devicetype->name ?></td>
<td class="text-center"><?= $devicetype->devicemanufactor->name ?></td>
<td class="text-right"><?= $devicetype->price ?> €</td>
<td class="text-right"><?= $devicetype->power ?> Watt</td>
<td class="text-right"><?= $devicetype->creator->name ?>
(<?= date("d.m.Y , H:i", $devicetype->create) ?>)
</td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?= self::getUrl("Devicetype", "edit", ["id" => $devicetype->id]) ?>"><i
class="far fa-edit" title="Bearbeiten"></i></a>
<a href="<?= self::getUrl("Devicetype", "delete", ["id" => $devicetype->id]) ?>"
onclick="if(!confirm('Gerätetyp wirklich löschen?')) return false;" class="text-danger"
title="Löschen"><i class="fas fa-trash"></i></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="form-group row">
<div class="col-lg-2 font-weight-500">Mobiltelefon</div>
<div class="col-lg-10">
<?= $userprofile->mobile ?>
</div>
</div>
<div class="form-group row">
<div class="col-lg-10">
<script type="text/javascript">
var hidesearch=[5];
$(document).ready(function () {
});
</script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?> <div class="col-lg-10">
<a class="btn btn-primary mb-2"
href="<?= self::getUrl("UserProfile", "edit") ?>">Bearbeiten</a>
</div>
@@ -161,12 +173,13 @@ if ($userprofile->twofactor == 0) {
class="fa-solid fa-arrows-rotate fa-new-code" id="new-authcode"
title="Neuen Code anfordern."></i></label>
<div class="col-lg-2">
<input type="number" required min="0" max="99999" class="form-control" name="code"
<input type="number" required min="0" max="99999" class="form-control"
name="code"
id="code"
value="">
<input type="hidden" name="twofactor" value="<?php echo $verification; ?>"/>
</div>
<div class="col-lg-7">
<div class="col-lg-7 check-button">
<?= $twoFactorbtn ?>
<a href="<?= self::getUrl("UserProfile") ?>">
<button type="button" class="btn btn-secondary mb-3">Abbrechen</button>
@@ -180,6 +193,8 @@ if ($userprofile->twofactor == 0) {
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">

View File

@@ -22,6 +22,20 @@
tickIcon: "check",
sanitize: false
});
$('.navbar-toggle').on('click', function (event) {
console.log('cracy');
$(this).toggleClass('open');
$('#navigation').slideToggle(400);
});
$('.navigation-menu>li').slice(-2).addClass('last-elements');
$('.navigation-menu li.has-submenu a[href="#"]').on('click', function (e) {
if ($(window).width() < 992) {
e.preventDefault();
$(this).parent('li').toggleClass('open').find('.submenu:first').toggleClass('open');
}
});
</script>
</body>
</html>

View File

@@ -19,7 +19,7 @@
<link href="<?=self::getResourcePath()?>assets/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" />
<link href="<?=self::getResourcePath()?>css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
<link href="<?=self::getResourcePath()?>plugins/summernote/summernote-bs4.css" rel="stylesheet" type="text/css" />
<link href="<?=self::getResourcePath()?>datatables/datatables.min.css" rel="stylesheet" type="text/css" />
<link href="<?=self::getResourcePath()?>datatables/datatables.min.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?=self::getResourcePath()?>js/jquery.min.js"></script>
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/libs/select2/select2.full.min.js"></script>
@@ -32,7 +32,7 @@
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/bootstrap-select.min.js"></script>
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap-autocomplete.min.js"></script>
<script type="text/javascript" src="<?=self::getResourcePath()?>datatables/datatables.min.js"></script>
<script type="text/javascript" src="<?=self::getResourcePath()?>datatables/datatables.min.js?<?=date('U')?>"></script>
<?php if(MFAPPNAME == "devthetool"): ?>
<style type="text/css">

View File

@@ -38,26 +38,26 @@
<ul class="submenu">
<?php if($me->is(["Admin"])): ?>
<li class="has-sub-submenu font-weight-bold"><a>Betriebsstammdaten</a></li>
<li><a href="<?=self::getUrl("Address")?>"><i class="fad fa-fw fa-user text-info"></i> Personen & Firmen</a></li>
<li><a href="<?=self::getUrl("Product")?>"><i class="far fa-fw fa-rectangle-list text-info"></i> Produkte</a></li>
<li><a href="<?=self::getUrl("Productgroup")?>"><i class="far fa-fw fa-list-tree text-info"></i> Produktgruppen</a></li>
<li class="mobile-hide"><a href="<?=self::getUrl("Address")?>"><i class="fad fa-fw fa-user text-info"></i> Personen & Firmen</a></li>
<li class="mobile-hide"><a href="<?=self::getUrl("Product")?>"><i class="far fa-fw fa-rectangle-list text-info"></i> Produkte</a></li>
<li class="mobile-hide"><a href="<?=self::getUrl("Productgroup")?>"><i class="far fa-fw fa-list-tree text-info"></i> Produktgruppen</a></li>
<li><a href="<?=self::getUrl("Network")?>"><i class="fad fa-fw fa-network-wired text-info"></i> Netzgebiete</a></li>
<li class="mobile-hide"><a href="<?=self::getUrl("Network")?>"><i class="fad fa-fw fa-network-wired text-info"></i> Netzgebiete</a></li>
<li class="has-sub-submenu" ><a href="<?=self::getUrl("Pop")?>"><i class="fad fa-fw fa-house text-info"></i> Pops</a></li>
<li ><a href="<?=self::getUrl("Devicemanufactor")?>"><i class="fad fa-fw fa-router text-info"></i> Geräte Hersteller</a></li>
<li><a href="<?=self::getUrl("Devicetype")?>"><i class="fad fa-fw fa-router text-info"></i> Geräte Typen</a></li>
<li class="has-sub-submenu"><a href="<?=self::getUrl("Device")?>"><i class="fad fa-fw fa-router text-info "></i> Devices</a></li>
<li class="has-sub-submenu"><a href="<?=self::getUrl("User")?>"><i class="fad fa-fw fa-users text-info"></i> Benutzer</a></li>
<li class="has-sub-submenu font-weight-bold mt-1"><a>Grundstammdaten</a></li>
<li class="has-sub-submenu font-weight-bold mt-1 mobile-hide"><a>Grundstammdaten</a></li>
<?php endif; ?>
<?php if($me->is(["Admin"]) || ($me->is("netowner") && $me->hasGwrNetworks())): ?>
<li><a href="<?=self::getUrl("AddressDB")?>"><i class="fas fa-fw fa-city text-info"></i> GWR / AddressDB</a></li>
<li class="mobile-hide"><a href="<?=self::getUrl("AddressDB")?>"><i class="fas fa-fw fa-city text-info "></i> GWR / AddressDB</a></li>
<?php endif; ?>
<?php if($me->is(["Admin"])): ?>
<li><a href="<?=self::getUrl("OpenAccessId")?>"><i class="fad fa-fw fa-link-simple text-info"></i> Open Access IDs</a></li>
<li><a href="<?=self::getUrl("Producttech")?>"><i class="fad fa-fw fa-microchip text-info"></i> Technologien</a></li>
<li class="mobile-hide"><a href="<?=self::getUrl("OpenAccessId")?>"><i class="fad fa-fw fa-link-simple text-info"></i> Open Access IDs</a></li>
<li class="mobile-hide"><a href="<?=self::getUrl("Producttech")?>"><i class="fad fa-fw fa-microchip text-info"></i> Technologien</a></li>
<!--<li><a href="<?=self::getUrl("Contractconfig")?>"><i class="fad fa-gear text-info"></i> ContractConfig</a></li>-->
<?php endif; ?>
@@ -67,7 +67,7 @@
<?php if($me->is(["Admin","netowner","lineplanner","pipeplanner","pipeworker","lineworker"])): ?>
<li class="has-submenu">
<li class="has-submenu mobile-hide">
<a href="#">
<i class="fas fa-fw fa-hard-hat"></i>Netzbau <div class="arrow-down"></div>
</a>
@@ -82,7 +82,7 @@
<?php endif; ?>
<?php if($me->is(["Admin"]) || $me->can(["Cpeprovisioning", "Cpeshipping"])): ?>
<li class="has-submenu">
<li class="has-submenu mobile-hide">
<a href="#">
<i class="fad fa-fw fa-running"></i>Netzbetrieb <div class="arrow-down"></div>
</a>
@@ -94,7 +94,7 @@
<?php endif; ?>
<?php if($me->is(["Admin"]) || $me->can("Voipnumbering")): ?>
<li class="has-submenu">
<li class="has-submenu mobile-hide">
<a href="#">
<i class="fad fa-fw fa-phone"></i>Telefonie <div class="arrow-down"></div>
</a>
@@ -106,7 +106,7 @@
<?php endif; ?>
<?php if($me->is(["Admin","netowner","salespartner"]) || $me->can(["Order", "Preorder"])): ?>
<li class="has-submenu">
<li class="has-submenu mobile-hide">
<a href="#">
<i class="fal fa-fw fa-money-bill-wave"></i>Verkauf <div class="arrow-down"></div>
</a>

View File

@@ -31,8 +31,8 @@ if ($requesttype == "2fa" || $requesttype == "false2fa") {
<div class="row justify-content-center mb-3 mt-1">
<div class="form-check">
<input type="checkbox" value="true" name="Remember" class="form-check-input">
<label class="form-check-label text-bold" for="Remember">
<input type="checkbox" value="true" name="Remember" id="Remember" class="form-check-input">
<label class="form-check-label text-bold noselect" for="Remember">
angemeldet bleiben
</label>
@@ -87,6 +87,16 @@ if ($requesttype == "2fa" || $requesttype == "false2fa") {
.cursor-pointer {
cursor: pointer;
}
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
cursor: pointer;
}
</style>
</head>
<body class="hold-transition login-page" onload="setFocus()">
@@ -144,6 +154,14 @@ if ($requesttype == "2fa" || $requesttype == "false2fa") {
document.getElementById('mfUsername').focus();
}
$('body').on('click', '.form-check-label', function (event) {
if ($('Remember').prop("checked")) {
$('Remember').prop("checked", false);
} else {
$('Remember').prop("checked", true);
}
});
$('body').on('click', '#new-authcode', function (event) {
$('#TwofactorCode').remove();
$('form').submit();

View File

@@ -114,7 +114,7 @@ class Network extends mfBaseModel {
}
if($name == "pops") {
$pops = PopModel::search(['network_id' => $this->id]);
$pops = PopNetworkModel::search(['network_id' => $this->id]);
$this->pops = $pops;
return $this->pops;
}

View File

@@ -21,7 +21,8 @@ class PopController extends mfBaseController
{
$this->layout()->setTemplate("Pop/Index");
$pops = PopModel::getAll();
$pops = PopModel::getAlladv();
$this->layout()->set("pops", $pops);
}
@@ -40,7 +41,8 @@ class PopController extends mfBaseController
$this->layout()->setFlash("Pop nicht gefunden", "error");
$this->redirect("Pop");
}
$popnetwork = PopNetworkModel::getbyPopid($id);
$this->layout()->set("popnetwork", implode(', ' , $popnetwork['name']));
$this->layout()->setTemplate("Pop/Detail");
$filter['pop_id'] = $id;
$this->layout()->set("popracks", PoprackModel::getAllbyPop($id));
@@ -76,6 +78,8 @@ class PopController extends mfBaseController
$this->redirect("Network");
}
$popnetwork = PopNetworkModel::getbyPopid($id);
$this->layout()->set("popnetwork", $popnetwork['network_id']);
$this->layout()->set("pop", $pop);
return $this->addAction();
}
@@ -106,7 +110,8 @@ class PopController extends mfBaseController
}
$data = [];
$data['network_id'] = $r->network_id;
$data['name'] = $r->name;
$data['gps_lat'] = ($r->gps_lat) ? $r->gps_lat : null;
$data['gps_long'] = ($r->gps_long) ? $r->gps_long : null;
@@ -127,11 +132,34 @@ class PopController extends mfBaseController
$new_id = $pop->save();
if (!$new_id) {
$this->layout()->setFlash("Fehler beim Speichern", "error");
$this->layout()->set("network", $network);
return $this->addAction();
}
if ($r->network_id) {
$oldPopnetworks = json_encode(PopNetworkModel::getbyPopid($new_id));
$result = array_diff($r->network_id, $oldPopnetworks);
if ($oldPopnetworks != json_encode($r->network_id)) {
PopNetworkModel::deletebyPopid($new_id);
unset($data);
$data = [];
foreach ($r->network_id as $networkid) {
$data['network_id'] = $networkid;
$data['pop_id'] = $new_id;
$popNetwork = PopNetworkModel::create($data);
$popNetwork->save();
}
}
}
if ($this->request->returnto) {
$returnAction = "Index";
$returnVariables = array();

View File

@@ -1,6 +1,7 @@
<?php
class PopModel {
class PopModel
{
public $name = null;
public $network_id = null;
public $gps_lat = null;
@@ -17,16 +18,18 @@ class PopModel {
public $create = null;
public $edit = null;
public static function find($data) {
public static function find($data)
{
}
public static function create(Array $data) {
public static function create(array $data)
{
$model = new Pop();
foreach($data as $field => $value) {
if(property_exists(get_called_class(), $field)) {
if(substr($field, 0, 5) == "vlan_" && !$value) {
foreach ($data as $field => $value) {
if (property_exists(get_called_class(), $field)) {
if (substr($field, 0, 5) == "vlan_" && !$value) {
$model->$field = null;
continue;
}
@@ -35,45 +38,47 @@ class PopModel {
}
$me = mfValuecache::singleton()->get("me");
if(!$me) {
if (!$me) {
$me = new User();
$me->loadMe();
mfValuecache::singleton()->set("me", $me);
}
if($model->create_by === null) {
if ($model->create_by === null) {
$model->create_by = $me->id;
}
if($model->edit_by === null) {
if ($model->edit_by === null) {
$model->edit_by = $me->id;
}
return $model;
}
public static function getOne($id) {
if(!is_numeric($id) || !$id) {
public static function getOne($id)
{
if (!is_numeric($id) || !$id) {
throw new Exception("Invalid number", 400);
}
$item = [];
$db = FronkDB::singleton();
$res = $db->select("Pop", "*", "id=$id LIMIT 1");
if($db->num_rows($res)) {
if ($db->num_rows($res)) {
$data = $db->fetch_object($res);
$item = new Pop($data);
}
return $item;
}
public static function getAll() {
public static function getAll()
{
$items = [];
$db = FronkDB::singleton();
$res = $db->select("Pop", "*","1=1 ORDER by name");
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {
$res = $db->select("Pop", "*", "1=1 ORDER by name");
if ($db->num_rows($res)) {
while ($data = $db->fetch_object($res)) {
$items[] = new Pop($data);
}
}
@@ -81,15 +86,41 @@ class PopModel {
}
public static function getFirst() {
public static function getAlladv()
{
$items = [];
$db = FronkDB::singleton();
$sql = "SELECT `Pop`.`id`, `Pop`.`network_id`, `Pop`.`name`, `Pop`.`gps_lat`, `Pop`.`gps_long`, `Pop`.`location`, `Pop`.`vlan_public`, `Pop`.`vlan_nat`, `Pop`.`vlan_ipv6`, `Pop`.`note`,`Network`.`name` as Networkname FROM `Pop`
INNER JOIN `PopNetwork` ON (`Pop`.`id`=`PopNetwork`.`pop_id`)
INNER JOIN `Network` ON (`Network`.`id`=`PopNetwork`.`network_id`)";
$res = $db->query($sql);
if ($db->num_rows($res)) {
while ($data = $db->fetch_array($res)) {
$Pops[$data['id']]['data'] = $data;
$Pops[$data['id']]['networks'][] = $data['Networkname'];
}
}
foreach ($Pops as $key => $Pop) {
$Pop['data']['networks'] = implode(', ', $Pop['networks']);
$items[] = new Pop((object)$Pop['data']);
}
return $items;
}
public static function getFirst()
{
$db = FronkDB::singleton();
$where = self::getSqlFilter($filter);
$res = $db->select("Pop", "*", "$where ORDER BY name, network_id");
if($db->num_rows($res)) {
if ($db->num_rows($res)) {
$data = $db->fetch_object($res);
$item = new Pop($data);
if($item->id) {
if ($item->id) {
return $item;
} else {
return null;
@@ -98,27 +129,29 @@ class PopModel {
return null;
}
public static function search($filter) {
public static function search($filter)
{
$items = [];
$db = FronkDB::singleton();
$where = self::getSqlFilter($filter);
$res = $db->select("Pop", "*", "$where ORDER BY name, network_id");
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {
if ($db->num_rows($res)) {
while ($data = $db->fetch_object($res)) {
$items[] = new Pop($data);
}
}
return $items;
}
private static function getSqlFilter($filter) {
private static function getSqlFilter($filter)
{
$where = "1=1 ";
//var_dump($filter);exit;
if(array_key_exists("network_id", $filter)) {
if (array_key_exists("network_id", $filter)) {
$networkid = $filter['network_id'];
if(is_numeric($networkid)) {
if (is_numeric($networkid)) {
$where .= " AND network_id=$networkid";
}
}

View File

@@ -0,0 +1,44 @@
<?php
class PopNetwork extends mfBaseModel
{
private $editor;
private $creator;
private $pop;
private $network;
public function getProperty($name)
{
if ($this->$name == null) {
if (!$this->id) {
return null;
}
if ($name == "creator") {
$this->creator = new User($this->create_by);
return $this->creator;
}
if ($name == "editor") {
$this->editor = new User($this->edit_by);
return $this->editor;
}
$classname = ucfirst($name);
$idfield = $name . "_id";
$this->$name = new $classname($this->$idfield);
if ($this->$name->id) {
return $this->$name;
} else {
return null;
}
}
return $this->$name;
}
}

View File

@@ -0,0 +1,154 @@
<?php
class PopNetworkModel
{
private $pop_id;
private $network_id;
public static function find($data)
{
}
public static function create(array $data)
{
$model = new PopNetwork();
foreach ($data as $field => $value) {
if (property_exists(get_called_class(), $field)) {
if (substr($field, 0, 5) == "vlan_" && !$value) {
$model->$field = null;
continue;
}
$model->$field = $value;
}
}
$me = mfValuecache::singleton()->get("me");
if (!$me) {
$me = new User();
$me->loadMe();
mfValuecache::singleton()->set("me", $me);
}
if ($model->create_by === null) {
$model->create_by = $me->id;
}
if ($model->edit_by === null) {
$model->edit_by = $me->id;
}
return $model;
}
public static function getOne($id)
{
if (!is_numeric($id) || !$id) {
throw new Exception("Invalid number", 400);
}
$item = [];
$db = FronkDB::singleton();
$res = $db->select("PopNetwork", "*", "id=$id LIMIT 1");
if ($db->num_rows($res)) {
$data = $db->fetch_object($res);
$item = new PopNetwork($data);
}
return $item;
}
public static function getAll()
{
$items = [];
$db = FronkDB::singleton();
$res = $db->select("PopNetwork", "*", "1=1");
if ($db->num_rows($res)) {
while ($data = $db->fetch_object($res)) {
$items[] = new PopNetwork($data);
}
}
return $items;
}
public static function getbyPopid($pop_id)
{
$items = [];
$db = FronkDB::singleton();
$sql = "SELECT `PopNetwork`.`id`,`PopNetwork`.`network_id`,`Network`.`name` FROM `PopNetwork`
INNER JOIN `Network` ON (`Network`.`id`=`PopNetwork`.`network_id`)
WHERE `PopNetwork`.`pop_id`='" . $pop_id . "'";
$res = $db->query($sql);
if ($db->num_rows($res)) {
while ($data = $db->fetch_array($res)) {
$items['network_id'][] = $data['network_id'];
$items['name'][] = $data['name'];
}
}
return $items;
}
public static function deletebyPopid($pop_id)
{
$db = FronkDB::singleton();
$sql = "DELETE FROM `PopNetwork` WHERE `pop_id`='" . $pop_id . "'";
$db->query($sql);
}
public static function getFirst()
{
$db = FronkDB::singleton();
$where = self::getSqlFilter($filter);
$res = $db->select("PopNetwork", "*", "$where ");
if ($db->num_rows($res)) {
$data = $db->fetch_object($res);
$item = new PopNetwork($data);
if ($item->id) {
return $item;
} else {
return null;
}
}
return null;
}
public static function search($filter)
{
$items = [];
$db = FronkDB::singleton();
$where = self::getSqlFilter($filter);
$res = $db->select("PopNetwork", "*", "$where");
if ($db->num_rows($res)) {
while ($data = $db->fetch_object($res)) {
$items[] = new PopNetwork($data);
}
}
return $items;
}
private static function getSqlFilter($filter)
{
$where = "1=1 ";
//var_dump($filter);exit;
if (array_key_exists("network_id", $filter)) {
$networkid = $filter['network_id'];
if (is_numeric($networkid)) {
$where .= " AND network_id=$networkid";
}
}
//var_dump($filter, $where);exit;
return $where;
}
}

View File

@@ -173,6 +173,28 @@ class PoprackModel
$response['success'] = true;
} else {
$response['success'] = false;
}
echo json_encode($response);
exit;
}
public static function getdispatchersleeve($dispatcher_id)
{
$items = [];
$db = FronkDB::singleton();
$sql = "SELECT `id`, `name` FROM `FiberPlanDispatchersleeve` WHERE fiberPlanDispatcher_id='" . $dispatcher_id . "' ";
$res = $db->query($sql);
if ($db->num_rows($res)) {
while ($data = $db->fetch_array($res)) {
$items[] = $data;
}
$response['data'] = $items;
$response['success'] = true;
} else {
$response['success'] = false;
}

View File

@@ -33,6 +33,7 @@ class PoprackmoduleController extends mfBaseController
private function addModule()
{
$ports = 0;
$r = $this->request;
$id = $r->id;
$data = [];
@@ -40,7 +41,9 @@ class PoprackmoduleController extends mfBaseController
$data['type'] = $r->type;
if ($data['type'] == 0) {
$data['ports'] = ($r->ports) ? $r->ports : null;
$ports = $data['ports'];
$data['plug'] = ($r->plug) ? $r->plug : null;
}
if ($data['type'] == 1) {
$data['device_id'] = ($r->device_id) ? $r->device_id : null;
@@ -59,6 +62,16 @@ class PoprackmoduleController extends mfBaseController
$response['success'] = false;
} else {
$response['success'] = true;
if ($data['type'] == 0) {
unset($data);
$data = [];
$data['poprackmodule_id'] = $new_id;
for ($i = 1; $i <= $ports; $i++) {
$data['port'] = $i;
$poprackmodulepatch = PoprackmodulepatchModel::create($data);
$poprackmodulepatch->save();
}
}
}
echo json_encode($response);
exit;
@@ -82,12 +95,26 @@ class PoprackmoduleController extends mfBaseController
if ($r->type == 0) {
$data['ports'] = ($r->ports) ? $r->ports : null;
$data['plug'] = ($r->plug) ? $r->plug : null;
$poprackmodulepatchcounter = PoprackmodulepatchModel::countAllModule($id);
if ($poprackmodulepatchcounter > $data['ports']) {
for ($i = $poprackmodulepatchcounter; $i > $data['ports']; $i--) {
PoprackmodulepatchModel::deletebyPort($id, $i);
}
} else if ($poprackmodulepatchcounter < $data['ports']) {
$datapatchModel=[];
for ($i = $poprackmodulepatchcounter + 1; $i <= $data['ports']; $i++) {
$datapatchModel['poprackmodule_id'] = $id;
$datapatchModel['port'] = $i;
$poprackmodulepatch = PoprackmodulepatchModel::create($datapatchModel);
$poprackmodulepatch->save();
}
}
}
$data['name'] = ($r->name);
$poprackmodule->update($data);
$new_id = $poprackmodule->save();
// var_dump($r);die();
if (!$new_id) {
$response['success'] = false;
} else {

View File

@@ -0,0 +1,44 @@
<?php
class Poprackmodulepatch extends mfBaseModel
{
private $editor;
private $creator;
private $poprackmodule;
private $fiberPlanCable;
public function getProperty($name)
{
if ($this->$name == null) {
if (!$this->id) {
return null;
}
if ($name == "creator") {
$this->creator = new User($this->create_by);
return $this->creator;
}
if ($name == "editor") {
$this->editor = new User($this->edit_by);
return $this->editor;
}
$classname = ucfirst($name);
$idfield = $name . "_id";
$this->$name = new $classname($this->$idfield);
if ($this->$name->id) {
return $this->$name;
} else {
return null;
}
}
return $this->$name;
}
}

View File

@@ -0,0 +1,108 @@
<?php
class PoprackmodulepatchModel
{
private $poprackmodule_id;
private $port;
private $fiberPlanCable_id;
private $destination;
public $create_by = null;
public $edit_by = null;
public $create = null;
public $edit = null;
public static function find($data)
{
}
public static function create(array $data)
{
$model = new Poprackmodulepatch();
foreach ($data as $field => $value) {
if (property_exists(get_called_class(), $field)) {
if (substr($field, 0, 5) == "vlan_" && !$value) {
$model->$field = null;
continue;
}
$model->$field = $value;
}
}
$me = mfValuecache::singleton()->get("me");
if (!$me) {
$me = new User();
$me->loadMe();
mfValuecache::singleton()->set("me", $me);
}
if ($model->create_by === null) {
$model->create_by = $me->id;
}
if ($model->edit_by === null) {
$model->edit_by = $me->id;
}
return $model;
}
public static function getOne($id)
{
if (!is_numeric($id) || !$id) {
throw new Exception("Invalid number", 400);
}
$item = [];
$db = FronkDB::singleton();
$res = $db->select("Poprackmodulepatch", "*", "id=$id LIMIT 1");
if ($db->num_rows($res)) {
$data = $db->fetch_object($res);
$item = new Poprackmodulepatch($data);
}
return $item;
}
public static function countAllModule($moduleId)
{
$items = [];
$db = FronkDB::singleton();
$sql = "SELECT `id` FROM `Poprackmodulepatch` WHERE `poprackmodule_id`='" . $moduleId . "'";
$res = $db->query($sql);
$countrows = $db->num_rows($res);
return $countrows;
}
public static function deletebyPort($moduleId, $port)
{
$db = FronkDB::singleton();
$sql = "DELETE FROM `Poprackmodulepatch` WHERE `port`='" . $port . "' AND `poprackmodule_id`='" . $moduleId . "'";
$res = $db->query($sql);
}
public static function updatebyPort($moduleId, $port, $fiberPlanCable_id)
{
$db = FronkDB::singleton();
$sql = "UPDATE `Poprackmodulepatch` SET fiberPlanCable_id='" . $fiberPlanCable_id . "' WHERE `port`='" . $port . "' AND `poprackmodule_id`='" . $moduleId . "'";
echo $sql . "\n";
$db->query($sql);
}
public static function updatebyPortRange($moduleId, $startport, $endport, $fiberPlanCable_id)
{
$db = FronkDB::singleton();
$sql = "UPDATE `Poprackmodulepatch` SET fiberPlanCable_id='" . $fiberPlanCable_id . "' WHERE `port`>='" . $startport . "' AND `port`<='" . $endport . "' AND `poprackmodule_id`='" . $moduleId . "'";
echo $sql . "\n";
$db->query($sql);
}
public static function clearPort($fiberPlanCable_id)
{
$db = FronkDB::singleton();
$sql = "UPDATE `Poprackmodulepatch` SET fiberPlanCable_id=NULL WHERE `fiberPlanCable_id`='" . $fiberPlanCable_id . "'";
$db->query($sql);
}
}

View File

@@ -0,0 +1,41 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class Poprackmodulepatch extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$poprackmodulepatch = $this->table("Poprackmodulepatch", ['signed' => true]);
$poprackmodulepatch->addColumn("poprackmodule_id", "integer", ["null" => false]);
$poprackmodulepatch->addColumn("port", "integer", ["null" => false])->addIndex(['port']);
$poprackmodulepatch->addColumn("fiberPlanCable_id", "integer", ["null" => true, "default" => null])->addIndex(['fiberPlanCable_id']);
$poprackmodulepatch->addColumn("destination", "integer", ["null" => true, "default" => null, "comment" => "1:startpoint/2:endpoint"]);
$poprackmodulepatch->addColumn("create_by", "integer", ["null" => false]);
$poprackmodulepatch->addColumn("edit_by", "integer", ["null" => false]);
$poprackmodulepatch->addColumn("create", "integer", ["null" => false]);
$poprackmodulepatch->addColumn("edit", "integer", ["null" => false]);
$poprackmodulepatch->save();
$poprackmodulepatch = $this->table("Poprackmodulepatch");
$poprackmodulepatch->addForeignKey('poprackmodule_id', 'Poprackmodule', ['id'],['delete'=> 'CASCADE', 'update'=> 'RESTRICT','constraint' => 'poprackmodule_id']);
$poprackmodulepatch->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Poprackmodulepatch")->drop()->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class PopNetwork extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$popnetwork = $this->table("PopNetwork", ['signed' => true]);
$popnetwork->addColumn("pop_id", "integer", ["null" => false])->addIndex(['pop_id']);
$popnetwork->addColumn("network_id", "integer", ["null" => false])->addIndex(['network_id']);
$popnetwork->addColumn("create_by", "integer", ["null" => false]);
$popnetwork->addColumn("edit_by", "integer", ["null" => false]);
$popnetwork->addColumn("create", "integer", ["null" => false]);
$popnetwork->addColumn("edit", "integer", ["null" => false]);
$popnetwork->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("PopNetwork")->drop()->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}

View File

@@ -442,7 +442,12 @@ Responsive Menu
background-color: #fff; }
#navigation.open {
display: block;
overflow-y: auto; } }
overflow-y: auto; }
.mobile-hide
{
display:none !important;
}
}
@media (max-height: 375px) {
.navigation-menu {
@@ -1982,3 +1987,7 @@ body.authentication-bg {
.social-links li a:hover {
color: #6c757d;
border-color: #6c757d; }
.d-lg-list-item
{
display: list-item;
}

View File

@@ -15,6 +15,20 @@
float: right;
}
table.dataTable > tbody > tr.child ul.dtr-details {
width: 100%;
}
table.dataTable > tbody > tr.child span.dtr-title {
display: table-row;
}
table.dataTable > tbody > tr.child span.dtr-data {
display: table-cell;
text-wrap: wrap;
}
.clear-fa {
margin-left: 5px;
font-size: 23px;
@@ -87,21 +101,96 @@
.w-30 {
width: 33% !important;
}
.fa-ban
{
.fa-ban {
color: #0151e7;
font-size: 15px;
}
.fa-circle-check
{
.fa-circle-check {
color: #23b900;
font-size: 15px;
}
.fa-circle-xmark
{
.fa-circle-xmark {
color: #f1556c;
font-size: 15px;
}
table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled) {
padding-right:.85rem ;
table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
padding-right: .85rem;
}
.mobile {
width: unset;
display: table-cell;
}
@media (max-width: 1200px) {
.fa-circle-xmark, .fa-ban, .fa-trash, .fa-edit, .fa-arrows-up-down-left-right {
font-size: 25px;
}
.fa-trash {
float: right;
}
.mobile {
width: 0px;
display: none;
}
.card-body {
padding-left: 5px;
padding-right: 5px;
}
.form-control {
margin-top: 4px;
}
.alert {
margin-top: 4px;
text-align: center;
}
.check-button {
margin-top: 20px;
}
#filterrow {
display: none;
}
#datatable {
width: 100% !important;
}
}
table.dataTable > tbody > tr.child span.dtr-data {
text-wrap: wrap;
display: inline-block;
width: 100%;
}
table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
padding-right: 1.5rem;
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before, table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
content: "▼";
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before, table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
margin-right: 0.5em;
display: inline-block;
color: rgba(0, 0, 0, 0.5);
content: "►";
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before, table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
background-color: unset;
top: 0.85rem;
}

View File

@@ -4,17 +4,24 @@
*
* To rebuild or modify this file with the latest versions of the included
* software please visit:
* https://datatables.net/download/#bs4/jszip-2.5.0/pdfmake-0.1.36/dt-1.13.2/b-2.3.4/b-html5-2.3.4
* https://datatables.net/download/#bs5/jszip-3.10.1/pdfmake-0.2.7/dt-1.13.8/b-2.4.2/b-html5-2.4.2/b-print-2.4.2/r-2.5.0
*
* Included libraries:
* JSZip 2.5.0, pdfmake 0.1.36, DataTables 1.13.2, Buttons 2.3.4, HTML5 export 2.3.4
* JSZip 3.10.1, pdfmake 0.2.7, DataTables 1.13.8, Buttons 2.4.2, HTML5 export 2.4.2, Print view 2.4.2, Responsive 2.5.0
*/
@charset "UTF-8";
:root {
--dt-row-selected: 2, 117, 216;
--dt-row-selected: 13, 110, 253;
--dt-row-selected-text: 255, 255, 255;
--dt-row-selected-link: 9, 10, 11;
--dt-row-stripe: 0, 0, 0;
--dt-row-hover: 0, 0, 0;
--dt-column-ordering: 0, 0, 0;
--dt-html-background: white;
}
:root.dark {
--dt-html-background: rgb(33, 37, 41);
}
table.dataTable td.dt-control {
@@ -22,25 +29,19 @@ table.dataTable td.dt-control {
cursor: pointer;
}
table.dataTable td.dt-control:before {
height: 1em;
width: 1em;
margin-top: -9px;
display: inline-block;
color: white;
border: 0.15em solid white;
border-radius: 1em;
box-shadow: 0 0 0.2em #444;
box-sizing: content-box;
text-align: center;
text-indent: 0 !important;
font-family: "Courier New", Courier, monospace;
line-height: 1em;
content: "+";
background-color: #31b131;
color: rgba(0, 0, 0, 0.5);
content: "▶";
}
table.dataTable tr.dt-hasChild td.dt-control:before {
content: "-";
background-color: #d33333;
content: "";
}
html.dark table.dataTable td.dt-control:before {
color: rgba(255, 255, 255, 0.5);
}
html.dark table.dataTable tr.dt-hasChild td.dt-control:before {
color: rgba(255, 255, 255, 0.5);
}
table.dataTable thead > tr > th.sorting, table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting_asc_disabled, table.dataTable thead > tr > th.sorting_desc_disabled,
@@ -79,6 +80,7 @@ table.dataTable thead > tr > td.sorting_asc_disabled:before,
table.dataTable thead > tr > td.sorting_desc_disabled:before {
bottom: 50%;
content: "▲";
content: "▲"/"";
}
table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:after,
table.dataTable thead > tr > td.sorting:after,
@@ -88,6 +90,7 @@ table.dataTable thead > tr > td.sorting_asc_disabled:after,
table.dataTable thead > tr > td.sorting_desc_disabled:after {
top: 50%;
content: "▼";
content: "▼"/"";
}
table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:after,
table.dataTable thead > tr > td.sorting_asc:before,
@@ -104,9 +107,9 @@ table.dataTable thead > tr > td:active {
outline: none;
}
div.dataTables_scrollBody table.dataTable thead > tr > th:before, div.dataTables_scrollBody table.dataTable thead > tr > th:after,
div.dataTables_scrollBody table.dataTable thead > tr > td:before,
div.dataTables_scrollBody table.dataTable thead > tr > td:after {
div.dataTables_scrollBody > table.dataTable > thead > tr > th:before, div.dataTables_scrollBody > table.dataTable > thead > tr > th:after,
div.dataTables_scrollBody > table.dataTable > thead > tr > td:before,
div.dataTables_scrollBody > table.dataTable > thead > tr > td:after {
display: none;
}
@@ -119,6 +122,7 @@ div.dataTables_processing {
margin-top: -26px;
text-align: center;
padding: 2px;
z-index: 10;
}
div.dataTables_processing > div:last-child {
position: relative;
@@ -132,7 +136,8 @@ div.dataTables_processing > div:last-child > div {
width: 13px;
height: 13px;
border-radius: 50%;
background: 2 117 216;
background: rgb(13, 110, 253);
background: rgb(var(--dt-row-selected));
animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
div.dataTables_processing > div:last-child > div:nth-child(1) {
@@ -257,6 +262,11 @@ table.dataTable tbody td.dt-body-nowrap {
white-space: nowrap;
}
/*! Bootstrap 5 integration for DataTables
*
* ©2020 SpryMedia Ltd, all rights reserved.
* License: MIT datatables.net/license/mit
*/
table.dataTable {
clear: both;
margin-top: 6px !important;
@@ -278,14 +288,14 @@ table.dataTable.nowrap th,
table.dataTable.nowrap td {
white-space: nowrap;
}
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) {
background-color: transparent;
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) > * {
box-shadow: none;
}
table.dataTable > tbody > tr {
background-color: transparent;
}
table.dataTable > tbody > tr.selected > * {
box-shadow: inset 0 0 0 9999px rgb(2, 117, 216);
box-shadow: inset 0 0 0 9999px rgb(13, 110, 253);
box-shadow: inset 0 0 0 9999px rgb(var(--dt-row-selected));
color: rgb(255, 255, 255);
color: rgb(var(--dt-row-selected-text));
@@ -294,18 +304,18 @@ table.dataTable > tbody > tr.selected a {
color: rgb(9, 10, 11);
color: rgb(var(--dt-row-selected-link));
}
table.dataTable.table-striped > tbody > tr.odd > * {
box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.05);
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) > * {
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-stripe), 0.05);
}
table.dataTable.table-striped > tbody > tr.odd.selected > * {
box-shadow: inset 0 0 0 9999px rgba(2, 117, 216, 0.95);
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1).selected > * {
box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.95);
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.95);
}
table.dataTable.table-hover > tbody > tr:hover > * {
box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.075);
}
table.dataTable.table-hover > tbody > tr.selected:hover > * {
box-shadow: inset 0 0 0 9999px rgba(2, 117, 216, 0.975);
box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.975);
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.975);
}
@@ -344,15 +354,8 @@ div.dataTables_wrapper div.dataTables_paginate ul.pagination {
white-space: nowrap;
justify-content: flex-end;
}
div.dataTables_wrapper div.dataTables_processing {
position: absolute;
top: 50%;
left: 50%;
width: 200px;
margin-left: -100px;
margin-top: -26px;
text-align: center;
padding: 1em 0;
div.dataTables_wrapper div.dt-row {
position: relative;
}
div.dataTables_scrollHead table.dataTable {
@@ -399,22 +402,34 @@ div.dataTables_scrollFoot > .dataTables_scrollFootInner > table {
table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
padding-right: 20px;
}
table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled):before, table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled):after {
right: 5px;
}
table.table-bordered.dataTable {
border-right-width: 0;
}
table.table-bordered.dataTable thead tr:first-child th,
table.table-bordered.dataTable thead tr:first-child td {
border-top-width: 1px;
}
table.table-bordered.dataTable th,
table.table-bordered.dataTable td {
border-left-width: 0;
}
table.table-bordered.dataTable th:first-child, table.table-bordered.dataTable th:first-child,
table.table-bordered.dataTable td:first-child,
table.table-bordered.dataTable td:first-child {
border-left-width: 1px;
}
table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
table.table-bordered.dataTable td:last-child,
table.table-bordered.dataTable td:last-child {
border-right-width: 1px;
}
table.table-bordered.dataTable tbody th,
table.table-bordered.dataTable tbody td {
border-bottom-width: 0;
table.table-bordered.dataTable th,
table.table-bordered.dataTable td {
border-bottom-width: 1px;
}
div.dataTables_scrollHead table.table-bordered {
@@ -431,6 +446,12 @@ div.table-responsive > div.dataTables_wrapper > div.row > div[class^=col-]:last-
padding-right: 0;
}
:root[data-bs-theme=dark] {
--dt-row-hover: 255, 255, 255;
--dt-row-stripe: 255, 255, 255;
--dt-column-ordering: 255, 255, 255;
}
@keyframes dtb-spinner {
100% {
@@ -481,31 +502,27 @@ div.dt-button-info {
margin-top: -100px;
margin-left: -200px;
background-color: white;
border: 2px solid #111;
box-shadow: 3px 4px 10px 1px rgba(0, 0, 0, 0.3);
border-radius: 3px;
border-radius: 0.75em;
box-shadow: 3px 4px 10px 1px rgba(0, 0, 0, 0.8);
text-align: center;
z-index: 21;
z-index: 2003;
overflow: hidden;
}
div.dt-button-info h2 {
padding: 0.5em;
padding: 2rem 2rem 1rem 2rem;
margin: 0;
font-weight: normal;
border-bottom: 1px solid #ddd;
background-color: #f3f3f3;
}
div.dt-button-info > div {
padding: 1em;
padding: 1em 2em 2em 2em;
}
div.dtb-popover-close {
position: absolute;
top: 10px;
right: 10px;
top: 6px;
right: 6px;
width: 22px;
height: 22px;
border: 1px solid #eaeaea;
background-color: #f9f9f9;
text-align: center;
border-radius: 3px;
cursor: pointer;
@@ -544,6 +561,46 @@ span.dt-button-spacer.bar:empty {
padding-left: 0;
}
div.dt-button-collection .dt-button-active {
padding-right: 3em;
}
div.dt-button-collection .dt-button-active:after {
position: absolute;
top: 50%;
margin-top: -10px;
right: 1em;
display: inline-block;
content: "✓";
color: inherit;
}
div.dt-button-collection .dt-button-active.dt-button-split {
padding-right: 0;
}
div.dt-button-collection .dt-button-active.dt-button-split:after {
display: none;
}
div.dt-button-collection .dt-button-active.dt-button-split > *:first-child {
padding-right: 3em;
}
div.dt-button-collection .dt-button-active.dt-button-split > *:first-child:after {
position: absolute;
top: 50%;
margin-top: -10px;
right: 1em;
display: inline-block;
content: "✓";
color: inherit;
}
div.dt-button-collection .dt-button-active-a a {
padding-right: 3em;
}
div.dt-button-collection .dt-button-active-a a:after {
position: absolute;
right: 1em;
display: inline-block;
content: "✓";
color: inherit;
}
div.dt-button-collection span.dt-button-spacer {
width: 100%;
font-size: 0.9em;
@@ -556,32 +613,55 @@ div.dt-button-collection span.dt-button-spacer:empty {
}
div.dt-button-collection span.dt-button-spacer.bar {
border-left: none;
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
padding-left: 0;
}
div.dt-button-collection {
position: absolute;
z-index: 2001;
background-color: white;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
padding: 0.5rem;
width: 218px;
html.dark div.dt-button-info {
background-color: var(--dt-html-background);
border: 1px solid rgba(255, 255, 255, 0.15);
}
div.dt-button-collection div.dropdown-menu {
div.dt-buttons div.btn-group {
position: initial;
}
div.dt-buttons div.dropdown-menu {
margin-top: 4px;
}
div.dt-buttons div.dropdown-menu .dt-button {
position: relative;
display: block;
z-index: 2002;
min-width: 100%;
background-color: transparent;
border: none;
box-shadow: none;
padding: 0;
border-radius: 0;
}
div.dt-button-collection.fixed {
div.dt-buttons div.dropdown-menu div.dt-button-split {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-content: flex-start;
align-items: stretch;
}
div.dt-buttons div.dropdown-menu div.dt-button-split a:first-child {
min-width: auto;
flex: 1 0 50px;
padding-right: 0;
}
div.dt-buttons div.dropdown-menu div.dt-button-split button:last-child {
min-width: 33px;
flex: 0;
background: transparent;
border: none;
line-height: 1rem;
color: var(--bs-dropdown-link-color);
padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);
}
div.dt-buttons div.dropdown-menu div.dt-button-split button:last-child:hover {
color: var(--bs-dropdown-link-hover-color);
background-color: var(--bs-dropdown-link-hover-bg);
}
div.dt-buttons div.dropdown-menu div.dt-button-split button:last-child:after {
position: relative;
left: -3px;
}
div.dt-buttons div.dropdown-menu.fixed {
position: fixed;
display: block;
top: 50%;
@@ -589,39 +669,40 @@ div.dt-button-collection.fixed {
margin-left: -75px;
border-radius: 5px;
background-color: white;
padding: 0.5em;
}
div.dt-button-collection.fixed.two-column {
div.dt-buttons div.dropdown-menu.fixed.two-column {
margin-left: -200px;
}
div.dt-button-collection.fixed.three-column {
div.dt-buttons div.dropdown-menu.fixed.three-column {
margin-left: -225px;
}
div.dt-button-collection.fixed.four-column {
div.dt-buttons div.dropdown-menu.fixed.four-column {
margin-left: -300px;
}
div.dt-button-collection.fixed.columns {
div.dt-buttons div.dropdown-menu.fixed.columns {
margin-left: -409px;
}
@media screen and (max-width: 1024px) {
div.dt-button-collection.fixed.columns {
div.dt-buttons div.dropdown-menu.fixed.columns {
margin-left: -308px;
}
}
@media screen and (max-width: 640px) {
div.dt-button-collection.fixed.columns {
div.dt-buttons div.dropdown-menu.fixed.columns {
margin-left: -203px;
}
}
@media screen and (max-width: 460px) {
div.dt-button-collection.fixed.columns {
div.dt-buttons div.dropdown-menu.fixed.columns {
margin-left: -100px;
}
}
div.dt-button-collection.fixed > :last-child {
div.dt-buttons div.dropdown-menu.fixed > :last-child {
max-height: 100vh;
overflow: auto;
}
div.dt-button-collection.two-column > :last-child, div.dt-button-collection.three-column > :last-child, div.dt-button-collection.four-column > :last-child {
div.dt-buttons div.dropdown-menu.two-column > :last-child, div.dt-buttons div.dropdown-menu.three-column > :last-child, div.dt-buttons div.dropdown-menu.four-column > :last-child {
display: block !important;
-webkit-column-gap: 8px;
-moz-column-gap: 8px;
@@ -629,38 +710,38 @@ div.dt-button-collection.two-column > :last-child, div.dt-button-collection.thre
-o-column-gap: 8px;
column-gap: 8px;
}
div.dt-button-collection.two-column > :last-child > *, div.dt-button-collection.three-column > :last-child > *, div.dt-button-collection.four-column > :last-child > * {
div.dt-buttons div.dropdown-menu.two-column > :last-child > *, div.dt-buttons div.dropdown-menu.three-column > :last-child > *, div.dt-buttons div.dropdown-menu.four-column > :last-child > * {
-webkit-column-break-inside: avoid;
break-inside: avoid;
}
div.dt-button-collection.two-column {
div.dt-buttons div.dropdown-menu.two-column {
width: 400px;
}
div.dt-button-collection.two-column > :last-child {
div.dt-buttons div.dropdown-menu.two-column > :last-child {
padding-bottom: 1px;
column-count: 2;
}
div.dt-button-collection.three-column {
div.dt-buttons div.dropdown-menu.three-column {
width: 450px;
}
div.dt-button-collection.three-column > :last-child {
div.dt-buttons div.dropdown-menu.three-column > :last-child {
padding-bottom: 1px;
column-count: 3;
}
div.dt-button-collection.four-column {
div.dt-buttons div.dropdown-menu.four-column {
width: 600px;
}
div.dt-button-collection.four-column > :last-child {
div.dt-buttons div.dropdown-menu.four-column > :last-child {
padding-bottom: 1px;
column-count: 4;
}
div.dt-button-collection .dt-button {
div.dt-buttons div.dropdown-menu .dt-button {
border-radius: 0;
}
div.dt-button-collection.columns {
div.dt-buttons div.dropdown-menu.columns {
width: auto;
}
div.dt-button-collection.columns > :last-child {
div.dt-buttons div.dropdown-menu.columns > :last-child {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
@@ -669,73 +750,69 @@ div.dt-button-collection.columns > :last-child {
width: 818px;
padding-bottom: 1px;
}
div.dt-button-collection.columns > :last-child .dt-button {
div.dt-buttons div.dropdown-menu.columns > :last-child .dt-button {
min-width: 200px;
flex: 0 1;
margin: 0;
}
div.dt-button-collection.columns.dtb-b3 > :last-child, div.dt-button-collection.columns.dtb-b2 > :last-child, div.dt-button-collection.columns.dtb-b1 > :last-child {
div.dt-buttons div.dropdown-menu.columns.dtb-b3 > :last-child, div.dt-buttons div.dropdown-menu.columns.dtb-b2 > :last-child, div.dt-buttons div.dropdown-menu.columns.dtb-b1 > :last-child {
justify-content: space-between;
}
div.dt-button-collection.columns.dtb-b3 .dt-button {
div.dt-buttons div.dropdown-menu.columns.dtb-b3 .dt-button {
flex: 1 1 32%;
}
div.dt-button-collection.columns.dtb-b2 .dt-button {
div.dt-buttons div.dropdown-menu.columns.dtb-b2 .dt-button {
flex: 1 1 48%;
}
div.dt-button-collection.columns.dtb-b1 .dt-button {
div.dt-buttons div.dropdown-menu.columns.dtb-b1 .dt-button {
flex: 1 1 100%;
}
@media screen and (max-width: 1024px) {
div.dt-button-collection.columns > :last-child {
div.dt-buttons div.dropdown-menu.columns > :last-child {
width: 612px;
}
}
@media screen and (max-width: 640px) {
div.dt-button-collection.columns > :last-child {
div.dt-buttons div.dropdown-menu.columns > :last-child {
width: 406px;
}
div.dt-button-collection.columns.dtb-b3 .dt-button {
div.dt-buttons div.dropdown-menu.columns.dtb-b3 .dt-button {
flex: 0 1 32%;
}
}
@media screen and (max-width: 460px) {
div.dt-button-collection.columns > :last-child {
div.dt-buttons div.dropdown-menu.columns > :last-child {
width: 200px;
}
}
div.dt-button-collection.fixed:before, div.dt-button-collection.fixed:after {
display: none;
div.dt-buttons span.dt-button-spacer.empty {
margin: 1px;
}
div.dt-button-collection .btn-group {
flex: 1 1 auto;
div.dt-buttons span.dt-button-spacer.bar:empty {
height: inherit;
}
div.dt-button-collection .dt-button {
min-width: 200px;
div.dt-buttons .btn.processing {
color: rgba(0, 0, 0, 0.2);
}
div.dt-button-collection div.dt-btn-split-wrapper {
width: 100%;
padding-left: 5px;
padding-right: 5px;
}
div.dt-button-collection button.dt-btn-split-drop-button {
width: 100%;
color: #212529;
border: none;
background-color: white;
border-radius: 0px;
margin-left: 0px !important;
}
div.dt-button-collection button.dt-btn-split-drop-button:focus {
border: none;
border-radius: 0px;
outline: none;
}
div.dt-button-collection button.dt-btn-split-drop-button:hover {
background-color: #e9ecef;
}
div.dt-button-collection button.dt-btn-split-drop-button:active {
background-color: #007bff !important;
div.dt-buttons .btn.processing:after {
position: absolute;
top: 50%;
left: 50%;
width: 16px;
height: 16px;
margin: -8px 0 0 -8px;
box-sizing: border-box;
display: block;
content: " ";
border: 2px solid rgb(40, 40, 40);
border-radius: 50%;
border-left-color: transparent;
border-right-color: transparent;
animation: dtb-spinner 1500ms infinite linear;
-o-animation: dtb-spinner 1500ms infinite linear;
-ms-animation: dtb-spinner 1500ms infinite linear;
-webkit-animation: dtb-spinner 1500ms infinite linear;
-moz-animation: dtb-spinner 1500ms infinite linear;
}
div.dt-button-background {
@@ -758,109 +835,180 @@ div.dt-button-background {
float: none;
}
}
div.dt-buttons button.btn.processing,
div.dt-buttons div.btn.processing,
div.dt-buttons a.btn.processing {
color: rgba(0, 0, 0, 0.2);
:root[data-bs-theme=dark] div.dropdown-menu.dt-button-collection.fixed {
background-color: rgb(33, 37, 41);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 8px;
}
div.dt-buttons button.btn.processing:after,
div.dt-buttons div.btn.processing:after,
div.dt-buttons a.btn.processing:after {
position: absolute;
top: 50%;
left: 50%;
width: 16px;
height: 16px;
margin: -8px 0 0 -8px;
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
cursor: default !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
display: none !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
cursor: pointer;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
margin-right: 0.5em;
display: inline-block;
color: rgba(0, 0, 0, 0.5);
content: "►";
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control.arrow-right::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control.arrow-right::before {
content: "◄";
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
content: "▼";
}
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control {
padding-left: 0.333em;
}
table.dataTable.dtr-column > tbody > tr > td.dtr-control,
table.dataTable.dtr-column > tbody > tr > th.dtr-control,
table.dataTable.dtr-column > tbody > tr > td.control,
table.dataTable.dtr-column > tbody > tr > th.control {
cursor: pointer;
}
table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > th.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > td.control:before,
table.dataTable.dtr-column > tbody > tr > th.control:before {
display: inline-block;
color: rgba(0, 0, 0, 0.5);
content: "►";
}
table.dataTable.dtr-column > tbody > tr > td.dtr-control.arrow-right::before,
table.dataTable.dtr-column > tbody > tr > th.dtr-control.arrow-right::before,
table.dataTable.dtr-column > tbody > tr > td.control.arrow-right::before,
table.dataTable.dtr-column > tbody > tr > th.control.arrow-right::before {
content: "◄";
}
table.dataTable.dtr-column > tbody > tr.parent td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.parent th.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.parent td.control:before,
table.dataTable.dtr-column > tbody > tr.parent th.control:before {
content: "▼";
}
table.dataTable > tbody > tr.child {
padding: 0.5em 1em;
}
table.dataTable > tbody > tr.child:hover {
background: transparent !important;
}
table.dataTable > tbody > tr.child ul.dtr-details {
display: inline-block;
list-style-type: none;
margin: 0;
padding: 0;
}
table.dataTable > tbody > tr.child ul.dtr-details > li {
border-bottom: 1px solid #efefef;
padding: 0.5em 0;
}
table.dataTable > tbody > tr.child ul.dtr-details > li:first-child {
padding-top: 0;
}
table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
padding-bottom: 0;
border-bottom: none;
}
table.dataTable > tbody > tr.child span.dtr-title {
display: inline-block;
min-width: 75px;
font-weight: bold;
}
div.dtr-modal {
position: fixed;
box-sizing: border-box;
display: block;
content: " ";
border: 2px solid rgb(40, 40, 40);
border-radius: 50%;
border-left-color: transparent;
border-right-color: transparent;
animation: dtb-spinner 1500ms infinite linear;
-o-animation: dtb-spinner 1500ms infinite linear;
-ms-animation: dtb-spinner 1500ms infinite linear;
-webkit-animation: dtb-spinner 1500ms infinite linear;
-moz-animation: dtb-spinner 1500ms infinite linear;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 100;
padding: 10em 1em;
}
div.dt-buttons div.btn-group {
position: initial;
div.dtr-modal div.dtr-modal-display {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 50%;
height: fit-content;
max-height: 75%;
overflow: auto;
margin: auto;
z-index: 102;
overflow: auto;
background-color: #f5f5f7;
border: 1px solid black;
border-radius: 0.5em;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
div.dtr-modal div.dtr-modal-content {
position: relative;
padding: 2.5em;
}
div.dtr-modal div.dtr-modal-content h2 {
margin-top: 0;
}
div.dtr-modal div.dtr-modal-close {
position: absolute;
top: 6px;
right: 6px;
width: 22px;
height: 22px;
text-align: center;
border-radius: 3px;
cursor: pointer;
z-index: 12;
}
div.dtr-modal div.dtr-modal-background {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 101;
background: rgba(0, 0, 0, 0.6);
}
div.dt-btn-split-wrapper:active:not(.disabled) button, div.dt-btn-split-wrapper.active:not(.disabled) button {
background-color: #5a6268;
border-color: #545b62;
@media screen and (max-width: 767px) {
div.dtr-modal div.dtr-modal-display {
width: 95%;
}
}
div.dt-btn-split-wrapper:active:not(.disabled) button.dt-btn-split-drop, div.dt-btn-split-wrapper.active:not(.disabled) button.dt-btn-split-drop {
box-shadow: none;
background-color: #6c757d;
border-color: #6c757d;
html.dark table.dataTable > tbody > tr > td.dtr-control:before {
color: rgba(255, 255, 255, 0.5) !important;
}
div.dt-btn-split-wrapper:active:not(.disabled) button:hover, div.dt-btn-split-wrapper.active:not(.disabled) button:hover {
background-color: #5a6268;
border-color: #545b62;
html.dark table.dataTable > tbody > tr.child ul.dtr-details > li {
border-bottom-color: rgb(64, 67, 70);
}
html.dark div.dtr-modal div.dtr-modal-display {
background-color: rgb(33, 37, 41);
border: 1px solid rgba(255, 255, 255, 0.15);
}
div.dataTables_wrapper div.dt-buttons.btn-group div.btn-group {
border-radius: 4px !important;
}
div.dataTables_wrapper div.dt-buttons.btn-group div.btn-group:last-child {
border-top-left-radius: 0px !important;
border-bottom-left-radius: 0px !important;
}
div.dataTables_wrapper div.dt-buttons.btn-group div.btn-group:first-child {
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
}
div.dataTables_wrapper div.dt-buttons.btn-group div.btn-group:last-child:first-child {
border-top-left-radius: 4px !important;
border-bottom-left-radius: 4px !important;
border-top-right-radius: 4px !important;
border-bottom-right-radius: 4px !important;
}
div.dataTables_wrapper div.dt-buttons.btn-group div.btn-group button.dt-btn-split-drop:last-child {
border: 1px solid rgb(108, 117, 125);
}
div.dataTables_wrapper div.dt-buttons.btn-group div.btn-group div.dt-btn-split-wrapper {
border: none;
div.dtr-bs-modal table.table tr:first-child td {
border-top: none;
}
div.dt-button-collection div.btn-group {
border-radius: 4px !important;
}
div.dt-button-collection div.btn-group button {
border-radius: 4px;
}
div.dt-button-collection div.btn-group button:last-child {
border-top-left-radius: 0px !important;
border-bottom-left-radius: 0px !important;
}
div.dt-button-collection div.btn-group button:first-child {
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
}
div.dt-button-collection div.btn-group button:last-child:first-child {
border-top-left-radius: 4px !important;
border-bottom-left-radius: 4px !important;
border-top-right-radius: 4px !important;
border-bottom-right-radius: 4px !important;
}
div.dt-button-collection div.btn-group button.dt-btn-split-drop:last-child {
border: 1px solid rgb(108, 117, 125);
}
div.dt-button-collection div.btn-group div.dt-btn-split-wrapper {
border: none;
}
span.dt-button-spacer.bar:empty {
height: inherit;
}
div.dt-button-collection span.dt-button-spacer {
padding-left: 1rem !important;
text-align: left;
table.dataTable.table-bordered th.dtr-control.dtr-hidden + *,
table.dataTable.table-bordered td.dtr-control.dtr-hidden + * {
border-left-width: 1px;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -7,7 +7,7 @@
"sInfoFiltered": "(gefiltert von _MAX_ Einträgen)",
"sInfoPostFix": "",
"sInfoThousands": ".",
"sLengthMenu": "_MENU_ Einträge anzeigen",
"sLengthMenu": "_MENU_ <span class=\"d-lg-inline-block d-none\">Einträge anzeigen</span>",
"sLoadingRecords": "Wird geladen...",
"sProcessing": "Bitte warten...",
"sSearch": "Suchen",