Skip to content

Commit

Permalink
fix #278
Browse files Browse the repository at this point in the history
  • Loading branch information
albertoh committed Sep 21, 2015
1 parent 898f751 commit 5968f04
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions client/src/main/webapp/js/vc.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,15 @@ VirtualCollection.prototype = {
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.attr("title", title + creator);
thumb.data("pid", pid);
this.container.append(thumb);
var policy = $('<div/>', {class: 'policy'});
Expand All @@ -327,10 +328,13 @@ VirtualCollection.prototype = {
}
thumb.append(policy);

thumb.tooltip({
content: title + creator,
position: {my: "left bottom-10", at: "right-100 bottom"}
});
if(showTooltip){
thumb.attr("title", title + creator);
thumb.tooltip({
content: title + creator,
position: {my: "left bottom-10", at: "right-100 bottom"}
});
}
thumb.click(function() {
K5.api.gotoDisplayingItemPage($(this).data('pid'));
});
Expand Down

0 comments on commit 5968f04

Please sign in to comment.