From 8e56d58ff728faf79bbeaaeaa1927b3ae93c90aa Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Thu, 23 Jun 2016 13:25:44 +0530 Subject: [PATCH] bccu#1882: Return to where user started by removing redundant call Route /close/ doesn't mean anything, and we were making this additional call always before closing the document. This had a side-effect that sometimes /close/ call would be processed after we assign returnToDir to window.location making browser always stuck in richdocuments#index rather than reeturnToDir. This was mainly the problem in firefox with owncloud9 --- js/documents.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/js/documents.js b/js/documents.js index 0139c2c1..d5552207 100644 --- a/js/documents.js +++ b/js/documents.js @@ -591,14 +591,6 @@ var documentsMain = { ); }, - closeDocument: function() { - var url = OC.generateUrl('apps/richdocuments/close/{file_id}', {file_id: documentsMain.fileId}); - $.post( - url, - { basename : documentsMain.baseName } - ); - }, - renameDocument: function(name) { var url = OC.generateUrl('apps/richdocuments/ajax/documents/rename/{file_id}', {file_id: documentsMain.fileId}); $.post( @@ -648,7 +640,6 @@ var documentsMain = { $('footer,nav').show(); documentsMain.UI.hideEditor(); - documentsMain.closeDocument(); $('#ocToolbar').remove(); if (documentsMain.returnToDir) {