diff --git a/js/documents.js b/js/documents.js index 9c176489..65b0b2dd 100644 --- a/js/documents.js +++ b/js/documents.js @@ -192,21 +192,22 @@ var documentsMain = { } var urlsrc = $('li[data-id='+ documentsMain.fileId +']>a').attr('urlsrc'); - var url = OC.generateUrl('apps/richdocuments/wopi/files/{file_id}?access_token={token}', - {file_id: documentsMain.fileId, token: encodeURIComponent(result.token)}); + var token = encodeURIComponent(result.token); + var url = OC.generateUrl('apps/richdocuments/wopi/files/{file_id}', {file_id: documentsMain.fileId}); documentsMain.url = window.location.protocol + '//' + window.location.host + url; - var viewer = urlsrc + - 'WOPISrc=' + encodeURIComponent(documentsMain.url) + - '&host=' + $('#wopi-url').val() + - '&title=' + title + - '&permission=' + 'view' + - '×tamp=' + '' + - '&closebutton=1'; - - var frame = '