summaryrefslogtreecommitdiffstats
path: root/apps/files_textviewer
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-08-20 12:18:56 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-08-20 12:18:56 -0400
commitb05be2f26d9f4d75e22839eb440b9fddaea14eb4 (patch)
tree9f5dc90bab2b603534304ee8ad62aad2490d193c /apps/files_textviewer
parent6afc17be1ab8f8f4d2b54ed4a452b429e9cd48e1 (diff)
downloadnextcloud-server-b05be2f26d9f4d75e22839eb440b9fddaea14eb4.tar.gz
nextcloud-server-b05be2f26d9f4d75e22839eb440b9fddaea14eb4.zip
Fix textviewer in search results
Diffstat (limited to 'apps/files_textviewer')
-rw-r--r--apps/files_textviewer/js/textviewer.js7
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);
});
}
});