Skip to content

Commit

Permalink
Merge pull request #92 from owncloud/backport-91
Browse files Browse the repository at this point in the history
Backport of #91 - Fix regression introduced by 72069f4
  • Loading branch information
LukasReschke committed Jan 20, 2016
2 parents 72069f4 + 7d56944 commit e94c030
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions css/style.css
@@ -1,4 +1,4 @@
/* force full height on public template */
#body-public #content {
height: 100%;
#body-public .full-height {
height: 100%;
}
5 changes: 4 additions & 1 deletion js/previewplugin.js
Expand Up @@ -28,6 +28,8 @@
$('#pdframe').remove();
if ($('#isPublic').val() && $('#filesApp').val()){
$('#controls').removeClass('hidden');
$('#content').removeClass('full-height');
$('footer').removeClass('hidden');
}

FileList.setViewerMode(false);
Expand All @@ -44,7 +46,7 @@
var self = this;
var $iframe;
var viewer = OC.generateUrl('/apps/files_pdfviewer/?file={file}', {file: downloadUrl});
$iframe = $('<iframe id="pdframe" style="width:100%;height:100%;display:block;position:absolute;top:0;" src="'+viewer+'" sandbox="allow-scripts allow-same-origin allow-popups" />');
$iframe = $('<iframe id="pdframe" style="width:100%;height:100%;display:block;position:absolute;top:0;" src="'+viewer+'" sandbox="allow-scripts allow-same-origin allow-popups allow-modals" />');

if(isFileList === true) {
FileList.setViewerMode(true);
Expand All @@ -54,6 +56,7 @@
// force the preview to adjust its height
$('#preview').append($iframe).css({height: '100%'});
$('body').css({height: '100%'});
$('#content').addClass('full-height');
$('footer').addClass('hidden');
$('#imgframe').addClass('hidden');
$('.directLink').addClass('hidden');
Expand Down

0 comments on commit e94c030

Please sign in to comment.