Fehlerkorrekturen, DataTable angepasst
This commit is contained in:
parent
2e4c5ab8a2
commit
2a4836e07d
28
bootstrap/data-table/datatables.min.css
vendored
Normal file
28
bootstrap/data-table/datatables.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
157
bootstrap/data-table/datatables.min.js
vendored
Normal file
157
bootstrap/data-table/datatables.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
62
bootstrap/data-table/datetime-moment.js
Normal file
62
bootstrap/data-table/datetime-moment.js
Normal file
@ -0,0 +1,62 @@
|
||||
/**
|
||||
* This plug-in for DataTables represents the ultimate option in extensibility
|
||||
* for sorting date / time strings correctly. It uses
|
||||
* [Moment.js](http://momentjs.com) to create automatic type detection and
|
||||
* sorting plug-ins for DataTables based on a given format. This way, DataTables
|
||||
* will automatically detect your temporal information and sort it correctly.
|
||||
*
|
||||
* For usage instructions, please see the DataTables blog
|
||||
* post that [introduces it](//datatables.net/blog/2014-12-18).
|
||||
*
|
||||
* @name Ultimate Date / Time sorting
|
||||
* @summary Sort date and time in any format using Moment.js
|
||||
* @author [Allan Jardine](//datatables.net)
|
||||
* @depends DataTables 1.10+, Moment.js 1.7+
|
||||
*
|
||||
* @example
|
||||
* $.fn.dataTable.moment( 'HH:mm MMM D, YY' );
|
||||
* $.fn.dataTable.moment( 'dddd, MMMM Do, YYYY' );
|
||||
*
|
||||
* $('#example').DataTable();
|
||||
*/
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["jquery", "moment", "datatables"], factory);
|
||||
} else {
|
||||
factory(jQuery, moment);
|
||||
}
|
||||
}(function ($, moment) {
|
||||
|
||||
$.fn.dataTable.moment = function ( format, locale ) {
|
||||
var types = $.fn.dataTable.ext.type;
|
||||
|
||||
// Add type detection
|
||||
types.detect.unshift( function ( d ) {
|
||||
// Strip HTML tags if possible
|
||||
if ( d && d.replace ) {
|
||||
d = d.replace(/<.*?>/g, '');
|
||||
}
|
||||
|
||||
// Null and empty values are acceptable
|
||||
if ( d === '' || d === null ) {
|
||||
return 'moment-'+format;
|
||||
}
|
||||
|
||||
return moment( d, format, locale, true ).isValid() ?
|
||||
'moment-'+format :
|
||||
null;
|
||||
} );
|
||||
|
||||
// Add sorting method - use an integer for the sorting
|
||||
types.order[ 'moment-'+format+'-pre' ] = function ( d ) {
|
||||
if ( d && d.replace ) {
|
||||
d = d.replace(/<.*?>/g, '');
|
||||
}
|
||||
return d === '' || d === null ?
|
||||
-Infinity :
|
||||
parseInt( moment( d, format, locale, true ).format( 'x' ), 10 );
|
||||
};
|
||||
};
|
||||
|
||||
}));
|
7
bootstrap/data-table/moment.mon.js
Normal file
7
bootstrap/data-table/moment.mon.js
Normal file
File diff suppressed because one or more lines are too long
@ -34,8 +34,7 @@ if ($function == 'notenbuchsave') {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Notenbuchname ist bereits vorhanden.</div>|***|error';
|
||||
exit;
|
||||
} else {
|
||||
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_zusammenstellung ( bezeichnung, lizenzpflicht, anzahl_lizenz) VALUES ( '$notenbuch', '$checkliz', $anz_lizenz)");
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_zusammenstellung ( bezeichnung, lizenzpflicht, anzahl_lizenz) VALUES ( '$notenbuch', '$checkliz', '$anz_lizenz')");
|
||||
if ($sql1) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Das Notenbuch wurde angelegt!</div>|***|success';
|
||||
exit;
|
||||
@ -79,7 +78,7 @@ if ($function == 'notenbuchupdate') {
|
||||
$sql1 = $db->query("UPDATE jumi_noten_zusammenstellung
|
||||
SET bezeichnung ='$notenbuch'
|
||||
,lizenzpflicht='$checkliz'
|
||||
,anzahl_lizenz=$anz_lizenz
|
||||
,anzahl_lizenz='$anz_lizenz'
|
||||
WHERE zsid = $zsid
|
||||
");
|
||||
|
||||
@ -114,7 +113,7 @@ if ($function == 'erfzuordnung') {
|
||||
$db = dbconnect();
|
||||
$sql1 = $db->query("INSERT INTO jumi_noten_zusammenstellung_zuord ( jndid, zsid) VALUES ( $jndid, $zsid )");
|
||||
if ($sql1) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Noten wurden zugewiesen!</div>|***|success|***|' . $jndid;
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Noten wurden zugewiesen!</div>|***|success|***|' . $zsid;
|
||||
exit;
|
||||
} else {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die Noten wurden nicht zugewiesen: Insert Fehler Datenbank.</div>|***|error';
|
||||
@ -132,7 +131,7 @@ if ($function == 'delzuordnung') {
|
||||
|
||||
$sql1 = $db->query("DELETE FROM jumi_noten_zusammenstellung_zuord WHERE jndid='$jndid' AND zsid='$zsid'");
|
||||
if ($sql1) {
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Noten wurden entfernt!</div>|***|success|***|' . $jndid;
|
||||
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Die Noten wurden entfernt!</div>|***|success|***|' . $zsid;
|
||||
exit;
|
||||
} else {
|
||||
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Die Noten wurdne nicht entfernt: DELETE Fehler Datenbank.</div>|***|error';
|
||||
|
@ -36,7 +36,7 @@ if(isset($_GET['action'])){
|
||||
|
||||
if($action == ''){
|
||||
|
||||
$query = "SELECT a. jndid, titel, anz_lizenzen, streamlizenz, c.bezeichnung verlag
|
||||
$query = "SELECT a.jndid, titel, anz_lizenzen, streamlizenz, c.bezeichnung verlag
|
||||
FROM jumi_noten_daten a, jumi_noten_verlag c
|
||||
WHERE a.vid=c.vid
|
||||
ORDER BY titel ASC;";
|
||||
@ -49,12 +49,26 @@ if($action == ''){
|
||||
}else{
|
||||
$streamlizenz_vorh = "Nein";
|
||||
}
|
||||
|
||||
$result_rl = $db->query("SELECT $row[anz_lizenzen]-count(*) Rest
|
||||
FROM jumi_noten_zusammenstellung_zuord
|
||||
WHERE jndid = $row[jndid];");
|
||||
FROM jumi_noten_zus_saenger_zuord
|
||||
WHERE zsid IN( SELECT zsid FROM jumi_noten_zusammenstellung_zuord WHERE jndid=$row[jndid])");
|
||||
$row_rl = $result_rl->fetch_array();
|
||||
|
||||
|
||||
$query1 = "SELECT bezeichnung
|
||||
FROM jumi_noten_zusammenstellung a, jumi_noten_zusammenstellung_zuord b
|
||||
WHERE a.zsid=b.zsid
|
||||
AND b.jndid=$row[jndid]
|
||||
ORDER BY bezeichnung ASC;";
|
||||
$result1 = $db->query( $query1)
|
||||
or die ("Cannot execute query1");
|
||||
$songbook ="";
|
||||
while ($row1 = $result1->fetch_array()){
|
||||
$songbook .= "$row1[bezeichnung], ";
|
||||
}
|
||||
$songbook = substr($songbook,0,-2);
|
||||
$row['restlizenz'] = $row_rl['Rest'];
|
||||
$row['songbook'] = $songbook;
|
||||
$row['streamlizenz_vorh'] = $streamlizenz_vorh;
|
||||
$value[] = $row;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ if (isset($_GET['action'])) {
|
||||
if ($action == '') {
|
||||
|
||||
# Gespeicherte Werte
|
||||
$query = "SELECT zsid, bezeichnung, anzahl_lizenz
|
||||
$query = "SELECT zsid, bezeichnung, lizenzpflicht, anzahl_lizenz
|
||||
FROM jumi_noten_zusammenstellung
|
||||
ORDER BY bezeichnung ASC";
|
||||
|
||||
|
@ -26,7 +26,6 @@ if ($action == '') {
|
||||
$zsid = $_GET['edit'];
|
||||
$smarty->assign('rollen_edit', $zsid);
|
||||
}
|
||||
|
||||
$result_head = $db->query("SELECT bezeichnung FROM jumi_noten_zusammenstellung WHERE zsid=$zsid");
|
||||
$row_head = $result_head->fetch_array();
|
||||
$smarty->assign('notenbuchzuordnung_bezeichnung', $row_head['bezeichnung']);
|
||||
@ -45,7 +44,7 @@ if ($action == '') {
|
||||
$smarty->assign('table_data', $table_data);
|
||||
|
||||
# Zugewiesene Noten
|
||||
$query1 = "SELECT jndid, titel
|
||||
$query1 = "SELECT jndid, titel,anz_lizenzen
|
||||
FROM jumi_noten_daten
|
||||
WHERE jndid IN (SELECT jndid FROM jumi_noten_zusammenstellung_zuord WHERE zsid=$zsid)
|
||||
ORDER BY jndid ASC";
|
||||
@ -53,6 +52,11 @@ if ($action == '') {
|
||||
$result1 = $db->query($query1) or die("Cannot execute query2");
|
||||
|
||||
while ($row1 = $result1->fetch_array()) {
|
||||
$result_rl = $db->query("SELECT $row1[anz_lizenzen]-count(*) Rest
|
||||
FROM jumi_noten_zus_saenger_zuord
|
||||
WHERE zsid IN( SELECT zsid FROM jumi_noten_zusammenstellung_zuord WHERE jndid=$row1[jndid])");
|
||||
$row_rl = $result_rl->fetch_array();
|
||||
$row1['restlizenz'] = $row_rl['Rest'];
|
||||
$table_data1[] = $row1;
|
||||
}
|
||||
$smarty->assign('table_data1', $table_data1);
|
||||
|
@ -13,16 +13,15 @@
|
||||
<!-- icons in nav-->
|
||||
|
||||
<!-- data Table: https://datatables.net/ -->
|
||||
<script src="../bootstrap/data-table/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="../bootstrap/data-table/dataTables.bootstrap5.min.css"></style>
|
||||
<link rel="stylesheet" href="../bootstrap/data-table/rowReorder.dataTables.min.css"></style>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/dataTables.rowReorder.min.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/dataTables.bootstrap5.min.js"></script>
|
||||
<link rel="stylesheet" href="../bootstrap/data-table/jumistyle.css"></style>
|
||||
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||
<link href="../bootstrap/data-table/datatables.min.css" rel="stylesheet"/>
|
||||
<script src="../bootstrap/data-table/datatables.min.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/moment.mon.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/datetime-moment.js"></script>
|
||||
|
||||
|
||||
<script src="js/all.js" crossorigin="anonymous"></script>
|
||||
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
|
||||
|
||||
</head>
|
||||
@ -96,18 +95,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var table = new DataTable('#myTable', {
|
||||
rowReorder: true,
|
||||
pageLength: 10,
|
||||
language: {
|
||||
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/de-DE.json',
|
||||
search: "",
|
||||
lengthMenu: "_MENU_ Zeilen",
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#myTable').DataTable({
|
||||
responsive: true,
|
||||
fixedHeader: true,
|
||||
pageLength: 10,
|
||||
order: [[0, 'desc']],
|
||||
language: {
|
||||
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/de-DE.json',
|
||||
search: "",
|
||||
lengthMenu: "_MENU_ Zeilen",
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
{/if}
|
||||
|
@ -104,7 +104,7 @@ $(document).ready(function(){
|
||||
{section name=table_data loop=$table_data}
|
||||
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
|
||||
<div class="col-8 col-md-5">{$table_data[table_data].bezeichnung}</div>
|
||||
<div class="d-none col-md-4 d-md-block">{$table_data[table_data].restlizenz}/{$table_data[table_data].anzahl_lizenz}</div>
|
||||
<div class="d-none col-md-4 d-md-block">{if $table_data[table_data].lizenzpflicht == 1}{$table_data[table_data].restlizenz}/{$table_data[table_data].anzahl_lizenz}{else}<i>keine</i>{/if}</div>
|
||||
<div class="col-4 col-md-3 text-end">
|
||||
<a class="btn mt-1 mt-md-0 btn-success btn-rounded btn-icon btn-sm" onclick="editNotenbuch({$table_data[table_data].zsid})"><i class="fa fa-edit" style="width:18px;"></i></a>
|
||||
<a class="btn mt-1 mt-md-0 btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="{$table_data[table_data].zsid}|notenbuchzuordnung.php" onclick="ShowZuordnung(this)" data-bs-target="#ZuordnungModal"><i class="fa fa-eye" style="width:18px;"></i></a>
|
||||
|
@ -13,35 +13,24 @@
|
||||
|
||||
|
||||
<!-- data Table: https://datatables.net/ -->
|
||||
<script src="../bootstrap/data-table/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="../bootstrap/data-table/dataTables.bootstrap5.min.css"></style>
|
||||
<link rel="stylesheet" href="../bootstrap/data-table/rowReorder.dataTables.min.css"></style>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/dataTables.rowReorder.min.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/dataTables.bootstrap5.min.js"></script>
|
||||
|
||||
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||
<link href="../bootstrap/data-table/datatables.min.css" rel="stylesheet"/>
|
||||
<script src="../bootstrap/data-table/datatables.min.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/moment.mon.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/datetime-moment.js"></script>
|
||||
|
||||
|
||||
<script src="js/all.js" crossorigin="anonymous"></script>
|
||||
|
||||
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
|
||||
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||
<!-- jQuery UI CSS
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
|
||||
-->
|
||||
<script src="../jquery/jquery-ui.js"></script>
|
||||
|
||||
<style>
|
||||
.btn-group > .btn{
|
||||
margin-bottom:20px;
|
||||
border-radius:20px !important;
|
||||
}
|
||||
</style>
|
||||
<style type="text/css">
|
||||
.ui-sortable tr {
|
||||
cursor:pointer;
|
||||
}
|
||||
.ui-sortable tr:hover {
|
||||
background:rgba(244,251,17,0.45);
|
||||
}
|
||||
.table>:not(caption)>*>* {
|
||||
padding: 0.1rem 0.1rem;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<!--<body onload="if(document.erfassen)document.erfassen.{$umfrageerf_focus}.focus();return false;">-->
|
||||
@ -71,7 +60,7 @@
|
||||
<td>{$table_data[table_data].titel}</td>
|
||||
<td>
|
||||
<p class="text-center">
|
||||
<a class="btn btn-success btn-rounded btn-icon btn-sm" onclick="erfzuordnung({$table_data[table_data].jndid},{$rollen_edit})"><i class="fa-solid fa-plus" style="width:18px;"></i></a>
|
||||
<a class="btn btn-success btn-rounded btn-icon btn-sm" onclick="erfzuordnung({$table_data[table_data].jndid},{$rollen_edit})"><i class="fa-solid fa-plus" style="width:10px;"></i></a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -93,6 +82,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Lied</th>
|
||||
<th>Lizenzen</th>
|
||||
<th>Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -100,9 +90,10 @@
|
||||
{section name=table_data1 loop=$table_data1}
|
||||
<tr>
|
||||
<td>{$table_data1[table_data1].titel}</td>
|
||||
<td>{$table_data1[table_data1].restlizenz}</td>
|
||||
<td>
|
||||
<p class="text-center">
|
||||
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delzuordnung({$table_data1[table_data1].jndid}, {$rollen_edit})"><i class="fa-solid fa-minus" style="width:18px;"></i></a>
|
||||
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delzuordnung({$table_data1[table_data1].jndid}, {$rollen_edit})"><i class="fa-solid fa-minus" style="width:10px;"></i></a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -12,32 +12,18 @@
|
||||
<script src="js/all.js" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- data Table: https://datatables.net/ -->
|
||||
<script src="../bootstrap/data-table/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="../bootstrap/data-table/dataTables.bootstrap5.min.css"></style>
|
||||
<link rel="stylesheet" href="../bootstrap/data-table/rowReorder.dataTables.min.css"></style>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/dataTables.rowReorder.min.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/dataTables.bootstrap5.min.js"></script>
|
||||
|
||||
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||
<link href="../bootstrap/data-table/datatables.min.css" rel="stylesheet"/>
|
||||
<script src="../bootstrap/data-table/datatables.min.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/moment.mon.js"></script>
|
||||
<script type="text/javascript" src="../bootstrap/data-table/datetime-moment.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
|
||||
<script src="../jquery/jquery-3.4.1.min.js"></script>
|
||||
<!-- jQuery UI CSS
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
|
||||
-->
|
||||
<script src="../jquery/jquery-ui.js"></script>
|
||||
<style>
|
||||
.btn-group > .btn{
|
||||
margin-bottom:20px;
|
||||
border-radius:20px !important;
|
||||
}
|
||||
|
||||
.ui-sortable tr {
|
||||
cursor:pointer;
|
||||
}
|
||||
.ui-sortable tr:hover {
|
||||
background:rgba(244,251,17,0.45);
|
||||
}
|
||||
.table>:not(caption)>*>* {
|
||||
padding: 0.1rem 0.1rem;
|
||||
}
|
||||
@ -51,7 +37,7 @@
|
||||
<body class="sb-nav-fixed">
|
||||
<main>
|
||||
<!--Anwendung-->
|
||||
<script src="../js/components/admin_rollen.js"></script>
|
||||
<script src="../js/components/admin_notenbuch.js"></script>
|
||||
<p class="text-center"><b>{$notenzuordnung_bezeichnung}</b></p>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
@ -75,7 +61,7 @@
|
||||
<td>{$table_data[table_data].nachname}</td>
|
||||
<td>
|
||||
<p class="text-center">
|
||||
<a class="btn btn-success btn-rounded btn-icon btn-sm" onclick="erfNotenUser({$table_data[table_data].csid}, {$zusammenstellung_edit})"><i class="fa-solid fa-plus" style="width:18px;"></i></a>
|
||||
<a class="btn btn-success btn-rounded btn-icon btn-sm" onclick="erfNotenUser({$table_data[table_data].csid}, {$zusammenstellung_edit})"><i class="fa-solid fa-plus" style="width:10px;"></i></a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -106,7 +92,7 @@
|
||||
<td>{$table_data1[table_data1].nachname}</td>
|
||||
<td>
|
||||
<p class="text-center">
|
||||
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delNotenUser({$table_data1[table_data1].csid}, {$zusammenstellung_edit})"><i class="fa-solid fa-minus" style="width:18px;"></i></a>
|
||||
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delNotenUser({$table_data1[table_data1].csid}, {$zusammenstellung_edit})"><i class="fa-solid fa-minus" style="width:10px;"></i></a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -118,9 +104,7 @@
|
||||
<div id="msg"></div>
|
||||
</main>
|
||||
</div>
|
||||
<script src="../bootstrap/node_modules/move-js/move.js"></script>
|
||||
<link href="../bootstrap/dist/scrollable-tabs.min.css" rel="stylesheet">
|
||||
<script src="../bootstrap/dist/scrollable-tabs.min.js"></script>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user