diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-10-05 02:36:27 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-10-05 02:36:54 +0200 |
commit | 1fba8619d407fee3f1a07c6361b7ed7a8e20a35c (patch) | |
tree | 936bcdb2a1c8900f540baa82577c4a7d6d737174 /apps/files_texteditor | |
parent | 813e8b274a66f158f05edd4d69525696aa686661 (diff) | |
download | nextcloud-server-1fba8619d407fee3f1a07c6361b7ed7a8e20a35c.tar.gz nextcloud-server-1fba8619d407fee3f1a07c6361b7ed7a8e20a35c.zip |
move some code to where it belongs and remove duplicated editor app
Diffstat (limited to 'apps/files_texteditor')
-rw-r--r-- | apps/files_texteditor/js/editor.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js index 1eb21b8d9ee..1168ec06a75 100644 --- a/apps/files_texteditor/js/editor.js +++ b/apps/files_texteditor/js/editor.js @@ -183,3 +183,16 @@ $(window).resize(function() { $(document).ready(function() { bindControlEvents(); }); + +$(document).ready(function(){ + if(typeof FileActions!=='undefined'){ + FileActions.register('text','Edit','',function(filename){ + showFileEditor($('#dir').val(),filename); + }); + FileActions.setDefault('text','Edit'); + FileActions.register('application/xml','Edit','',function(filename){ + showFileEditor($('#dir').val(),filename); + }); + FileActions.setDefault('application/xml','Edit'); + } +}); |