diff --git a/capsule-prototype/css/popup.css b/capsule-prototype/css/popup.css index 9c5a4fa2e6e6afdf7883bdb955f4c20fe1a28c2d..444a3bc19782cc5564ad67ffc338e92aeba008e4 100644 --- a/capsule-prototype/css/popup.css +++ b/capsule-prototype/css/popup.css @@ -611,7 +611,7 @@ color: rgba(255,255,255,.75); /*#FFF; */ } -#popupEditSupprimer, #editAnnotationPic, #linkToOriginalImage { +#popupEditSupprimer, #editAnnotationPic, #linkToOriginalImage, #popupEditDownload { font-weight: 400; color: rgba(255,255,255,.75); font-size: 0.6em; @@ -629,7 +629,7 @@ color: rgba(255,255,255,.75); /*#FFF; */ border: 1px solid rgba(255,255,255,.15); } -#popupEditSupprimer:hover { +#popupEditSupprimer:hover, #popupEditDownload:hover { background: rgba(255,255,255,.05); color: #fff } diff --git a/capsule-prototype/js/PopupPanelWidget.js b/capsule-prototype/js/PopupPanelWidget.js index 9da37633b98a6cc717f3d091ebb9942ff4c262ee..1e2424e449cecda5c2160d3967c774e67143c6fa 100644 --- a/capsule-prototype/js/PopupPanelWidget.js +++ b/capsule-prototype/js/PopupPanelWidget.js @@ -866,7 +866,7 @@ PopupPanelWidget.prototype.createPopupContent = function (tag) { else if (type.indexOf("video") > -1) image.attr("src", "../shared/css/images/img-video.png") else if (type.indexOf("msword") > -1) image.attr("src", "../shared/css/images/img-word.png") else if (type.indexOf("link") > -1) image.attr("src", "../shared/css/images/img-link.png") - else $("#popupImg").attr("src", "../shared/css/images/img-document.png"); + else image.attr("src", "../shared/css/images/img-document.png") } image @@ -916,6 +916,14 @@ PopupPanelWidget.prototype.createPopupContent = function (tag) { imageBoxDiv.append(displayOriginalImage); } popupLeftDiv.append(imageBoxDiv); + let downloadElement = $('<a>'); + downloadElement + .html("Download File") + .addClass('popupLeftItem') + .attr('id', 'popupEditDownload') + .attr('href', fileDirectLink) + .attr('download', this.getMetadata('File->File Name')); + popupLeftDiv.append(downloadElement); if (popupPanelWidget.canEdit()) { let deleteElement = $('<div>');