Changeset 7f36551 in Git for src/main/resources
- Timestamp:
- 02/06/22 22:56:26 (3 years ago)
- Branches:
- main
- Children:
- 3c0f9a9, ad4243e
- Parents:
- 42d565b
- Location:
- src/main/resources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/resources/static/js/sharedScript.js
r42d565b r7f36551 39 39 $(".search-button-title").on("click",function (){ 40 40 let filter = $("#searchTitle").val() 41 console.log(elements) 41 42 for (let item of elements){ 42 let title = item.cells[0].innerText43 let title = $(item).find(".card-title").text() 43 44 if (title.toLowerCase() === filter.toLowerCase()){ 45 console.log("Da") 44 46 $(item).css("display","block") 45 47 } … … 54 56 $(".search-button").on("click",function () { 55 57 let filter = $("#searchGenre").val() 56 for (let item of elements) { 57 let genre = item.cells[4].children; 58 console.log(elements) 59 60 for (let item of elements) { 61 let genre = $(item).find(".card-genre") 58 62 let visible = false; 59 63 60 for ( g of genre) {64 for (let g of genre) { 61 65 62 66 if ($(g).text().toLowerCase() === filter.toLowerCase()) { -
src/main/resources/templates/moviesList.html
r42d565b r7f36551 12 12 <div class="container mb-4"> 13 13 <div class="row" th:each="row: ${movie_rows}" > 14 <div class="col-md-3 " th:each="movie: ${row}" >14 <div class="col-md-3 elements" th:each="movie: ${row}" > 15 15 <div class="card-body card bg-image" th:style="'background:url(' + ${movie.getImageUrl()} + ') no-repeat center #eee;'"> 16 16 <a class="card-text-center" style="color: white" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}" > 17 17 <h3 class="card-title title" th:text="${movie.getTitle()}"></h3> 18 <span th:each="genre: ${movie.getGenres()}" th:text="${genre?.getGenre()?.getGenreType()}" hidden class="card-genre"></span> 19 18 20 </a> 19 21 <h3 class="card-text bottom" th:text="${'Rated '+movie.getImdbRating()}"></h3>
Note:
See TracChangeset
for help on using the changeset viewer.