<?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>
});
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);
+ });
+ }
});