From 1fba8619d407fee3f1a07c6361b7ed7a8e20a35c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 5 Oct 2011 02:36:27 +0200 Subject: move some code to where it belongs and remove duplicated editor app --- apps/files_texteditor/js/editor.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'apps/files_texteditor') 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'); + } +}); -- cgit v1.2.3