Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
for (var i = 0; i < docs.length; i++) {
var pid = docs[i]["PID"];
var imgsrc = "api/item/" + pid + "/thumb";// + this.thumbHeight;
var thumb = $('<li>', {class: 'thumb'});
thumb.data("metadata", docs[i]["dc.title"]);
var title = docs[i]["dc.title"];
var shortTitle = title;
var creator = "";
var maxLength = 90;
var showTooltip = false;
if (shortTitle.length > maxLength) {
shortTitle = shortTitle.substring(0, maxLength) + "...";
showTooltip = true;
}
if (docs[i]["dc.creator"]) {
creator = '<div class="autor">' + docs[i]["dc.creator"] + '</div>';
}
title = '<div class="title">' + title + '</div>';
thumb.data("pid", pid);
this.container.append(thumb);
var policy = $('<div>', {class: 'policy'});
if (docs[i]['dostupnost']) {
policy.addClass(docs[i]['dostupnost']);
}
thumb.append(policy);
if(showTooltip){
thumb.attr("title", title + creator);
thumb.tooltip({
content: title + creator,
position: {my: "left bottom-10", at: "right-100 bottom"}</div></li>
for (var i = 0; i < docs.length; i++) {
var pid = docs[i]["PID"];
var imgsrc = "api/item/" + pid + "/thumb";// + this.thumbHeight;
var thumb = $('<li>', {class: 'thumb'});
thumb.data("metadata", docs[i]["dc.title"]);
var title = docs[i]["dc.title"];
var shortTitle = title;
var creator = "";
var maxLength = 90;
var showTooltip = false;
if (shortTitle.length > maxLength) {
shortTitle = shortTitle.substring(0, maxLength) + "...";
showTooltip = true;
}
if (docs[i]["dc.creator"]) {
creator = '<div class="autor">' + docs[i]["dc.creator"] + '</div>';
}
title = '<div class="title">' + title + '</div>';
thumb.data("pid", pid);
this.container.append(thumb);
var policy = $('<div>', {class: 'policy'});
if (docs[i]['dostupnost']) {
policy.addClass(docs[i]['dostupnost']);
}
thumb.append(policy);
if(showTooltip){
thumb.attr("title", title + creator);
thumb.tooltip({
content: title + creator,
position: {my: "left bottom-10", at: "right-100 bottom"}
});</div></li>
var thumb = $('<li>', {class: 'thumb'});
thumb.data("metadata", doc["root_title"]);
var title = doc["root_title"];
var dctitle = doc["dc.title"];
var typtitulu = doc["model_path"][0].split("/")[0];
var shortTitle = title;
var creator = "";
var maxLength = 90;
var showToolTip = false;
if (shortTitle.length > maxLength) {
shortTitle = shortTitle.substring(0, maxLength) + "...";
showToolTip = true;
}
shortTitle = '<div class="title">' + shortTitle + '</div>';
if (doc["dc.creator"]) {
creator = '<div class="autor">' + doc["dc.creator"] + '</div>';
}
title = '<div class="title">' + title + '</div>';
if(title !== dctitle){
title = title + '<div class="dctitle">' + dctitle + '</div>';
shortTitle = shortTitle + '<div class="dctitle">' + dctitle + '</div>';
}
var modeltag = '<div class="title">' + K5.i18n.translatable('fedora.model.' + model) + '</div>';
thumb.data("pid", pid);
thumb.data("root_pid", root_pid);
this.container.append(thumb);
var policy = $('<div>', {class: 'policy'});
if (doc['dostupnost']) {
policy.addClass(doc['dostupnost']);
}
thumb.append(policy);
if (showToolTip) {</div></li>
var imgsrc = "api/item/" + pid + "/thumb";
var thumb = $('<li>', {class: 'thumb'});
thumb.data("metadata", doc["root_title"]);
var title = doc["root_title"];
var dctitle = doc["dc.title"];
var typtitulu = doc["model_path"][0].split("/")[0];
var shortTitle = title;
var creator = "";
var maxLength = 90;
var showToolTip = false;
if (shortTitle.length > maxLength) {
shortTitle = shortTitle.substring(0, maxLength) + "...";
showToolTip = true;
}
shortTitle = '<div class="title">' + shortTitle + '</div>';
if (doc["dc.creator"]) {
creator = '<div class="autor">' + doc["dc.creator"] + '</div>';
}
title = '<div class="title">' + title + '</div>';
if(title !== dctitle){
title = title + '<div class="dctitle">' + dctitle + '</div>';
shortTitle = shortTitle + '<div class="dctitle">' + dctitle + '</div>';
}
var modeltag = '<div class="title">' + K5.i18n.translatable('fedora.model.' + model) + '</div>';
thumb.data("pid", pid);
thumb.data("root_pid", root_pid);
this.container.append(thumb);
var policy = $('<div>', {class: 'policy'});
if (doc['dostupnost']) {
policy.addClass(doc['dostupnost']);
}
thumb.append(policy);</div></li>
var imgsrc = "api/item/" + pid + "/thumb";
var thumb = $('<li>', {class: 'thumb'});
thumb.data("metadata", doc["root_title"]);
var title = doc["root_title"];
var dctitle = doc["dc.title"];
var typtitulu = doc["model_path"][0].split("/")[0];
var shortTitle = title;
var creator = "";
var maxLength = 90;
var showToolTip = false;
if (shortTitle.length > maxLength) {
shortTitle = shortTitle.substring(0, maxLength) + "...";
showToolTip = true;
}
shortTitle = '<div class="title">' + shortTitle + '</div>';
if (doc["dc.creator"]) {
creator = '<div class="autor">' + doc["dc.creator"] + '</div>';
}
var titletag = '<div class="title">' + title + '</div>';
if(title !== dctitle){
titletag = titletag + '<div class="dctitle">' + dctitle + '</div>';
shortTitle = shortTitle + '<div class="dctitle">' + dctitle.substring(Math.min(30, dctitle.length)) + '</div>';
}
var modeltag = '<div class="title">' + K5.i18n.translatable('fedora.model.' + model) + '</div>';
thumb.data("pid", pid);
thumb.data("root_pid", root_pid);
this.container.append(thumb);
var policy = $('<div>', {class: 'policy'});
if (doc['dostupnost']) {
policy.addClass(doc['dostupnost']);
}
thumb.append(policy);</div></li>
var thumb = $('<li>', {class: 'thumb'});
thumb.data("metadata", doc["root_title"]);
var title = doc["root_title"];
var dctitle = doc["dc.title"];
var typtitulu = doc["model_path"][0].split("/")[0];
var shortTitle = title;
var creator = "";
var maxLength = 90;
var showToolTip = false;
if (shortTitle.length > maxLength) {
shortTitle = shortTitle.substring(0, maxLength) + "...";
showToolTip = true;
}
shortTitle = '<div class="title">' + shortTitle + '</div>';
if (doc["dc.creator"]) {
creator = '<div class="autor">' + doc["dc.creator"] + '</div>';
}
var titletag = '<div class="title">' + title + '</div>';
if(title !== dctitle){
titletag = titletag + '<div class="dctitle">' + dctitle + '</div>';
shortTitle = shortTitle + '<div class="dctitle">' + dctitle.substring(Math.min(30, dctitle.length)) + '</div>';
}
var modeltag = '<div class="title">' + K5.i18n.translatable('fedora.model.' + model) + '</div>';
thumb.data("pid", pid);
thumb.data("root_pid", root_pid);
this.container.append(thumb);
var policy = $('<div>', {class: 'policy'});
if (doc['dostupnost']) {
policy.addClass(doc['dostupnost']);
}
thumb.append(policy);
if (showToolTip) {</div></li>
var arr = data.response.docs;
for (var i = 0; i < arr.length; i++) {
var doc = arr[i];
var div = $('<li>', {class: 'res policy'});
div.data("pid", doc.PID);
var dcTitle = doc['dc.title'];
if(dcTitle.length === 0){
dcTitle = K5.i18n.translatable("dctitle.none");
}
var title = $('<span class="title">' + dcTitle + '</span>');
title.click(function() {
K5.api.gotoDisplayingItemPage($(this).parent().data("pid"));
});
div.append(title);
if (doc['dc.creator']) {
div.append('<div>' + doc['dc.creator'] + '</div>');
}
if (doc['datum_str']) {
div.append('<div>' + doc['datum_str'] + '</div>');
}
if (doc['dostupnost']) {
div.addClass(doc['dostupnost']);
div.attr("title", doc['dostupnost']);
}
this.titlesList.append(div);
}
//this.resizeResults();
$('.titles .loading').hide();
var nextStart = start + this.rowsPerRequest;
if (data.response.numFound > nextStart) {</li>
this.titlesList.find('.more_docs').remove();
var arr = data.response.docs;
for (var i = 0; i < arr.length; i++) {
var doc = arr[i];
var div = $('<li>', {class: 'res policy'});
div.data("pid", doc.PID);
var dcTitle = doc['dc.title'];
if(dcTitle.length === 0){
dcTitle = K5.i18n.translatable("dctitle.none");
}
var title = $('<span class="title">' + dcTitle + '</span>');
title.click(function() {
K5.api.gotoDisplayingItemPage($(this).parent().data("pid"));
});
div.append(title);
if (doc['dc.creator']) {
div.append('<div>' + doc['dc.creator'] + '</div>');
}
if (doc['datum_str']) {
div.append('<div>' + doc['datum_str'] + '</div>');
}
if (doc['dostupnost']) {
div.addClass(doc['dostupnost']);
div.attr("title", doc['dostupnost']);
}
this.titlesList.append(div);
}
//this.resizeResults();
$('.titles .loading').hide();
var nextStart = start + this.rowsPerRequest;</li>