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-08 09:08:05 +01:00
parent 95b08e9b0d
commit 2176f0a9c2
10 changed files with 103 additions and 19 deletions

View File

@@ -1,4 +1,6 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?=self::getResourcePath()?>assets/css/select2-cstm.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet" type="text/css"/>
<?php
foreach ($devicetypes as $devicetype) {
$deviceTypes[$devicetype->id] = $devicetype->devicemanufactor->name . " " . $devicetype->name;

View File

@@ -1,4 +1,6 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?=self::getResourcePath()?>assets/css/select2-cstm.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">

View File

@@ -57,8 +57,8 @@ $pagination_entity_name = "Devicemanufactor";
<?php foreach ($devicemanufactors as $devicemanufactor): ?>
<tr>
<td><?= $devicemanufactor->name ?></td>
<td><?= $devicemanufactor->creator->name ?>
<td class="text-nowrap"><?= $devicemanufactor->name ?></td>
<td class="text-nowrap"><?= $devicemanufactor->creator->name ?>
(<?= date("d.m.Y , H:i", $devicemanufactor->create) ?>)
</td>

View File

@@ -1,5 +1,6 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<link href="<?=self::getResourcePath()?>assets/css/select2-cstm.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">

View File

@@ -63,7 +63,7 @@ $pagination_entity_name = "Devicetype";
<?php foreach ($devicetypes as $devicetype): ?>
<tr>
<td><?= $devicetype->name ?></td>
<td class="text-nowrap"><?= $devicetype->name ?></td>
<td class="text-center"><?= $devicetype->devicemanufactor->name ?></td>
<td class="text-right"><?= $devicetype->price ?> €</td>

View File

@@ -25,7 +25,7 @@ $pagination_entity_name = "Pops";
<div class="card">
<div class="card-body mb-3 p-1 p-lg-3">
<div class="card-body mb-3">
<div class="row">
<div class="col-12">
<div class="float-left">

View File

@@ -59,10 +59,10 @@ $pagination_entity_name = "Benutzer";
<?php if (is_array($filter) && count($filter) && is_numeric($filter['address_id'])): ?>
<a class="btn btn-primary"
href="<?= self::getUrl("User", "add", ['address_id' => $filter['address_id']]) ?>"><i
class="fas fa-plus"></i> Neuen Benutzer anlegen</a>
class="fas fa-plus"></i><span class="d-none d-lg-inline"> Neuen Benutzer anlegen</span></a>
<?php else: ?>
<a class="btn btn-primary" href="<?= self::getUrl("User", "add") ?>"><i
class="fas fa-plus"></i> Neuen Benutzer anlegen</a>
class="fas fa-plus"></i><span class="d-none d-lg-inline"> Neuen Benutzer anlegen</span></a>
<?php endif; ?>
</div>
</div>

View File

@@ -5,18 +5,49 @@ class Pop extends mfBaseModel {
private $network;
public function getProperty($name) {
if($this->$name == null) {
if ($this->$name == null) {
if (!$this->id) {
return null;
}
if($name == "creator") {
$this->creator = mfValuecache::singleton()->get("Worker-id-".$this->create_by);
if($this->creator === null) {
$this->creator = new User($this->create_by);
if($this->creator->id) {
mfValuecache::singleton()->set("Worker-id-".$this->create_by, $this->creator);
}
}
return $this->creator;
}
if($name == "editor") {
$this->editor = mfValuecache::singleton()->get("Worker-id-".$this->edit_by);
if($this->editor === null) {
$this->editor = new User($this->edit_by);
if($this->editor->id) {
mfValuecache::singleton()->set("Worker-id-".$this->edit_by, $this->editor);
}
}
return $this->editor;
}
$classname = ucfirst($name);
$idfield = $name."_id";
$this->$name = mfValuecache::singleton()->get("mfObjectmodel-$name-".$this->$idfield);
if(!$this->$name) {
$this->$name = new $classname($this->$idfield);
}
if($this->$name->id) {
mfValuecache::singleton()->set("mfObjectmodel-$name-".$this->$name->id, $this->$name);
return $this->$name;
} else {
return null;
}
$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

@@ -141,6 +141,7 @@ table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
}
.card-body {
padding-top: 5px;
padding-left: 5px;
padding-right: 5px;
}
@@ -165,6 +166,33 @@ table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
#datatable {
width: 100% !important;
}
li.paginate_button.previous, li.paginate_button.next {
display: inline-block;
font-size: 1.0rem;
}
.dataTables_length .form-select {
margin-right: 0px;
padding: 4px 7px;
font-size: .875rem;
}
div.dataTables_wrapper div.dataTables_filter input {
margin-left: 0.5em;
display: inline-block;
/* width: auto; */
width: 150px;
}
.dataTables_length {
margin-top: 4px;
}
.header-title {
font-size: 14px;
margin: 12px 3px 7px 0px;
}
}
table.dataTable > tbody > tr.child span.dtr-data {
@@ -194,3 +222,20 @@ table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before
top: 0.85rem;
}
.dataTables_length .form-select {
margin-right: 10px;
padding: 4px 7px;
font-size: .875rem;
font-weight: 400;
line-height: 1.5;
color: #6c757d;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 0.2rem;
-webkit-transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
transition: border-color .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, -webkit-box-shadow .15s ease-in-out;
}

View File

@@ -38,18 +38,21 @@ $('#filterrow th').each(function (i) {
});
table = $('#datatable').DataTable({
responsive: true,
buttons: [
{
extend: 'excelHtml5',
text: 'XLSX Export',
className: 'btn-success margina'
className: 'btn-success margina d-none d-lg-block',
exportOptions: {
columns: ['th:not(:last-child)']
}
}
], columnDefs: [
columndefs
],
"language": {
"url": "/datatables/json/german.json"
"url": "/datatables/json/german.json?v1"
},
orderCellsTop: true,
stateSave: true,