Add files via upload

This commit is contained in:
Markines16 2021-06-03 14:53:42 +02:00 committed by GitHub
parent 7a28aed626
commit 28bce68335
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 5 deletions

View File

@ -89,7 +89,7 @@
return $panel;
}
static function calendar(){
$formSession = new FormSession("new_session", $_SESSION["cinema"] );
$hall = $_POST['hall'] ?? $_GET['hall'] ?? "1";
$halls = Hall::getListHalls($_SESSION["cinema"]);
@ -115,8 +115,15 @@
<div class="column side"></div>
</div>
<div class="row">
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close">&times;</span>
'.$formSession->gestiona().'
</div>
</div>
<div id="calendar"></div>
</div>';
</div>';
}else{
$panel ='<div class="row">
<h3> No hay ninguna sala en este cine </h3>

View File

@ -2,7 +2,14 @@
$(document).ready(function(){
var selectedFeed = $('#hall_selector').find(':selected').data('feed');
var modal = document.getElementById("myModal");
// Get the button that opens the modal
var btn = document.getElementById("myBtn");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
var calendar = $('#calendar').fullCalendar({
editable:true,
header:{
@ -16,7 +23,8 @@ $(document).ready(function(){
timeFormat: 'H:mm',
select: function(start, end, allDay)
{
modal.style.display = "block";
/*
var e = {
"date" : $.fullCalendar.formatDate(allDay,"Y-MM-DD"),
"start" : $.fullCalendar.formatDate(start, "HH:mm"),
@ -33,7 +41,7 @@ $(document).ready(function(){
calendar.fullCalendar('refetchEvents');
alert("Added Successfully");
}
})
})*/
},
editable:true,
eventResize:function(event)
@ -114,5 +122,17 @@ $(document).ready(function(){
$('#calendar').fullCalendar('addEventSource', feed);
selectedFeed = feed;
};
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
});