some minor changes to the text editor loading
This commit is contained in:
parent
4cc68eac6d
commit
352d73f1e0
|
@ -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){
|
||||||
// End success
|
// End success
|
||||||
}
|
}
|
||||||
// End ajax
|
// End ajax
|
||||||
});
|
);
|
||||||
is_editor_shown = true;
|
is_editor_shown = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue