diff --git a/js/documents.js b/js/documents.js index d902d182..f4c5c28e 100644 --- a/js/documents.js +++ b/js/documents.js @@ -72,7 +72,6 @@ var documentsMain = { loadErrorHint : '', renderComplete: false, // false till page is rendered with all required data about the document(s) toolbar : '
', - returnToDir : null, // directory where we started from in the 'Files' app UI : { /* Editor wrapper HTML */ @@ -268,12 +267,8 @@ var documentsMain = { documentsMain.UI.notify(t('richdocuments', 'Failed to revert the document to older version')); } - // generate file id with returnToDir information in it, if any - var fileid = e.currentTarget.parentElement.dataset.fileid.replace(/_.*/, '') + - (documentsMain.returnToDir ? '_' + documentsMain.returnToDir : ''); - // load the file again, it should get reverted now - window.location = OC.generateUrl('apps/richdocuments/index#{fileid}', {fileid: fileid}); + window.location = OC.generateUrl('apps/richdocuments/index#{fileid}', {fileid: e.currentTarget.parentElement.dataset.fileid}); window.location.reload(); documentsMain.overlay.documentOverlay('hide'); } @@ -426,11 +421,6 @@ var documentsMain = { // Does anything indicate that we need to autostart a session? fileId = getURLParameter('fileid').replace(/^\W*/, ''); - if (fileId.indexOf('_') >= 0) { - documentsMain.returnToDir = unescape(fileId.replace(/^[^_]*_/, '')); - fileId = fileId.replace(/_.*/, ''); - } - documentsMain.show(fileId); if (fileId) { diff --git a/js/viewer/viewer.js b/js/viewer/viewer.js index cdf5bc72..f7237749 100644 --- a/js/viewer/viewer.js +++ b/js/viewer/viewer.js @@ -77,7 +77,7 @@ var odfViewer = { ); } else { viewer = OC.generateUrl( - 'apps/richdocuments/index?fileId={fileId}_{dir}&requesttoken={requesttoken}', + 'apps/richdocuments/index?fileId={fileId}&requesttoken={requesttoken}', { fileId: fileId, dir: fileDir,