Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
IAM CMS
toolcompendium
Commits
4840b5e7
Verified
Commit
4840b5e7
authored
Dec 04, 2020
by
Philipp Zschumme
Browse files
Excludes label columns from search
parent
39fede51
Pipeline
#1648
passed with stages
in 12 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/html/toolcompendium.js
View file @
4840b5e7
...
...
@@ -90,16 +90,14 @@ function tableEntriesMatch(searchable, filter_strings) {
if
(
!
table
)
return
false
;
let
result
=
false
;
let
tr
=
table
[
0
].
getElementsByTagName
(
"
tr
"
);
for
(
let
j
=
0
;
j
<
tr
.
length
;
j
++
)
{
let
td_list
=
tr
[
j
].
getElementsByTagName
(
"
td
"
);
for
(
let
k
=
0
;
k
<
td_list
.
length
;
k
++
)
{
let
td
=
td_list
[
k
];
if
(
td
)
{
let
txtValue
=
td
.
textContent
||
td
.
innerText
;
if
(
matchFilters
(
txtValue
,
filter_strings
))
{
result
=
true
;
}
let
tableRow
=
table
[
0
].
getElementsByTagName
(
"
tr
"
);
for
(
let
i
=
0
;
i
<
tableRow
.
length
;
i
++
)
{
let
columns
=
tableRow
[
i
].
getElementsByTagName
(
"
td
"
);
let
relevantColumn
=
columns
[
1
];
// only include the second column which holds actual information
if
(
relevantColumn
)
{
let
columnContent
=
relevantColumn
.
textContent
||
relevantColumn
.
innerText
;
if
(
matchFilters
(
columnContent
,
filter_strings
))
{
result
=
true
;
}
}
}
...
...
Write
Preview
Supports
Markdown
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