From a27950d617beff2a23cdb2550f2e686ce85f0465 Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Thu, 7 Apr 2016 17:53:15 -0400 Subject: [PATCH] Post WOPI url iframe --- js/documents.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) 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 = '