updated to materialize2
This commit is contained in:
@@ -46,3 +46,7 @@ h3 {
|
||||
h6 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
ul.sidenav li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ function initSelects() {
|
||||
var selectElements = document.querySelectorAll('select');
|
||||
// var selectInstances =
|
||||
M.FormSelect.init(selectElements, {});
|
||||
console.log('initSelect');
|
||||
}
|
||||
|
||||
// Init SideNav menu
|
||||
@@ -33,7 +34,8 @@ function initModals() {
|
||||
var modalElements = document.querySelectorAll('.modal');
|
||||
// var modalInstances =
|
||||
M.Modal.init(modalElements, {
|
||||
'onOpenEnd': initSelects
|
||||
// @todo Temporary disabled. Normally the selects need to be init after the modal shows. MaterializeCss 2 seems to change this.
|
||||
// 'onOpenEnd': initSelects
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -3,44 +3,47 @@ require_once 'events.inc.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- shared imports (common css, MaterializeCss) -->
|
||||
<?php readfile('shared/imports.php'); ?>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- inits for the materializeCss -->
|
||||
<script src="events.js"></script>
|
||||
<!-- shared imports (common css, MaterializeCss) -->
|
||||
<?php readfile('shared/imports.php'); ?>
|
||||
|
||||
<title><?php echo($meta['title']); ?></title>
|
||||
<meta name="description" content="<?php echo($meta['description']); ?>" />
|
||||
<!-- inits for the materializeCss -->
|
||||
<script src="events.js"></script>
|
||||
|
||||
<link rel="icon" href="<?echo($config['ressourceUrl']);?>/graphiken/icons/cwsv.ico" />
|
||||
<link rel="apple-touch-icon" href="<?echo($config['baseUrl']);?>/apple-touch-icon.png">
|
||||
<title><?php echo($meta['title']); ?></title>
|
||||
<meta name="description"
|
||||
content="<?php echo($meta['description']); ?>" />
|
||||
|
||||
</head>
|
||||
<link rel="icon" href="<?echo($config['ressourceUrl']);?>/graphiken/icons/cwsv.ico" />
|
||||
<link rel="apple-touch-icon" href="<?echo($config['baseUrl']);?>/apple-touch-icon.png">
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<!-- The sidenav -->
|
||||
<?php require './events.sidenav.inc.php'; ?>
|
||||
</header>
|
||||
</head>
|
||||
|
||||
<?php if ($_SESSION['login']) { ?>
|
||||
<main>
|
||||
<h2 id="comingStarts">Eingeschriebene Starter</h2>
|
||||
<?php Starter::htmlTableComingStarts(); ?>
|
||||
<body>
|
||||
<header>
|
||||
<!-- The sidenav -->
|
||||
<?php require './events.sidenav.inc.php'; ?>
|
||||
</header>
|
||||
|
||||
<h2 id="eventList">Übersicht anstehender Events</h2>
|
||||
<!-- Table with events-->
|
||||
<?php echo(eventPlaner::getHtmlEventTable(eventPlaner::getComingWkEvents())); ?>
|
||||
<?php if ($_SESSION['login']) { ?>
|
||||
<main>
|
||||
<h2 id="comingStarts">Eingeschriebene Starter</h2>
|
||||
<?php Starter::htmlTableComingStarts(); ?>
|
||||
|
||||
<h2 id="eventList">Übersicht anstehender Events</h2>
|
||||
<!-- Table with events-->
|
||||
<?php echo(eventPlaner::getHtmlEventTable(eventPlaner::getComingWkEvents())); ?>
|
||||
|
||||
<h2 id="detailedEventList">Detailansicht kommender Wettkämpfe</h2>
|
||||
<?php foreach (eventPlaner::getComingWkEvents() as $event) {
|
||||
echo($event->asHtmlCard());
|
||||
}?>
|
||||
</main>
|
||||
<?php } ?>
|
||||
</body>
|
||||
|
||||
<h2 id="detailedEventList">Detailansicht kommender Wettkämpfe</h2>
|
||||
<?php foreach (eventPlaner::getComingWkEvents() as $event) {
|
||||
echo($event->asHtmlCard());
|
||||
}?>
|
||||
</main>
|
||||
<?php } ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -150,7 +150,7 @@ class Event
|
||||
. $this->getHtmlStarterList();
|
||||
$kids = participo::getKids();
|
||||
$modal .= '<div class="row">';
|
||||
$modal .= '<div>Deadline zum Eintragen: ' . $this->deadline->format('Y-m-d') . '</div>';
|
||||
$modal .= '<div class="s12">Deadline zum Eintragen: ' . $this->deadline->format('Y-m-d') . '</div>';
|
||||
|
||||
$today = new DateTime();
|
||||
if (
|
||||
@@ -164,6 +164,7 @@ class Event
|
||||
$modal .= '<div>Es ist leider zu spät noch jemanden einzutragen!</div>';
|
||||
}
|
||||
$modal .= '</div>';
|
||||
|
||||
$modal .=
|
||||
'</div>' . // end modal-content
|
||||
'<div class="modal-footer">' .
|
||||
@@ -295,8 +296,8 @@ class Event
|
||||
public function getHtmlAddStarterForm($user, $options = [])
|
||||
{
|
||||
$defaults = [
|
||||
'formClass' => 'card col s12 m6 l3',
|
||||
'inputClass' => 'input-field',
|
||||
'formClass' => 's12 m6 xl3',
|
||||
'inputClass' => 'input-field col s12',
|
||||
'buttonClass' => 'btn'
|
||||
];
|
||||
|
||||
@@ -305,18 +306,20 @@ class Event
|
||||
$returnToUrl = $options['returnToUrl'] ?? urlencode(getCurPagesUrl());
|
||||
|
||||
$key = isset($_SESSION['apiKey']) ? $_SESSION['apiKey'] : null;
|
||||
$selectId = 'form-selectType-event-' . $this->id . '-user-' . $user->getId();
|
||||
|
||||
$form =
|
||||
'<form class="' . $options['formClass'] . '" action="api.starter.add.php" method="post">'
|
||||
. '<input type="hidden" name="eventId" id="eventId" value="' . $this->id . '">'
|
||||
. '<input type="hidden" name="userId" id="userId" value="' . $user->getId() . '">'
|
||||
. '<input type="hidden" name="returnToUrl" id="returnToUrl" value="' . $returnToUrl . '" >'
|
||||
. '<div class="input-field">'
|
||||
. '<select id="selectTypeForm" name="type">'
|
||||
. '<div class="' . $options['inputClass'] . '">'
|
||||
. '<label for="' . $selectId . '">' . $user->getName() . ', ' . $user->getFirstname() . '</label>'
|
||||
. '<select id="' . $selectId . '" name="type">'
|
||||
. '<option value="1" selected="">als Starter</option>'
|
||||
. '<option value="2">als Zuschauer</option>'
|
||||
. '<option value="3">keine Teilnahme</option>'
|
||||
. '</select>'
|
||||
. '<label for="selectTypeForm">' . $user->getName() . ', ' . $user->getFirstname() . '</label>'
|
||||
. '</div>'
|
||||
. '<input class="' . $options['buttonClass'] . '" type="submit" name="submit" value="eintragen">'
|
||||
. '</form>';
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
<?php
|
||||
if($_SESSION['login']){
|
||||
?>
|
||||
<ul id="slide-out" class="sidenav">
|
||||
<li><div class="user-view">
|
||||
<div class="background">
|
||||
<img src="images/office.jpg">
|
||||
</div>
|
||||
<a href="#user"><img class="circle" src="images/yuna.jpg"></a>
|
||||
<a href="#name"><span class="white-text name">John Doe</span></a>
|
||||
<a href="#email"><span class="white-text email">jdoe@example.com</span></a>
|
||||
</div></li>
|
||||
<li><a href="#!"><i class="material-icons">cloud</i>First Link With Icon</a></li>
|
||||
<li><a href="#!">Second Link</a></li>
|
||||
<li><div class="divider"></div></li>
|
||||
<li><a class="subheader">Subheader</a></li>
|
||||
<li><a class="waves-effect" href="#!">Third Link With Waves</a></li>
|
||||
</ul>
|
||||
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
||||
if ($_SESSION['login']) {
|
||||
?>
|
||||
<ul id="slide-out" class="sidenav">
|
||||
<li>
|
||||
<div class="user-view">
|
||||
<div class="background">
|
||||
<img src="images/office.jpg">
|
||||
</div>
|
||||
<a href="#user"><img class="circle" src="images/yuna.jpg"></a>
|
||||
<a href="#name"><span class="white-text name">John Doe</span></a>
|
||||
<a href="#email"><span class="white-text email">jdoe@example.com</span></a>
|
||||
</div>
|
||||
</li>
|
||||
<li><a href="#!"><i class="material-icons">cloud</i>First Link With Icon</a></li>
|
||||
<li><a href="#!">Second Link</a></li>
|
||||
<li>
|
||||
<div class="divider"></div>
|
||||
</li>
|
||||
<li><a class="subheader">Subheader</a></li>
|
||||
<li><a class="waves-effect" href="#!">Third Link With Waves</a></li>
|
||||
</ul>
|
||||
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
Submodule submodules/materialize updated: 4463268d48...0ada13a852
Reference in New Issue
Block a user