Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
Minik Gaarde Lambrecht
2021-03-26 18:25:39 +01:00
52 changed files with 1577 additions and 167 deletions
File diff suppressed because it is too large Load Diff
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
+42 -10
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
@@ -27,20 +27,52 @@
</head>
<body>
<div class="HeaderPanel">
<div class="HeaderLeft">
<a href="../Index.html">
<i class="fas fa-arrow-left"></i>
</a>
<h6>
Admin panel
</h6>
<div class="HeaderPanel">
<div class="HeaderLeft">
<a href="../Index.html">
<i class="fas fa-arrow-left"></i>
</a>
<h6>
Admin panel
</h6>
</div>
</div>
<!--Opret game jam-->
<br />
<br />
<h3>Administration</h3>
<h5>Opret Game Jam</h5>
<div>
<form id="createGameJam">
<label for="nameOfGameJam">Indtast navn på Game Jam:</label>
<input type="text" name="nameOfGameJam" id="nameOfGameJam">
<br />
<label for="startDate">Start dato:</label>
<input type="date" name="startDate" id="startDate">
<br />
<label for="endDate">Slut dato:</label>
<input type="date" name="endDate" id="endDate">
<br />
<label for="startTime">Start tidspunkt:</label>
<input type="time" name="startTime" id="startTime">
<br />
<label for="endDate">Slut tidspunkt:</label>
<input type="time" name="endTime" id="endTime">
<br />
<p>Indsæt en beskrivelse af Gam jammet</p>
<div class="form-floating">
<textarea class="form-control" name="description" id="description" placeholder="Leave a comment here" id="floatingTextarea2" style="height: 100px"></textarea>
<label for="floatingTextarea2">Beskrivelse</label>
</div>
<button type="button" name="indsend" id="indsend">Indsend</button>
</form>
</div>
<!--Opret game jam slut-->
<!-- Body scripts -->
<script src="../Javascript/minibar.min.js"></script>
<script src="../Javascript/AddEvent.js"></script>
<!-- Body scripts end -->
</body>
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

