-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DONE] edit file js #824
[DONE] edit file js #824
Conversation
Je n'ai pas trouvé l'autre code en redouble et inutile dans les fichiers javascript. Vous pouvez faire une review ? |
pod/chapter/static/js/chapters.js
Outdated
@@ -70,22 +70,18 @@ document.addEventListener("click", (e) => { | |||
form.style.display = "block"; | |||
}); | |||
show_form(""); | |||
document.getElementById("fileModal_id_file")?.remove(); | |||
document.getElementById("fileModal_id_file")?.remove(); // il y a pas id "fileModal_id_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourrais-tu mettre les commentaires en anglais.
span.innerHTML = " " + parseInt(event.target.value).toHHMMSS(); | ||
}); | ||
}); | ||
// il n'y a pas id "id_time_start" et "id_time_end" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourrais-tu mettre les commentaires en anglais.
const formClasses = ["form_new", "form_change", "form_modif", "form_delete"]; | ||
formClasses.forEach((formClass) => { | ||
document.querySelectorAll(`form.${formClass}`).forEach((form) => { | ||
form.style.display = "none"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi, ne pas remettre la condition suivante : if (form)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai pensé il a pas besoin. Mais c'est mieux s'il y a donc je vais modifier
pod/locale/fr/LC_MESSAGES/django.po
Outdated
#: pod/video/templates/videos/add_video.html:87 | ||
#: pod/video/templates/videos/video_edit.html:217 | ||
msgid "Help for form fields" | ||
msgstr "Aide pour les champs de formulaire" | ||
#: pod/video/templates/videos/category_modal.html:16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque un petit saut de ligne :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm après verifier sur mon ordinateur, il y a saut de ligne
pod/main/static/js/infinite.js
Outdated
@@ -1,3 +1,4 @@ | |||
// cette fonction (isFooterInView) n'est pas utilisée ailleurs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourrais-tu mettre les commentaires en anglais.
pod/main/static/js/main.js
Outdated
@@ -1,3 +1,4 @@ | |||
// cette fonction n'est pas utilisée ailleurs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourrais-tu mettre les commentaires en anglais.
pod/main/static/js/main.js
Outdated
@@ -1257,7 +1242,7 @@ var showalert = function (message, alerttype) { | |||
formalertdiv?.remove(); | |||
}, 5000); | |||
}; | |||
|
|||
// cette fonction (show_messages) n'est pas utilisée ailleurs, il n'y a pas id "show_messages" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourrais-tu mettre les commentaires en anglais.
Testé en local, fonctionnel. Vérifie bien les tests unitaires :) |
…/Esup-Pod into nhan/modifie_file_js
Quand j'ajoute un chapitre puis que je le supprime, j'ai l'erreur vous n'êtes plus authentifié (alors que je le suis). |
je corrige et repousse |
ok, ça fonctionne maintenant.
|
|
ok bien vu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
après les différents changements, les modifs me paraissent correctes
.
bonjour,
je trouves quelques fonctions dans file "main/js" qui n'utilise pas ailleurs. Je ne sais pas que je peux les enlever ?