Skip to content
Snippets Groups Projects
Commit 352d73f1 authored by Robin Appelman's avatar Robin Appelman
Browse files

some minor changes to the text editor loading

parent 4cc68eac
No related branches found
No related tags found
No related merge requests found
...@@ -174,11 +174,10 @@ function giveEditorFocus(){ ...@@ -174,11 +174,10 @@ function giveEditorFocus(){
function showFileEditor(dir,filename){ function showFileEditor(dir,filename){
if(!editorIsShown()){ if(!editorIsShown()){
// Loads the file editor and display it. // Loads the file editor and display it.
var data = $.ajax({ var data = $.getJSON(
url: OC.filePath('files_texteditor','ajax','loadfile.php'), OC.filePath('files_texteditor','ajax','loadfile.php'),
data: 'file='+encodeURIComponent(filename)+'&dir='+encodeURIComponent(dir), {file:filename,dir:dir},
complete: function(data){ function(result){
result = jQuery.parseJSON(data.responseText);
if(result.status == 'success'){ if(result.status == 'success'){
// Save mtime // Save mtime
$('#editor').attr('data-mtime', result.data.mtime); $('#editor').attr('data-mtime', result.data.mtime);
...@@ -208,7 +207,7 @@ function showFileEditor(dir,filename){ ...@@ -208,7 +207,7 @@ function showFileEditor(dir,filename){
// End success // End success
} }
// End ajax // End ajax
}); );
is_editor_shown = true; is_editor_shown = true;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment