From 423cb53e14ff7909622eaa5118c1d78bb454d925 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 9 Jul 2014 12:09:10 +0200 Subject: [PATCH] Use context instead of static access --- js/viewer/viewer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/viewer/viewer.js b/js/viewer/viewer.js index e4519916..de5cef4f 100644 --- a/js/viewer/viewer.js +++ b/js/viewer/viewer.js @@ -46,8 +46,8 @@ var odfViewer = { } }, - onEdit : function(){ - var fileId = OCA.Files.fileActions.currentFile.parent().attr('data-id'); + onEdit : function(fileName, context){ + var fileId = context.$file.attr('data-id'); window.location = OC.linkTo('documents', 'index.php') + '#' + fileId; },