-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-DAOUser and UserData methods to change notifications time and Analytics -RegistrationServlet GET method to change the above settings -RegistrationServlet now takes care of the Session Attributes so you don't need to login after registration -Provided the Javascript code for the page legal.jsp
- Loading branch information
1 parent
169d1d1
commit f17b5cf
Showing
6 changed files
with
184 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Function to show the popup | ||
function mostraPopup() { | ||
document.getElementById("overlay").style.display = "block"; | ||
} | ||
|
||
// Function called when the user accepts the sharing | ||
function accettaCondivisione() { | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open("GET", "../register?type=analytics&accept=true", true); | ||
xhr.send(); | ||
|
||
document.getElementById("overlay").style.display = "none"; | ||
} | ||
|
||
// Show the popup when the page is fully loaded | ||
window.onload = mostraPopup; | ||
|
||
function impostaOrario() { | ||
event.preventDefault(); | ||
let start = document.getElementById('startTime').value = ''; | ||
let end = document.getElementById('endTime').value = ''; | ||
let time = start + "|" + end; | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open("GET", "../register?type=emailTime&time="+time, true); | ||
xhr.send(); | ||
} | ||
|
||
function nonAccetto() { | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open("GET", "../register?type=analytics&accept=false", true); | ||
xhr.send(); | ||
|
||
document.getElementById("overlay").style.display = "none"; | ||
} | ||
|
||
function validateTimes() { | ||
var startTime = new Date(); | ||
var endTime = new Date(); | ||
|
||
// Convert time strings into Date objects | ||
startTime.setHours(document.getElementById('startTime').value.split(':')[0]); | ||
startTime.setMinutes(document.getElementById('startTime').value.split(':')[1]); | ||
endTime.setHours(document.getElementById('endTime').value.split(':')[0]); | ||
endTime.setMinutes(document.getElementById('endTime').value.split(':')[1]); | ||
|
||
// Check if the start time is greater than the end time | ||
if (startTime > endTime) { | ||
alert("L'ora di inizio deve essere inferiore all'ora di fine"); | ||
document.getElementById('startTime').value = ''; | ||
document.getElementById('endTime').value = ''; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters