diff options
author | Tom Needham <needham.thomas@gmail.com> | 2011-10-01 22:48:00 +0100 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2011-10-01 22:48:00 +0100 |
commit | 0825073e8cac2a654bbc89b99b5a83cdfee7a836 (patch) | |
tree | 1b53a19b3f2b307351049b3e7aa811f9c0d32664 /files | |
parent | 3c361cec924026314bf39e60904775d8b9636696 (diff) | |
download | nextcloud-server-0825073e8cac2a654bbc89b99b5a83cdfee7a836.tar.gz nextcloud-server-0825073e8cac2a654bbc89b99b5a83cdfee7a836.zip |
Editor now loads on top of files app.
Diffstat (limited to 'files')
-rw-r--r-- | files/appinfo/app.php | 1 | ||||
-rw-r--r-- | files/index.php | 3 | ||||
-rw-r--r-- | files/js/fileactions.js | 4 | ||||
-rw-r--r-- | files/templates/index.php | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/files/appinfo/app.php b/files/appinfo/app.php index e8b2f0c3169..e434296b250 100644 --- a/files/appinfo/app.php +++ b/files/appinfo/app.php @@ -1,5 +1,6 @@ <?php + $l=new OC_L10N('files'); OC_App::register( array( "order" => 2, "id" => "files", "name" => "Files" )); diff --git a/files/index.php b/files/index.php index aa081d48804..67324d4df2c 100644 --- a/files/index.php +++ b/files/index.php @@ -30,9 +30,12 @@ OC_Util::checkLoggedIn(); // Load the files we need OC_Util::addStyle( "files", "files" ); +OC_Util::addStyle( 'files_texteditor', 'style' ); OC_Util::addScript( "files", "files" ); OC_Util::addScript( 'files', 'filelist' ); OC_Util::addScript( 'files', 'fileactions' ); +OC_Util::addScript( 'files_texteditor', 'editor'); +OC_Util::addScript( 'files_texteditor', 'aceeditor/ace'); if(!isset($_SESSION['timezone'])){ OC_Util::addScript( 'files', 'timezone' ); } diff --git a/files/js/fileactions.js b/files/js/fileactions.js index d688973e53c..24e01c34db7 100644 --- a/files/js/fileactions.js +++ b/files/js/fileactions.js @@ -143,13 +143,13 @@ FileActions.register('dir','Open','',function(filename){ FileActions.setDefault('dir','Open'); FileActions.register('text','Edit','',function(filename){ - window.location=OC.linkTo('editor', 'index.php')+'?file='+filename+'&dir='+$('#dir').val(); + showFileEditor($('#dir').val(),filename); }); FileActions.setDefault('text','Edit'); FileActions.register('application/xml','Edit','',function(filename){ - window.location=OC.linkTo('editor', 'index.php')+'?file='+filename+'&dir='+$('#dir').val(); + showFileEditor($('#dir').val(),filename); }); FileActions.setDefault('application/xml','Edit'); diff --git a/files/templates/index.php b/files/templates/index.php index e2e9dc03001..a63f6e62b63 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -50,7 +50,7 @@ if (isset($_['files'])) { <?php echo($_['fileList']); ?> </tbody> </table> - +<div id="editor"></div> <div id="uploadsize-message" title="<?php echo $l->t('Upload too large')?>"> <p> <?php echo $l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.');?> |