Skip to content

Commit

Permalink
[pdf_viewer] fixes owncloud-archive#252
Browse files Browse the repository at this point in the history
Conflicts:
	files_pdfviewer/js/loader.js
  • Loading branch information
DeepDiver1975 committed Dec 27, 2012
1 parent e6fe9d5 commit d82aa63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions files_pdfviewer/js/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ function hidePDFviewer() {
function showPDFviewer(dir,filename){
if(!showPDFviewer.shown){
$("#editor").hide();
var url = fileDownloadPath(dir, filename);
$('#content table').hide();
$("#controls").hide();
var oldcontent = $("#content").html();
var viewer = OC.linkTo('files_pdfviewer','viewer.php')+'?dir='+dir+'&file='+filename;
var viewer = OC.linkTo('files_pdfviewer', 'viewer.php')+'?dir='+encodeURIComponent(dir).replace(/%2F/g, '/')+'&file='+encodeURIComponent(filename);
$("#content").html(oldcontent+'<iframe style="width:100%;height:100%;display:block;" src="'+viewer+'" />');
$("#pageWidthOption").attr("selected","selected");
}
Expand Down
2 changes: 1 addition & 1 deletion files_pdfviewer/js/pdf/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
});


PDFView.open(oc_webroot+"/?app=files&getfile=download.php?file="+window.dir+"/"+window.file, 1.0);
PDFView.open(oc_webroot+"/?app=files&getfile=download.php?file="+encodeURIComponent(window.dir)+"/"+encodeURIComponent(window.file), 1.0);
}, true);

function updateViewarea() {
Expand Down

0 comments on commit d82aa63

Please sign in to comment.