|
|
|
@ -174,11 +174,10 @@ function giveEditorFocus(){ |
|
|
|
|
function showFileEditor(dir,filename){ |
|
|
|
|
if(!editorIsShown()){ |
|
|
|
|
// Loads the file editor and display it.
|
|
|
|
|
var data = $.ajax({ |
|
|
|
|
url: OC.filePath('files_texteditor','ajax','loadfile.php'), |
|
|
|
|
data: 'file='+encodeURIComponent(filename)+'&dir='+encodeURIComponent(dir), |
|
|
|
|
complete: function(data){ |
|
|
|
|
result = jQuery.parseJSON(data.responseText); |
|
|
|
|
var data = $.getJSON( |
|
|
|
|
OC.filePath('files_texteditor','ajax','loadfile.php'), |
|
|
|
|
{file:filename,dir:dir}, |
|
|
|
|
function(result){ |
|
|
|
|
if(result.status == 'success'){ |
|
|
|
|
// Save mtime
|
|
|
|
|
$('#editor').attr('data-mtime', result.data.mtime); |
|
|
|
@ -208,7 +207,7 @@ function showFileEditor(dir,filename){ |
|
|
|
|
// End success
|
|
|
|
|
} |
|
|
|
|
// End ajax
|
|
|
|
|
}); |
|
|
|
|
); |
|
|
|
|
is_editor_shown = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|