+9 -9
View File
@@ -83,9 +83,12 @@
</a>
</li>
</ul>
<a type="button" class="nav-link LoginButton" data-bs-toggle="modal" data-bs-target="#LoginModal">
<a id="NavLogin" type="button" class="nav-link LoginButton" data-bs-toggle="modal" data-bs-target="#LoginModal" style="display: block;">
Login
</a>
<a id="NavUser" type="button" class="nav-link LoginButton" style="display: none;">
</a>
</div>
</div>
</nav>
@@ -618,19 +621,15 @@
<!-- Lodtrækning -->
<section id="lod">
<h3>Lodtrækning</h3>
<p></p>
<div id="chart"></div>
<div id="question"><h1></h1></div>
</section>
<!-- Lodtrækning slut -->
<hr class="GradientDivider" />
<!-- Administation -->
<section id="admin">
<h3>Administration</h3>
<p></p>
</section>
<!-- Administation slut -->
<a href="javascript:" id="return-to-top">
<i class="fas fa-chevron-up"></i>
</a>
@@ -651,6 +650,7 @@
<script src="Javascript/minibar.min.js"></script>
<script src="Javascript/HeaderFunctionality.js"></script>
<script src="Javascript/LoginFunctionality.js"></script>
<script src="Javascript/Lodtrækning.js"></script>
<!-- Body scripts end -->
</body>
+17
View File
@@ -0,0 +1,17 @@
// Admin add event
$("#indsend").click(function () {
let startDate = $("#startDate").val();
let endDate = $("#endDate").val();
let startTime = $("#startTime").val();
let endTime = $("#endTime").val();
console.log(`startDate ${startDate} \n
endDate ${endDate} \n
startTime ${startTime} \n
endTime ${endTime}`);
})
function addEvent() {
}
View File
+48 -42
View File
@@ -12,9 +12,15 @@ $(document).ready(function () {
.then(function(res) {
let resArr = res.data;
$.each(resArr, function(i, value) {
arr.push({id: value.id, Gamejam: value.name});
});
//console.log(res.data.data);
for(let i = 0; i < res.data.data.length; i++)
{
arr.push({
id: res.data.data[i].id,
Gamejam: res.data.data[i].name
});
}
$.each(arr, function(i, data) {
if (i === 0)
@@ -34,7 +40,7 @@ $(document).ready(function () {
// Remove invalidInput if selected option has been changed
$('#GameJamSelect').change(function() {
selectedGameJam = $('#GameJamSelect').children("option:selected").val();
if (selectedGameJam >= 1)
{
$('#GameJamSelect').removeClass('invalidInput');
@@ -50,7 +56,7 @@ $(document).ready(function () {
})
GetGroupNames().then(function(res) {
let resArr = res;
let resArr = res.data;
let groupNameTaken = false;
$('#RegisterBtn').click(function() {
@@ -88,28 +94,33 @@ $(document).ready(function () {
{
$('#pass1').addClass('invalidInput');
e.preventDefault();
return;
}
if($('#pass2').val().length === 0)
{
$('#pass2').addClass('invalidInput');
e.preventDefault();
return;
}
if($('#username').val().length === 0)
{
$('#username').addClass('invalidInput');
e.preventDefault();
return;
}
if($('#pass1').hasClass('invalidInput'))
{
e.preventDefault();
return;
}
if($('#pass2').hasClass('invalidInput'))
{
e.preventDefault();
return;
}
if(!$.isNumeric($('#NUDDisplay').text()))
@@ -127,32 +138,28 @@ $(document).ready(function () {
{
$('#username').addClass('invalidInput');
e.preventDefault();
return;
}
let URL = "/Backend/Controllers/Group/SigningUp.php";
let formData = new FormData(this);
let name = $('#RegisterBtn').attr('name');
let form = $('#RegisterForm')[0];
let formData = new FormData(form);
let id = $('#RegisterBtn').attr('name');
let value = $('#RegisterBtn').val();
formData.append(name, value);
formData.append(id, value);
$.ajax({
url: URL,
type: 'POST',
data: formData,
mimeType:"multipart/form-data",
contentType: false,
cache: false,
processData:false,
success: function(data, textStatus, jqXHR)
{
console.log(data);
},
error: function(jqXHR, textStatus, errorThrown)
{
console.log(textStatus);
}
axios.post(URL, formData, {
header: 'multipart/form-data'
}).then(res => {
console.log(res);
}).catch(error => {
console.log(error);
});
e.preventDefault();
});
});
@@ -195,29 +202,28 @@ $(document).ready(function () {
// Login start
$('#LoginForm').submit(function(e) {
let URL = "/Backend/Controllers/Group/Login.php";
let formData = new FormData(this);
let name = $('#LoginBtn').attr('name');
let form = $('#LoginForm')[0];
let formData = new FormData(form);
let id = $('#LoginBtn').attr('name');
let value = $('#LoginBtn').val();
formData.append(name, value);
formData.append(id, value);
$.ajax({
url: URL,
type: 'POST',
data: formData,
mimeType:"multipart/form-data",
contentType: false,
cache: false,
processData:false,
success: function(data, textStatus, jqXHR)
axios.post(URL, formData, {
header: 'multipart/form-data'
}).then(res => {
if (res.status === 200)
{
console.log(data);
},
error: function(jqXHR, textStatus, errorThrown)
{
console.log(`XHR: ${jqXHR} \n Status: ${textStatus} \n Error: ${errorThrown}`);
}
console.log('Logged in');
}
}).catch(error => {
console.log(error);
});
e.preventDefault();
})
// Login end
});
-19
View File
@@ -1,19 +0,0 @@
$(window).on("load", function(){
dataFetch();
});
function dataFetch(){
$.ajax({
type: "GET",
url: "/Game-Jaming/Backend/controllers/GameJam/GetGameJam.php",
success: function(result){
console.log(result[0].name);
}
});
}
//console.log(result.name); ?gameJamId=1
//console.log(result[0].name); uden ?gameJamId=1
+74 -1
View File
@@ -1,3 +1,6 @@
body{
text-align: center;
}
.HeaderPanel {
position: fixed;
overflow: hidden;
@@ -23,4 +26,74 @@
.HeaderLeft {
float: left;
}
}
/*Create game jam*/
#createGameJam{
justify-content: center;
display: grid;
}
#createGameJam input{
display: block;
position: center;
}
#startTime {
border-radius: 15px;
color: #474747;
background-color: rgba(255, 255, 255, .55);
border: double;
filter: invert(90%);
}
#endTime {
border-radius: 15px;
color: #474747;
background-color: rgba(255, 255, 255, .55);
border: double;
filter: invert(90%);
}
#startDate {
border-radius: 15px;
color: #474747;
background-color: rgba(255, 255, 255, .55);
border: double;
filter: invert(90%);
}
#endDate {
border-radius: 15px;
color: #474747;
background-color: rgba(255, 255, 255, .55);
border: double;
filter: invert(90%);
}
#nameOfGameJam {
background-color: rgb(18, 18, 18);
color: rgba(255, 255, 255, .55);
border-radius: 15px;
border: double;
}
#description {
background-color: rgb(18, 18, 18);
color: rgba(255, 255, 255, .55);
border-radius: 15px;
border: double;
width:400px;
height:250px;
}
#indsend {
border-radius: 15px;
color: rgba(255, 255, 255, .55);
background-color: rgb(18, 18, 18);
border: double;
}
/*Create Game Jam end*/
+60 -1
View File
@@ -352,6 +352,65 @@ a:hover {
transform: translate(-50%, -50%);
}
.box #NUDMinus {
color: rgba(255, 255, 255, .55);
background-color: transparent;
border: none;
float: left;
}
.box #NUDMinus:focus {
box-shadow: none;
}
.box #NUDMinus:focus-visible {
outline: none;
}
.box #NUDDisplay {
color: rgba(255, 255, 255, .55);
background-color: transparent;
border: none;
cursor: text;
width: 65%;
}
.box #NUDDisplay:focus {
box-shadow: none;
}
.box #NUDDisplay:focus-visible {
outline: none;
}
.box #NUDPlus {
color: rgba(255, 255, 255, .55);
background-color: transparent;
border: none;
float: right;
}
.box #NUDPlus:focus {
box-shadow: none;
}
.box #NUDPlus:focus-visible {
outline: none;
}
.box #GameJamSelect:focus {
box-shadow: none;
}
.box #GameJamSelect:hover {
color: rgba(255, 255, 255, .75);
}
.box #GameJamSelect ul {
background-color: red;
}
.box {
background-color: rgb(18, 18, 18);
}
@@ -749,7 +808,7 @@ image_gruppenavn{
}
.hasEvent {
background-color: red;
background-color: red;;
}
/*Kalender slut*/