mirror of
https://github.com/kmitresse/Cards-Rush.git
synced 2026-05-13 17:11:49 +00:00
refacto: devWeb - remove println and console.log
This commit is contained in:
@@ -135,8 +135,6 @@ public class ForgottenPasswordBean implements Serializable {
|
||||
String contentTemplate = this.translator.translate("forgotten_email_content");
|
||||
String content = MessageFormat.format(contentTemplate, requestPath, token);
|
||||
message.setText(content);
|
||||
System.out.println(contentTemplate);
|
||||
System.out.println(content);
|
||||
// Envoi du message
|
||||
Transport.send(message);
|
||||
|
||||
|
||||
@@ -109,10 +109,7 @@ public class ProfileServlet extends HttpServlet {
|
||||
simplePlayers[i] = new SimplePlayer(players[i], translator);
|
||||
}
|
||||
Gson gson = new Gson();
|
||||
System.out.println("players");
|
||||
String jsonPlayers = gson.toJson(simplePlayers);
|
||||
System.out.println("players");
|
||||
System.out.println("json: "+jsonPlayers);
|
||||
|
||||
// Configurer la réponse
|
||||
response.setContentType("application/json");
|
||||
|
||||
@@ -14,7 +14,6 @@ public class TranslationServlet extends HttpServlet {
|
||||
}
|
||||
|
||||
public void doPut(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
System.out.println("\n ok \n");
|
||||
if (request.getParameter("language") != null) {
|
||||
String language = request.getParameter("language");
|
||||
request.getSession().setAttribute("language", language);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<head>
|
||||
<script defer type="text/javascript">
|
||||
let contextPath = window.location.href.substring(0, window.location.href.lastIndexOf("/") + 1);
|
||||
console.log(contextPath);
|
||||
window.location.href = contextPath + "index";
|
||||
</script></head>
|
||||
<body>
|
||||
|
||||
@@ -30,7 +30,6 @@ function onSubmit(event) {
|
||||
}
|
||||
url.searchParams.append("username", username.value);
|
||||
|
||||
url.searchParams.forEach((value, key) => console.log(key, value));
|
||||
fetch(url, {headers: {"Content-Type": "application/json"}, method})
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
|
||||
@@ -15,7 +15,6 @@ function onSubmit(event) {
|
||||
const url = new URL(action);
|
||||
const contextPath = url.href.substring(0, url.href.lastIndexOf("/") + 1);
|
||||
inputs.forEach(input => url.searchParams.append(input.name, input.value));
|
||||
console.log(url.href);
|
||||
|
||||
fetch(url, {headers: {"Content-Type": "application/json"}, method})
|
||||
.then(res => res.json())
|
||||
|
||||
@@ -31,7 +31,6 @@ function onSubmit(event) {
|
||||
})
|
||||
.then(() => window.location.href = contextPath+"login?success=reset-password")
|
||||
.catch((error) => {
|
||||
console.log(inputs);
|
||||
onError(error, inputs);
|
||||
}
|
||||
)
|
||||
|
||||
@@ -20,7 +20,6 @@ let languageSelector = document.getElementById('language-select');
|
||||
languageSelector.addEventListener('change', function() {
|
||||
const contextPath = window.location.href.substring(0, window.location.href.lastIndexOf("/") + 1);
|
||||
const action = contextPath + "/translate";
|
||||
console.log(action);
|
||||
const method = "PUT";
|
||||
const pagination = document.querySelector('#current-page');
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ export function onError(error, inputs = []) {
|
||||
|
||||
const notificationMessage = document.createElement("p");
|
||||
notificationMessage.classList.add("subtitle", "is-6");
|
||||
console.log(error.message)
|
||||
notificationMessage.innerHTML = error.message;
|
||||
|
||||
notificationTitle.appendChild(notificationIcon);
|
||||
|
||||
@@ -6,7 +6,6 @@ export function onInvite(from, contextPath, game_id) {
|
||||
let inviteMsg;
|
||||
let acceptButtonLabel;
|
||||
let declineButtonLabel;
|
||||
console.log(from)
|
||||
if (languageSelector.value === "EN") {
|
||||
inviteTitle = "Invitation from " + from + " !";
|
||||
inviteMsg = from + " invited you to join his game";
|
||||
|
||||
@@ -5,7 +5,6 @@ const contextPath = url.pathname.substring(0, url.pathname.indexOf("/", 1) + 1)
|
||||
const languageSelector = document.getElementById('language-select');
|
||||
const currentPage = document.querySelector('input#current-page');
|
||||
const nbPages = document.querySelector('#nb-pages');
|
||||
console.log("nbPages:" + nbPages.value);
|
||||
let showLabel;
|
||||
if (languageSelector.value === 'EN') {
|
||||
showLabel = 'Show';
|
||||
@@ -64,26 +63,20 @@ function updatePagination(pageNumber) {
|
||||
}
|
||||
|
||||
function updateButtons(oldPageNumber,newPageNumber) {
|
||||
console.log("old: " + oldPageNumber +", new: " + newPageNumber)
|
||||
|
||||
if (oldPageNumber === "1") {
|
||||
console.log("previous - not disable")
|
||||
paginationPrevious.classList.remove('is-disable');
|
||||
}
|
||||
if (newPageNumber === "1") {
|
||||
console.log("previous - disable")
|
||||
paginationPrevious.classList.add('is-disable');
|
||||
}
|
||||
if (oldPageNumber === nbPages.value.toString()) {
|
||||
console.log("next - not disable")
|
||||
paginationNext.classList.remove('is-disable');
|
||||
}
|
||||
if (newPageNumber === nbPages.value.toString()) {
|
||||
console.log("next - disable")
|
||||
paginationNext.classList.add('is-disable');
|
||||
}
|
||||
paginationCurrent.textContent = `${newPageNumber}`;
|
||||
console.log(paginationCurrent)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ function updateUrl(url) {
|
||||
history.replaceState(null, null, url);
|
||||
}
|
||||
let contextPath = window.location.href.substring(0, window.location.href.lastIndexOf("/") + 1);
|
||||
console.log(contextPath);
|
||||
|
||||
// Mettre à jour l'URL initiale au chargement de la page
|
||||
updateUrl(contextPath);
|
||||
|
||||
@@ -15,7 +15,6 @@ const game = document.querySelector('#game-id');
|
||||
const from_id = document.querySelector('#user-id');
|
||||
const from_username = document.querySelector('#user-username');
|
||||
|
||||
console.log(game.value)
|
||||
function updateUsers(users) {
|
||||
const $tbody = document.querySelector('#user-list-modal tbody');
|
||||
$tbody.innerHTML = '';
|
||||
@@ -93,7 +92,6 @@ ws.onMessage("removeUser", (data) => {
|
||||
});
|
||||
ws.onMessage("invite", (data) => {
|
||||
const {from, to, game} = data;
|
||||
console.log("User " + from.username + " invited " + to.username + " to play " + game.name);
|
||||
})
|
||||
ws.onError((error) => console.error(error));
|
||||
ws.onClose(() => console.log("Disconnected from the server"));
|
||||
|
||||
Reference in New Issue
Block a user