-
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] Fix : favorite js #848
[DONE] Fix : favorite js #848
Conversation
…o AymericJak/fix_favorite_js
pod/main/static/js/main.js
Outdated
|
||
// Favorites | ||
|
||
const favoriteButtonManage = document.querySelector("#card-managevideo #fav-button"); |
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.
je ne comprend pas. pourquoi retirer le bouton en js ?
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.
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.
ok en regardant un peu merci de retirer ce code JS. Voici une alternative :
fichier video_edit.html L.166 {% include "videos/link_video.html" with video=form.instance hide_favorite_link=True %}
fichier link_video.html L.6 {% if USE_FAVORITES and not hide_favorite_link %}
Merci de tester et de me dire si c'est ok
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.
vous pouvez rajouter hide_favorite_link=True à tous les appels que vous souhaitez
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.
un peu mieux {% if USE_FAVORITES and not hide_favorite_link is True %}
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.
En modifiant ces 2 lignes :
{% include "videos/link_video.html" with video=form.instance hide_favorite_link=True %}
{% if USE_FAVORITES and not hide_favorite_link is True %}
Le bouton apparait toujours pour les pages de complétion, cut...
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.
Non c'est bon, je sais !
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.
merci de remplacer le JS par une variable d'affichage
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.
ok pour moi
Cannot read properties of null (reading 'addEventListener')