summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/js/fileactions.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/files/js/fileactions.js b/files/js/fileactions.js
index 5d31af40376..d688973e53c 100644
--- a/files/js/fileactions.js
+++ b/files/js/fileactions.js
@@ -135,14 +135,21 @@ FileActions.register('all','Delete',function(){return OC.imagePath('core','actio
FileActions.register('all','Rename',function(){return OC.imagePath('core','actions/rename')},function(filename){
FileList.rename(filename);
});
-FileActions.register('text','Edit',function(){return OC.imagePath('core','actions/rename')},function(filename){
- window.location='/apps/editor/index.php?file='+filename+'&dir='+$('#dir').val();
-});
-
-//FileActions.setDefault('all','Download');
FileActions.register('dir','Open','',function(filename){
window.location='index.php?dir='+$('#dir').val()+'/'+filename;
});
FileActions.setDefault('dir','Open');
+
+FileActions.register('text','Edit','',function(filename){
+ window.location=OC.linkTo('editor', 'index.php')+'?file='+filename+'&dir='+$('#dir').val();
+});
+
+FileActions.setDefault('text','Edit');
+
+FileActions.register('application/xml','Edit','',function(filename){
+ window.location=OC.linkTo('editor', 'index.php')+'?file='+filename+'&dir='+$('#dir').val();
+});
+
+FileActions.setDefault('application/xml','Edit');