Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dariah
search-commons-webresources
Commits
09299f8e
Commit
09299f8e
authored
Jun 18, 2019
by
Gradl, Tobias
Browse files
1312: Implement initial vocabulary browsing mechanism
Task-Url:
https://pm.winseda.de/issues/1312
parent
c49f4681
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/search/search.js
View file @
09299f8e
...
...
@@ -80,3 +80,26 @@ Search.prototype.expandSearch = function(expression) {
this
.
queryHandler
.
expandSearch
(
expression
);
};
Search
.
prototype
.
addFilterTerm
=
function
(
filter
,
type
,
term
)
{
var
filters
=
JSON
.
parse
(
$
(
"
#selected-filters
"
).
val
());
filters
.
push
({
filter
:
filter
,
type
:
type
,
term
:
term
})
$
(
"
#selected-filters
"
).
val
(
JSON
.
stringify
(
filters
));
this
.
queryHandler
.
doSearchDelayed
();
};
Search
.
prototype
.
showMoreFilterTerms
=
function
(
index
)
{
var
i
=
0
;
$
(
"
#search-available-filter-
"
+
index
).
find
(
"
li.hide
"
).
each
(
function
()
{
if
(
i
<
5
)
{
$
(
this
).
removeClass
(
"
hide
"
);
i
++
;
}
});
if
(
$
(
"
#search-available-filter-
"
+
index
).
find
(
"
li.hide
"
).
length
==
0
)
{
$
(
"
#btn-search-available-filter-more-
"
+
index
).
addClass
(
"
hide
"
);
}
};
\ No newline at end of file
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