diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-10-05 02:44:24 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-10-05 02:44:24 +0200 |
commit | 15e5bd16ab8e812f0997171431a9d8e050df899e (patch) | |
tree | 85d0c9ad0b66247bccc80e193986a2b6d4c95ecf | |
parent | c6a73bee5e64ede82f8a62bd9457f80a2fd424f6 (diff) | |
download | nextcloud-server-15e5bd16ab8e812f0997171431a9d8e050df899e.tar.gz nextcloud-server-15e5bd16ab8e812f0997171431a9d8e050df899e.zip |
use texteditor for search results
-rw-r--r-- | apps/files_texteditor/appinfo/info.xml | 6 | ||||
-rw-r--r-- | apps/files_texteditor/js/editor.js | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/apps/files_texteditor/appinfo/info.xml b/apps/files_texteditor/appinfo/info.xml index becfd5e35c8..9ed9d207f46 100644 --- a/apps/files_texteditor/appinfo/info.xml +++ b/apps/files_texteditor/appinfo/info.xml @@ -1,10 +1,10 @@ <?xml version="1.0"?> <info> - <id>files_textviewer</id> - <name>Text viewer</name> + <id>files_texteditor</id> + <name>Text Editor</name> <version>0.3</version> <licence>AGPL</licence> - <author>Robin Appelman</author> + <author>Tom Needham</author> <require>2</require> <default_enable/> </info> diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js index 1168ec06a75..4758a5948bd 100644 --- a/apps/files_texteditor/js/editor.js +++ b/apps/files_texteditor/js/editor.js @@ -195,4 +195,15 @@ $(document).ready(function(){ }); FileActions.setDefault('application/xml','Edit'); } + OC.search.customResults.Text=function(row,item){ + var text=item.link.substr(item.link.indexOf('file=')+5); + var a=row.find('a'); + a.data('file',text); + a.attr('href','#'); + a.click(function(){ + var file=text.split('/').pop(); + var dir=text.substr(0,text.length-file.length-1); + showFileEditor(dir,file); + }); + } }); |