braucht auch target=active für Ausklappen
This commit is contained in:
parent
c8a8eaba81
commit
8910899395
|
|
@ -16,13 +16,13 @@ if ($AdminStatus != 1) {
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Helfer Drop am See Alle Schichten</title>
|
<title>Helfer Drop am See Alle Schichten</title>
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/style_desktop.css" media="screen and (min-width:781px)"/>
|
<link rel="stylesheet" href="css/style_desktop.css" media="screen and (min-width:781px)"/>
|
||||||
<link rel="stylesheet" href="css/style_mobile.css" media="screen and (max-width:780px)"/>
|
<link rel="stylesheet" href="css/style_mobile.css" media="screen and (max-width:780px)"/>
|
||||||
<meta name="viewport" content="width=480" />
|
<meta name="viewport" content="width=480" />
|
||||||
<script src="js/jquery-3.7.1.min.js" type="text/javascript"></script>
|
|
||||||
<script src="js/helferdb.js" type="text/javascript"></script>
|
<script src="js/jquery-3.7.1.min.js" type="text/javascript"></script>
|
||||||
|
<script src="js/helferdb.js" type="text/javascript"></script>
|
||||||
<script> collapse_table_rows();
|
<script> collapse_table_rows();
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
@ -140,18 +140,13 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
if (isset($_POST['plusschicht'])) {
|
if (isset($_POST['plusschicht'])) {
|
||||||
$messages = [];
|
$messages = [];
|
||||||
$SchichtId = $_POST['plusschicht'];
|
$SchichtID = $_POST['plusschicht'];
|
||||||
|
// Nutzer hat hier zuletzt etwas geändert und wir klappen das deshalb auf,
|
||||||
// Eingaben überprüfen:
|
// indem wir unten target=active setzen
|
||||||
|
$_SESSION["SchichtIdAktiv"] = $SchichtID;
|
||||||
// if(!preg_match('/^[a-zA-Z]+[a-zA-Z0-9._]+$/', $HelferName)) {
|
|
||||||
// $messages[] = 'Bitte prüfen Sie die eingegebenen Namen';
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
if (empty($messages)) {
|
if (empty($messages)) {
|
||||||
// Helfer Schicht zuweisen
|
// Helfer Schicht zuweisen
|
||||||
$db_erg = HelferSchichtZuweisen($db_link, $AliasHelferID, $SchichtId, $AdminID);
|
$db_erg = HelferSchichtZuweisen($db_link, $AliasHelferID, $SchichtID, $AdminID);
|
||||||
|
|
||||||
// Erfolg vermelden und Skript beenden, damit Formular nicht erneut ausgegeben wird
|
// Erfolg vermelden und Skript beenden, damit Formular nicht erneut ausgegeben wird
|
||||||
$HelferName = '';
|
$HelferName = '';
|
||||||
|
|
@ -385,6 +380,9 @@ if ($addschicht != '0') {
|
||||||
$rowstyle = 'style="dummy:' . $zeile['SchichtID'] . '"';
|
$rowstyle = 'style="dummy:' . $zeile['SchichtID'] . '"';
|
||||||
$regtext = '';
|
$regtext = '';
|
||||||
}
|
}
|
||||||
|
if ($_SESSION["SchichtIdAktiv"] == $zeile['SchichtID']) {
|
||||||
|
$rowstyle = $rowstyle . " target='active' "; // dont collapse when the user did something
|
||||||
|
}
|
||||||
|
|
||||||
echo '<tr ' . $rowstyle . 'onclick="window.location.href=\'DetailsSchichten.php?InfoAlleSchichtID=' . $zeile['SchichtID'] . '#Info\';" >';
|
echo '<tr ' . $rowstyle . 'onclick="window.location.href=\'DetailsSchichten.php?InfoAlleSchichtID=' . $zeile['SchichtID'] . '#Info\';" >';
|
||||||
|
|
||||||
|
|
@ -399,7 +397,7 @@ if ($addschicht != '0') {
|
||||||
echo "" . $zeile['Soll'] . "</td>";
|
echo "" . $zeile['Soll'] . "</td>";
|
||||||
// buttons sind in der selben Zelle
|
// buttons sind in der selben Zelle
|
||||||
echo "<td width='30px'>" . "<button width='20px' name='plusschicht' value='" . $zeile['SchichtID'] . "'>+</button>" . "";
|
echo "<td width='30px'>" . "<button width='20px' name='plusschicht' value='" . $zeile['SchichtID'] . "'>+</button>" . "";
|
||||||
echo "" . " <button width='120px' name='minusschicht' value='" . $zeile['SchichtID'] . "'>–</button> $regtext" . "</td>";
|
echo " <button width='120px' name='minusschicht' value='" . $zeile['SchichtID'] . "'>–</button> $regtext" . "</td>";
|
||||||
//echo "<td>$regtext</td>";
|
//echo "<td>$regtext</td>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue