Commit 51da10dc authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1175: Fix minor issues of current 3.5 release

Task-Url: https://pm.winseda.de/issues/1175
parent 0f8bdfb4
......@@ -333,8 +333,8 @@ QueryHandler.prototype.processResponse = function(data, isShowMore) {
dataType: "text",
success: function(template) {
_this.processResponseResources(isShowMore, data.resultElements, data.startIndex, data.totalHits, data.took, data.hasMore, template);
/*_this.processResponseTerms();
_this.processResponseSubjects();*/
_this.processResponseTerms();
_this.processResponseSubjects();
_this.processResponseDatasources(data.resultDatasources);
},
error : function() {}
......@@ -426,17 +426,17 @@ QueryHandler.prototype.processResponseDatasources = function(datasources) {
"<div id=\"datasource-aggregation-carousel-" + datasources[i].providerId + "\" class=\"aggregation-carousel carousel slide\" data-ride=\"carousel\">" +
"<ol class=\"carousel-indicators\">" +
"<li data-target=\"#datasource-aggregation-carousel-" + datasources[i].providerId + "\" data-slide-to=\"0\" class=\"active\"></li>" +
/*"<li data-target=\"#datasource-aggregation-carousel-" + datasources[i].providerId + "\" data-slide-to=\"1\"></li>" +*/
"<li data-target=\"#datasource-aggregation-carousel-" + datasources[i].providerId + "\" data-slide-to=\"1\"></li>" +
"</ol>" +
"<div class=\"carousel-inner\" role=\"listbox\">" +
"<div class=\"item active\">" +
"<h5>" + __translator.translate("~eu.dariah.de.minfba.search.search.collections.terms") + "</h5>" +
"<div id=\"datasource-wordcloud-" + datasources[i].providerId + "-Wordcloud\" class=\"wordcloud\" style=\"height: " + this.options.wordcloud.height + "px;\"></div>" +
"</div>" +
/*"<div class=\"item\">" +
"<div class=\"item\">" +
"<h5>" + __translator.translate("~eu.dariah.de.minfba.search.search.collections.subjects") + "</h5>" +
"<div id=\"datasource-wordcloud-" + datasources[i].providerId + "-Subject\" class=\"wordcloud\" style=\"height: " + this.options.wordcloud.height + "px;\"></div>" +
"</div>" +*/
"</div>" +
"</div>" +
"<a class=\"left carousel-control\" href=\"#datasource-aggregation-carousel-" + datasources[i].providerId + "\" role=\"button\" data-slide=\"prev\">" +
"<span class=\"glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span>" +
......@@ -460,7 +460,7 @@ QueryHandler.prototype.processResponseDatasources = function(datasources) {
// Deep clone of the original query
/*var tagQuery = jQuery.extend(true, {}, _this.query);*/
tagQuery.sourceIds = [ datasources[i].providerId ];
tagQuery.tagAggregators = ["Wordcloud"/*, "Subject"*/];
tagQuery.tagAggregators = ["Wordcloud", "Subject"];
tagQuery.size = this.options.wordcloud.tags.size;
if (datasources[i].loadTags) {
......@@ -545,6 +545,7 @@ QueryHandler.prototype.processResponseResources = function(isShowMore, resultEle
$("#search-results-resources-heading").text(String.format(__translator.translate("~eu.dariah.de.minfba.search.view.result.n_of_m_results"), resultElements.length, totalHits));
var explain = $("#explain").prop('checked');
var includeOriginal = $("#includeOriginal").prop('checked');
for (var i=0; i<resultElements.length; i++) {
var content = [];
......@@ -562,14 +563,19 @@ QueryHandler.prototype.processResponseResources = function(isShowMore, resultEle
content.push(["score", ""]);
}
if (resultElements[i].contentHtml!==undefined && resultElements[i].contentHtml!==null) {
content.push(["original", resultElements[i].contentHtml]);
} else {
if (resultElements[i].integrationHtml===undefined || resultElements[i].integrationHtml===null) {
content.push(["snippet", resultElements[i].contentHtml]);
hideElements.push(".original-data-panel");
} else {
content.push(["snippet", resultElements[i].integrationHtml]);
if (includeOriginal && resultElements[i].contentHtml!==undefined && resultElements[i].contentHtml!==null) {
content.push(["original", resultElements[i].contentHtml]);
} else {
hideElements.push(".original-data-panel");
}
}
content.push(["snippet", resultElements[i].integrationHtml]);
if (resultElements[i].explanation != null) {
content.push(["explanation", resultElements[i].explanation]);
} else {
......
Supports Markdown
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