Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
Project Page
Commits
0a986655
Commit
0a986655
authored
Oct 28, 2021
by
Athanasios
Browse files
Restore search function
parent
763151c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
views/DE/project/pagesList.pug
View file @
0a986655
...
...
@@ -81,20 +81,22 @@ html(lang="de")
var filter = input.value.toUpperCase()
var cardsCol = document.getElementsByClassName("col-sm")
var cardTitle, cardText, titleValue,
textValue
var cardTitle,
cardBadges,
cardText, titleValue,
badgesValue, textValue, allValues;
var i
var counterBlock = 0
for (i = 0; i < cardsCol.length; i++) {
cardTitle = cardsCol[i].getElementsByClassName("card-title-bottom-left");
cardBody = cardsCol[i].getElementsByClassName("card-body");
//cardBody = cardsCol[i].getElementsByClassName("card-body");
cardBadges = [...cardsCol[i].getElementsByClassName("badge-pill")];
cardText = cardsCol[i].getElementsByClassName("card-text");
titleValue = cardTitle[0].textContent || cardTitle[0].innerText;
bodyValue = cardBody[0].textContent || cardBody[0].innerText;
badgesValue = cardBadges.map(b => b.textContent).join(" ");
//bodyValue = cardBody[0].textContent || cardBody[0].innerText;
textValue = cardText[0].textContent || cardText[0].innerText;
if (
titleValue.toUpperCase().indexOf(filter) > -1 || bodyValue.toUpperCase().indexOf(filter) > -1 || textValue.toUpperCase().indexOf(filter) >
-1) {
allValues = [titleValue, badgesValue, textValue].map(v => v.toUpperCase()).join(" ");
if (
allValues.indexOf(filter)!=
-1) {
cardsCol[i].style.display = "block"
counterBlock++
} else {
...
...
views/DE/project/projectList.pug
View file @
0a986655
...
...
@@ -105,20 +105,22 @@ html(lang="de")
var filter = input.value.toUpperCase()
var cardsCol = document.getElementsByClassName("col-sm")
var cardTitle, cardText, titleValue,
textValue
var cardTitle,
cardBadges,
cardText, titleValue,
badgesValue, textValue, allValues;
var i
var counterBlock = 0
for (i = 0; i < cardsCol.length; i++) {
cardTitle = cardsCol[i].getElementsByClassName("card-title-bottom-left");
cardBody = cardsCol[i].getElementsByClassName("card-body");
//cardBody = cardsCol[i].getElementsByClassName("card-body");
cardBadges = [...cardsCol[i].getElementsByClassName("badge-pill")];
cardText = cardsCol[i].getElementsByClassName("card-text");
titleValue = cardTitle[0].textContent || cardTitle[0].innerText;
bodyValue = cardBody[0].textContent || cardBody[0].innerText;
badgesValue = cardBadges.map(b => b.textContent).join(" ");
//bodyValue = cardBody[0].textContent || cardBody[0].innerText;
textValue = cardText[0].textContent || cardText[0].innerText;
if (
titleValue.toUpperCase().indexOf(filter) > -1 || bodyValue.toUpperCase().indexOf(filter) > -1 || textValue.toUpperCase().indexOf(filter) >
-1) {
allValues = [titleValue, badgesValue, textValue].map(v => v.toUpperCase()).join(" ");
if (
allValues.indexOf(filter)!=
-1) {
cardsCol[i].style.display = "block"
counterBlock++
} else {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment