diff --git a/client/src/main/webapp/js/vc.js b/client/src/main/webapp/js/vc.js index bdbd203eb0..26c4d76661 100644 --- a/client/src/main/webapp/js/vc.js +++ b/client/src/main/webapp/js/vc.js @@ -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 = '
' + docs[i]["dc.creator"] + '
'; } title = '
' + title + '
'; - thumb.attr("title", title + creator); thumb.data("pid", pid); this.container.append(thumb); var policy = $('
', {class: 'policy'}); @@ -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')); });