-
diff --git a/Frontend/Javascript/LoginFunctionality.js b/Frontend/Javascript/LoginFunctionality.js
index e1698d2..5c19cfc 100755
--- a/Frontend/Javascript/LoginFunctionality.js
+++ b/Frontend/Javascript/LoginFunctionality.js
@@ -1,36 +1,28 @@
$(document).ready(function () {
+ // Register Start
let selectedGameJam;
+ let MemberSize = $('#NUDDisplay').text();
let displayValue = 0;
- let AvailableJams = [
+ let arr = [
{"id": "-1", "Gamejam": "Vælg aktivt GameJam"}
];
- let GroupName = getCookie('groupName');
- let GroupId = getCookie('groupId');
-
- // Control Logged in users
- if (GroupId != null)
- {
- LoggedInUser();
- }
- //
-
- // Register Start
-
// Populate select with options from the database
axios.get('/Backend/Controllers/GameJam/GetGameJam.php')
.then(function(res) {
- let resArr = res.data.data;
+ let resArr = res.data;
- for(let i = 0; i < resArr.length; i++)
+ //console.log(res.data.data);
+
+ for(let i = 0; i < res.data.data.length; i++)
{
- AvailableJams.push({
- id: resArr[i].id,
- Gamejam: resArr[i].name
+ arr.push({
+ id: res.data.data[i].id,
+ Gamejam: res.data.data[i].name
});
}
- $.each(AvailableJams, function(i, data) {
+ $.each(arr, function(i, data) {
if (i === 0)
{
$('#GameJamSelect').append('
');
@@ -162,15 +154,7 @@ $(document).ready(function () {
axios.post(URL, formData, {
header: 'multipart/form-data'
}).then(res => {
- if (res.status == 201)
- {
- let LoginModalElem = document.getElementById('LoginModal')
- let LoginModal = bootstrap.Modal.getInstance(LoginModalElem);
-
- LoginModal.hide();
-
- LoggedInUser();
- }
+ console.log(res);
}).catch(error => {
console.log(error);
});
@@ -205,14 +189,20 @@ $(document).ready(function () {
$('#NUDDisplay').text(displayValue);
}
});
+
+
+ async function GetGroupNames() {
+ const res = await axios.get('/Backend/Controllers/Group/GetGroup.php');
+
+ return res.data;
+ }
+
// Register end
// Login start
$('#LoginForm').submit(function(e) {
let URL = "/Backend/Controllers/Group/Login.php";
- $('#loginUsername').attr('name') = "groupName";
-
let form = $('#LoginForm')[0];
let formData = new FormData(form);
@@ -221,17 +211,13 @@ $(document).ready(function () {
formData.append(id, value);
+
axios.post(URL, formData, {
header: 'multipart/form-data'
}).then(res => {
if (res.status === 200)
{
- let LoginModalElem = document.getElementById('LoginModal')
- let LoginModal = bootstrap.Modal.getInstance(LoginModalElem);
-
- LoginModal.hide();
-
- LoggedInUser();
+ console.log('Logged in');
}
}).catch(error => {
console.log(error);
@@ -240,94 +226,4 @@ $(document).ready(function () {
e.preventDefault();
})
// Login end
-
- // Admin Login Start
- $('#AdminLoginBtn').submit(function(e) {
- let URL = "/Backend/Controllers/Admin/AdminLogin.php";
-
- $('#loginUsername').attr('name') = "userName";
-
- let form = $('#LoginForm')[0];
- let formData = new FormData(form);
-
- let id = $('#LoginBtn').attr('name');
- let value = $('#LoginBtn').val();
-
- formData.append(id, value);
-
- axios.post(URL, formData, {
- header: 'multipart/form-data'
- }).then(res => {
- if (res.status === 200)
- {
- let LoginModalElem = document.getElementById('LoginModal')
- let LoginModal = bootstrap.Modal.getInstance(LoginModalElem);
-
- LoginModal.hide();
-
- LoggedInUser();
- }
- }).catch(error => {
- console.log(error);
- });
-
- e.preventDefault();
- });
- // Admin Login End
-
- // Logout Start
- $('#UserLogout').click(function() {
- axios.get('/Backend/Controllers/Group/Logout.php').then(res => {
- if(res.status === 200)
- {
- UserLoggedOut();
- }
- }).catch(error => {
- console.log(error);
- });
- });
- // Logout End
-
- // Functions Start
- function LoggedInUser() {
- $('#NavLogin').css({
- "display": "none"
- });
-
- $('#UserLogout').css({
- "display": "block"
- });
-
- $('#NavUser').text(`Logget ind som: ${GroupName}`);
- $('#NavUser').css({
- "display": "block"
- });
- }
-
- function UserLoggedOut() {
- $('#NavLogin').css({
- "display": "block"
- });
-
- $('#UserLogout').css({
- "display": "None"
- });
-
- $('#NavUser').css({
- "display": "none"
- });
- }
-
- async function GetGroupNames() {
- const res = await axios.get('/Backend/Controllers/Group/GetGroup.php');
-
- return res.data;
- }
-
- function getCookie(name) {
- const value = `; ${document.cookie}`;
- const parts = value.split(`; ${name}=`);
- if (parts.length === 2) return parts.pop().split(';').shift();
- }
- // Functions End
});
\ No newline at end of file
diff --git a/Frontend/Styles/Index.css b/Frontend/Styles/Index.css
index 023c630..888440e 100755
--- a/Frontend/Styles/Index.css
+++ b/Frontend/Styles/Index.css
@@ -118,15 +118,11 @@ a:hover {
margin: 1vw 10vw 0;
}
-.RightNavText {
- color: rgba(255, 255, 255, .75);
-}
-
-.RightNavButton {
+.LoginButton {
color: rgba(255, 255, 255, .55);
}
-.RightNavButton:hover {
+.LoginButton:hover {
color: rgba(255, 255, 255, .75);
}
@@ -263,7 +259,7 @@ a:hover {
.modal-body {
padding: 0 0;
- margin: 1vh 1vw;
+ margin: 2vh 2vw;
background-color: rgb(18, 18, 18);
}
@@ -355,6 +351,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);
}
@@ -397,12 +452,11 @@ a:hover {
color: rgba(255, 255, 255, .75);
}
-.box #LoginBtn,
-.box #RegisterBtn {
+.box input[type="submit"] {
border: 0;
background: none;
display: block;
- margin: 20px auto 0 auto;
+ margin: 20px auto;
text-align: center;
border: 2px solid rgb(46, 204, 113);
padding: 14px 40px;
@@ -413,22 +467,7 @@ a:hover {
cursor: pointer;
}
-.box #AdminLoginBtn {
- border: 0;
- background: transparent;
- color: rgba(255, 255, 255, .55);
- display: block;
- margin: 0 auto;
- text-align: center;
- padding: 14px 10px;
- outline: none;
- border-radius: 24px;
- transition: 0.25s;
- cursor: pointer;
-}
-
-.box #LoginBtn:hover,
-.box #RegisterBtn:hover {
+.box input[type="submit"]:hover {
background: rgb(46, 204, 113);
color: rgba(255, 255, 255, .75);
}
@@ -690,6 +729,10 @@ image_gruppenavn{
background-color: #01579b;
border-radius: 50%;
}
+
+.hasEvent {
+ background-color: red;;
+}
/*Kalender slut*/
#return-to-top {
diff --git a/composer.lock b/composer.lock
index 63e5ca7..28f89c3 100755
--- a/composer.lock
+++ b/composer.lock
@@ -103,16 +103,16 @@
},
{
"name": "illuminate/collections",
- "version": "v8.34.0",
+ "version": "v8.32.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/collections.git",
- "reference": "e18d6e4cf03dd597bc3ecd86fefc2023d0c7a5e8"
+ "reference": "d7cc717a00064b40fa63a8ad522042005e1de1ed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/illuminate/collections/zipball/e18d6e4cf03dd597bc3ecd86fefc2023d0c7a5e8",
- "reference": "e18d6e4cf03dd597bc3ecd86fefc2023d0c7a5e8",
+ "url": "https://api.github.com/repos/illuminate/collections/zipball/d7cc717a00064b40fa63a8ad522042005e1de1ed",
+ "reference": "d7cc717a00064b40fa63a8ad522042005e1de1ed",
"shasum": ""
},
"require": {
@@ -153,20 +153,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2021-03-19T00:05:33+00:00"
+ "time": "2021-03-08T17:22:22+00:00"
},
{
"name": "illuminate/container",
- "version": "v8.34.0",
+ "version": "v8.32.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/container.git",
- "reference": "0e38ee1632d470e56aece0079e6e22d13e6bea8e"
+ "reference": "3d6ce613f455093fdf8bd3c81b30104aef0b11e0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/illuminate/container/zipball/0e38ee1632d470e56aece0079e6e22d13e6bea8e",
- "reference": "0e38ee1632d470e56aece0079e6e22d13e6bea8e",
+ "url": "https://api.github.com/repos/illuminate/container/zipball/3d6ce613f455093fdf8bd3c81b30104aef0b11e0",
+ "reference": "3d6ce613f455093fdf8bd3c81b30104aef0b11e0",
"shasum": ""
},
"require": {
@@ -204,20 +204,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2021-03-16T19:42:20+00:00"
+ "time": "2021-02-12T21:15:27+00:00"
},
{
"name": "illuminate/contracts",
- "version": "v8.34.0",
+ "version": "v8.32.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/contracts.git",
- "reference": "121cea1d8b8772bc7fee99c71ecf0f57c1d77b3b"
+ "reference": "9c7a9868d7485a82663d67109429094c8e4ed56d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/illuminate/contracts/zipball/121cea1d8b8772bc7fee99c71ecf0f57c1d77b3b",
- "reference": "121cea1d8b8772bc7fee99c71ecf0f57c1d77b3b",
+ "url": "https://api.github.com/repos/illuminate/contracts/zipball/9c7a9868d7485a82663d67109429094c8e4ed56d",
+ "reference": "9c7a9868d7485a82663d67109429094c8e4ed56d",
"shasum": ""
},
"require": {
@@ -252,20 +252,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2021-03-12T14:45:30+00:00"
+ "time": "2021-02-26T13:17:03+00:00"
},
{
"name": "illuminate/database",
- "version": "v8.34.0",
+ "version": "v8.32.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/database.git",
- "reference": "74a165fd07b36cc0ea3558fa391b762867af87e8"
+ "reference": "f6a10cebd9bbd188ca66993168fb453439dbb50f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/illuminate/database/zipball/74a165fd07b36cc0ea3558fa391b762867af87e8",
- "reference": "74a165fd07b36cc0ea3558fa391b762867af87e8",
+ "url": "https://api.github.com/repos/illuminate/database/zipball/f6a10cebd9bbd188ca66993168fb453439dbb50f",
+ "reference": "f6a10cebd9bbd188ca66993168fb453439dbb50f",
"shasum": ""
},
"require": {
@@ -320,11 +320,11 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2021-03-23T15:12:51+00:00"
+ "time": "2021-03-09T14:06:15+00:00"
},
{
"name": "illuminate/macroable",
- "version": "v8.34.0",
+ "version": "v8.32.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/macroable.git",
@@ -370,16 +370,16 @@
},
{
"name": "illuminate/support",
- "version": "v8.34.0",
+ "version": "v8.32.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/support.git",
- "reference": "b7b27e758b68aad44558c62e7374328835895386"
+ "reference": "2ef7ff288366a1ebe32f633196a1b90bd443acc3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/illuminate/support/zipball/b7b27e758b68aad44558c62e7374328835895386",
- "reference": "b7b27e758b68aad44558c62e7374328835895386",
+ "url": "https://api.github.com/repos/illuminate/support/zipball/2ef7ff288366a1ebe32f633196a1b90bd443acc3",
+ "reference": "2ef7ff288366a1ebe32f633196a1b90bd443acc3",
"shasum": ""
},
"require": {
@@ -434,7 +434,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2021-03-21T13:37:37+00:00"
+ "time": "2021-03-05T15:22:14+00:00"
},
{
"name": "nesbot/carbon",