updated to materialize2
This commit is contained in:
@@ -46,3 +46,7 @@ h3 {
|
|||||||
h6 {
|
h6 {
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.sidenav li {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ function initSelects() {
|
|||||||
var selectElements = document.querySelectorAll('select');
|
var selectElements = document.querySelectorAll('select');
|
||||||
// var selectInstances =
|
// var selectInstances =
|
||||||
M.FormSelect.init(selectElements, {});
|
M.FormSelect.init(selectElements, {});
|
||||||
|
console.log('initSelect');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init SideNav menu
|
// Init SideNav menu
|
||||||
@@ -33,7 +34,8 @@ function initModals() {
|
|||||||
var modalElements = document.querySelectorAll('.modal');
|
var modalElements = document.querySelectorAll('.modal');
|
||||||
// var modalInstances =
|
// var modalInstances =
|
||||||
M.Modal.init(modalElements, {
|
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>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
|
|
||||||
<!-- shared imports (common css, MaterializeCss) -->
|
<head>
|
||||||
<?php readfile('shared/imports.php'); ?>
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|
||||||
<!-- inits for the materializeCss -->
|
<!-- shared imports (common css, MaterializeCss) -->
|
||||||
<script src="events.js"></script>
|
<?php readfile('shared/imports.php'); ?>
|
||||||
|
|
||||||
<title><?php echo($meta['title']); ?></title>
|
<!-- inits for the materializeCss -->
|
||||||
<meta name="description" content="<?php echo($meta['description']); ?>" />
|
<script src="events.js"></script>
|
||||||
|
|
||||||
<link rel="icon" href="<?echo($config['ressourceUrl']);?>/graphiken/icons/cwsv.ico" />
|
<title><?php echo($meta['title']); ?></title>
|
||||||
<link rel="apple-touch-icon" href="<?echo($config['baseUrl']);?>/apple-touch-icon.png">
|
<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>
|
</head>
|
||||||
<header>
|
|
||||||
<!-- The sidenav -->
|
|
||||||
<?php require './events.sidenav.inc.php'; ?>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<?php if ($_SESSION['login']) { ?>
|
<body>
|
||||||
<main>
|
<header>
|
||||||
<h2 id="comingStarts">Eingeschriebene Starter</h2>
|
<!-- The sidenav -->
|
||||||
<?php Starter::htmlTableComingStarts(); ?>
|
<?php require './events.sidenav.inc.php'; ?>
|
||||||
|
</header>
|
||||||
|
|
||||||
<h2 id="eventList">Übersicht anstehender Events</h2>
|
<?php if ($_SESSION['login']) { ?>
|
||||||
<!-- Table with events-->
|
<main>
|
||||||
<?php echo(eventPlaner::getHtmlEventTable(eventPlaner::getComingWkEvents())); ?>
|
<h2 id="comingStarts">Eingeschriebene Starter</h2>
|
||||||
|
<?php Starter::htmlTableComingStarts(); ?>
|
||||||
|
|
||||||
<h2 id="detailedEventList">Detailansicht kommender Wettkämpfe</h2>
|
<h2 id="eventList">Übersicht anstehender Events</h2>
|
||||||
<?php foreach (eventPlaner::getComingWkEvents() as $event) {
|
<!-- Table with events-->
|
||||||
echo($event->asHtmlCard());
|
<?php echo(eventPlaner::getHtmlEventTable(eventPlaner::getComingWkEvents())); ?>
|
||||||
}?>
|
|
||||||
</main>
|
<h2 id="detailedEventList">Detailansicht kommender Wettkämpfe</h2>
|
||||||
<?php } ?>
|
<?php foreach (eventPlaner::getComingWkEvents() as $event) {
|
||||||
</body>
|
echo($event->asHtmlCard());
|
||||||
</html>
|
}?>
|
||||||
|
</main>
|
||||||
|
<?php } ?>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -150,7 +150,7 @@ class Event
|
|||||||
. $this->getHtmlStarterList();
|
. $this->getHtmlStarterList();
|
||||||
$kids = participo::getKids();
|
$kids = participo::getKids();
|
||||||
$modal .= '<div class="row">';
|
$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();
|
$today = new DateTime();
|
||||||
if (
|
if (
|
||||||
@@ -164,6 +164,7 @@ class Event
|
|||||||
$modal .= '<div>Es ist leider zu spät noch jemanden einzutragen!</div>';
|
$modal .= '<div>Es ist leider zu spät noch jemanden einzutragen!</div>';
|
||||||
}
|
}
|
||||||
$modal .= '</div>';
|
$modal .= '</div>';
|
||||||
|
|
||||||
$modal .=
|
$modal .=
|
||||||
'</div>' . // end modal-content
|
'</div>' . // end modal-content
|
||||||
'<div class="modal-footer">' .
|
'<div class="modal-footer">' .
|
||||||
@@ -295,8 +296,8 @@ class Event
|
|||||||
public function getHtmlAddStarterForm($user, $options = [])
|
public function getHtmlAddStarterForm($user, $options = [])
|
||||||
{
|
{
|
||||||
$defaults = [
|
$defaults = [
|
||||||
'formClass' => 'card col s12 m6 l3',
|
'formClass' => 's12 m6 xl3',
|
||||||
'inputClass' => 'input-field',
|
'inputClass' => 'input-field col s12',
|
||||||
'buttonClass' => 'btn'
|
'buttonClass' => 'btn'
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -305,18 +306,20 @@ class Event
|
|||||||
$returnToUrl = $options['returnToUrl'] ?? urlencode(getCurPagesUrl());
|
$returnToUrl = $options['returnToUrl'] ?? urlencode(getCurPagesUrl());
|
||||||
|
|
||||||
$key = isset($_SESSION['apiKey']) ? $_SESSION['apiKey'] : null;
|
$key = isset($_SESSION['apiKey']) ? $_SESSION['apiKey'] : null;
|
||||||
|
$selectId = 'form-selectType-event-' . $this->id . '-user-' . $user->getId();
|
||||||
|
|
||||||
$form =
|
$form =
|
||||||
'<form class="' . $options['formClass'] . '" action="api.starter.add.php" method="post">'
|
'<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="eventId" id="eventId" value="' . $this->id . '">'
|
||||||
. '<input type="hidden" name="userId" id="userId" value="' . $user->getId() . '">'
|
. '<input type="hidden" name="userId" id="userId" value="' . $user->getId() . '">'
|
||||||
. '<input type="hidden" name="returnToUrl" id="returnToUrl" value="' . $returnToUrl . '" >'
|
. '<input type="hidden" name="returnToUrl" id="returnToUrl" value="' . $returnToUrl . '" >'
|
||||||
. '<div class="input-field">'
|
. '<div class="' . $options['inputClass'] . '">'
|
||||||
. '<select id="selectTypeForm" name="type">'
|
. '<label for="' . $selectId . '">' . $user->getName() . ', ' . $user->getFirstname() . '</label>'
|
||||||
|
. '<select id="' . $selectId . '" name="type">'
|
||||||
. '<option value="1" selected="">als Starter</option>'
|
. '<option value="1" selected="">als Starter</option>'
|
||||||
. '<option value="2">als Zuschauer</option>'
|
. '<option value="2">als Zuschauer</option>'
|
||||||
. '<option value="3">keine Teilnahme</option>'
|
. '<option value="3">keine Teilnahme</option>'
|
||||||
. '</select>'
|
. '</select>'
|
||||||
. '<label for="selectTypeForm">' . $user->getName() . ', ' . $user->getFirstname() . '</label>'
|
|
||||||
. '</div>'
|
. '</div>'
|
||||||
. '<input class="' . $options['buttonClass'] . '" type="submit" name="submit" value="eintragen">'
|
. '<input class="' . $options['buttonClass'] . '" type="submit" name="submit" value="eintragen">'
|
||||||
. '</form>';
|
. '</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>
|
|
||||||
<?php
|
<?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>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
Submodule submodules/materialize updated: 4463268d48...0ada13a852
Reference in New Issue
Block a user