summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_texteditor/appinfo/app.php2
-rw-r--r--apps/files_texteditor/js/editor.js24
-rw-r--r--files/index.php3
3 files changed, 25 insertions, 4 deletions
diff --git a/apps/files_texteditor/appinfo/app.php b/apps/files_texteditor/appinfo/app.php
index 15d79933a17..1bf09b5da2a 100644
--- a/apps/files_texteditor/appinfo/app.php
+++ b/apps/files_texteditor/appinfo/app.php
@@ -3,4 +3,4 @@
OC_Util::addStyle( 'files_texteditor', 'style' );
OC_Util::addScript( 'files_texteditor', 'editor');
OC_Util::addScript( 'files_texteditor', 'aceeditor/ace');
-?>
+?> \ No newline at end of file
diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js
index f352e191c9d..62a945c6faf 100644
--- a/apps/files_texteditor/js/editor.js
+++ b/apps/files_texteditor/js/editor.js
@@ -102,21 +102,39 @@ function doFileSave(){
$.post(OC.filePath('files_texteditor','ajax','savefile.php'),{ filecontents: filecontents, file: file, dir: dir, force: 'true' },function(jsondata){
if(jsondata.status =='success'){
$('#saving_icon').remove();
+ $('#editor_save').after('<p id="save_result" style="float: left">Saved!</p>')
+ setTimeout(function() {
+ $('#save_result').remove();
+ }, 2000);
}
else {
// Save error
- alert(jsondata.data.message);
+ $('#saving_icon').remove();
+ $('#editor_save').after('<p id="save_result" style="float: left">Failed!</p>');
+ setTimeout(function() {
+ $('#save_result').fadeOut('slow',function(){ $(this).remove(); });
+ }, 2000);
}
}, 'json');
}
else {
// Don't save!
- $('#editor_save').effect("highlight", {color:'#FF5757'}, 1000);
- }
+ $('#saving_icon').remove();
+ // Temporary measure until we get a tick icon
+ $('#editor_save').after('<p id="save_result" style="float: left">Saved!</p>');
+ setTimeout(function() {
+ $('#save_result').fadeOut('slow',function(){ $(this).remove(); });
+ }, 2000);
+ }
}
else if(jsondata.status == 'success'){
// Success
$('#saving_icon').remove();
+ // Temporary measure until we get a tick icon
+ $('#editor_save').after('<p id="save_result" style="float: left">Saved!</p>');
+ setTimeout(function() {
+ $('#save_result').fadeOut('slow',function(){ $(this).remove(); });
+ }, 2000);
}
}, 'json');
giveEditorFocus();
diff --git a/files/index.php b/files/index.php
index aa081d48804..bd37598289a 100644
--- a/files/index.php
+++ b/files/index.php
@@ -29,6 +29,9 @@ require_once('../lib/base.php');
OC_Util::checkLoggedIn();
// Load the files we need
+OC_Util::addStyle( 'files_texteditor', 'style' );
+OC_Util::addScript( 'files_texteditor', 'editor');
+OC_Util::addScript( 'files_texteditor', 'aceeditor/ace');
OC_Util::addStyle( "files", "files" );
OC_Util::addScript( "files", "files" );
OC_Util::addScript( 'files', 'filelist' );