diff options
-rw-r--r-- | apps/files_textviewer/js/textviewer.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files_textviewer/js/textviewer.js b/apps/files_textviewer/js/textviewer.js index b1a564df9bb..143c97c9d47 100644 --- a/apps/files_textviewer/js/textviewer.js +++ b/apps/files_textviewer/js/textviewer.js @@ -122,10 +122,9 @@ $(document).ready(function() { a.data('file',text); a.attr('href','#'); a.click(function(){ - var file=$(this).data('file'); - var text=file.split('/').pop(); - var dir=file.substr(0,file.length-file.length-1); - TextViewer.showText(dir,text); + var file=text.split('/').pop(); + var dir=text.substr(0,text.length-file.length-1); + TextViewer.showText(dir,file); }); } }); |