dont load pdfview for ie

remotes/origin/stable4
Robin Appelman 13 years ago
parent 5f7727629a
commit 36d696c30d
  1. 16
      apps/files_pdfviewer/js/viewer.js

@ -49,13 +49,15 @@ showPDFviewer.lastTitle='';
showPDFviewer.loaded=false; showPDFviewer.loaded=false;
$(document).ready(function(){ $(document).ready(function(){
if(location.href.indexOf("files")!=-1) { if(!$.browser.msie){//doesnt work on IE
PDFJS.workerSrc = OC.filePath('files_pdfviewer','js','pdfjs/build/pdf.js'); if(location.href.indexOf("files")!=-1) {
if(typeof FileActions!=='undefined'){ PDFJS.workerSrc = OC.filePath('files_pdfviewer','js','pdfjs/build/pdf.js');
FileActions.register('application/pdf','Edit','',function(filename){ if(typeof FileActions!=='undefined'){
showPDFviewer($('#dir').val(),filename); FileActions.register('application/pdf','Edit','',function(filename){
}); showPDFviewer($('#dir').val(),filename);
FileActions.setDefault('application/pdf','Edit'); });
FileActions.setDefault('application/pdf','Edit');
}
} }
} }
}); });

Loading…
Cancel
Save