Fix download link included in public share page with hidden download
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>
This commit is contained in:
parent
bb68f4c1de
commit
443c1db3a3
|
@ -136,9 +136,11 @@ OCA.Sharing.PublicApp = {
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue