Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-05-11 17:16:42 +0300
committerAndras Timar <andras.timar@collabora.com>2017-05-18 11:10:31 +0300
commitb1e51782fce5209cfb760e84461e51f46e3c849b (patch)
tree62a0297d508d61d9f6561ed172fb0f5ef8cbd1b9 /js
parentff1ee24c4626b58e5212ba542880d39e540cf5d5 (diff)
Bin superfluous returnToDir logic
This was initially introduced in OC so that we know which directory to go after we close the editor but this seems unnecessary here in NC as richdocuments is just an iframe which is removed from DOM when we close the document. (cherry picked from commit a5f6569591f11905c75b7cf978f76be12368ba42) Signed-off-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'js')
-rw-r--r--js/documents.js12
-rw-r--r--js/viewer/viewer.js2
2 files changed, 2 insertions, 12 deletions
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 : '<div id="ocToolbar"><div id="ocToolbarInside"></div><span id="toolbar" class="claro"></span></div>',
- 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 d8eff333..0c5d0572 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,