The preview element in the public share page was always wrapped with a
link to download the file; now that link is included only if the "Hide
download" option of the share is not enabled.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
scalingup: 0
};
- var imgcontainer = $('<a href="' + $('#previewURL').val()
- + '" target="_blank"><img class="publicpreview" alt=""></a>');
- var img = imgcontainer.find('.publicpreview');
+ var imgcontainer = $('<img class="publicpreview" alt="">');
+ if (hideDownload === 'false') {
+ imgcontainer = $('<a href="' + $('#previewURL').val() + '" target="_blank"></a>').append(imgcontainer);
+ }
+ var img = imgcontainer.hasClass('publicpreview')? imgcontainer: imgcontainer.find('.publicpreview');
img.css({
'max-width': previewWidth,
'max-height': previewHeight