Commit 09299f8e authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1312: Implement initial vocabulary browsing mechanism

Task-Url: https://pm.winseda.de/issues/1312
parent c49f4681
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment