diff --git a/public/js/app.js b/public/js/app.js index d3fa0a69..48f1185d 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -135,9 +135,9 @@ function updateLogPlayModalButtonState() { } document.getElementById('logPlayModalSearchInput').addEventListener('keypress', loadLogModalSearchResultsOnEnterPress); - function loadLogModalSearchResultsOnEnterPress(event) { - if (event.key === "Enter") { + // 13=enter, works better to check the key code because the key is named differently on mobile + if (event.keyCode === 13) { searchTmdbWithLogModalSearchInput() } } @@ -197,9 +197,9 @@ function logMovie(context) { } async function showLogPlayModalWithSpecificMovie(tmdbId, movieTitle) { - var myModal = new bootstrap.Modal(document.getElementById('logPlayModal'), { + const myModal = new bootstrap.Modal(document.getElementById('logPlayModal'), { keyboard: false - }) + }); const rating = await fetchRating(tmdbId) setRatingStars('logPlayModal', rating) diff --git a/templates/component/movie-modal-edit-watch-date.html.twig b/templates/component/modal-edit-watch-date.html.twig similarity index 100% rename from templates/component/movie-modal-edit-watch-date.html.twig rename to templates/component/modal-edit-watch-date.html.twig diff --git a/templates/component/modal-log-play.html.twig b/templates/component/modal-log-play.html.twig new file mode 100644 index 00000000..91ddefc4 --- /dev/null +++ b/templates/component/modal-log-play.html.twig @@ -0,0 +1,87 @@ +{% if loggedIn == true %} +
+{% endif %} diff --git a/templates/component/movie-modal-more.html.twig b/templates/component/modal-more-options.html.twig similarity index 100% rename from templates/component/movie-modal-more.html.twig rename to templates/component/modal-more-options.html.twig diff --git a/templates/component/navbar.html.twig b/templates/component/navbar.html.twig index d4bb4022..2b743152 100644 --- a/templates/component/navbar.html.twig +++ b/templates/component/navbar.html.twig @@ -53,90 +53,4 @@ -{% if loggedIn == true %} - -{% endif %} +{{ include('component/modal-log-play.html.twig') }} diff --git a/templates/page/movie.html.twig b/templates/page/movie.html.twig index 498cd2b5..a06e2166 100644 --- a/templates/page/movie.html.twig +++ b/templates/page/movie.html.twig @@ -151,8 +151,8 @@ - {{ include('component/movie-modal-more.html.twig') }} - {{ include('component/movie-modal-edit-watch-date.html.twig') }} + {{ include('component/modal-edit-watch-date.html.twig') }} + {{ include('component/modal-more-options.html.twig') }} {% endif %} {# --- Tagline --- #}