Fixed typo. Added translation support.
This commit is contained in:
parent
3886a749fb
commit
3129855cc4
3 changed files with 6 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* ownCloud - Addressbook
|
||||
* ownCloud - Editor
|
||||
*
|
||||
* @author Tom Needham
|
||||
* @copyright 2011 Tom Needham contact@tomneedham.com
|
||||
|
@ -57,8 +57,7 @@ if(isset($_SESSION[$sessionname])){
|
|||
OC_JSON::success();
|
||||
} else {
|
||||
// No force
|
||||
// Show error
|
||||
OC_JSON::faliure();
|
||||
OC_JSON::error(array('data' => array( 'message' => $l10n->t('The file has been edited since you opened it. Overwrite the file?'))));
|
||||
}
|
||||
} else {
|
||||
// No body has edited it whilst you were, so save the file
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* ownCloud - Addressbook
|
||||
* ownCloud - Editor
|
||||
*
|
||||
* @author Tom Needham
|
||||
* @copyright 2011 Tom Needham contact@tomneedham.com
|
||||
|
|
|
@ -24,8 +24,8 @@ $(document).ready(function(){
|
|||
var dir = $('#editor').attr('data-dir');
|
||||
var file = $('#editor').attr('data-file');
|
||||
$.post('ajax/savefile.php',{ filecontents: filecontents, file: file, dir: dir },function(jsondata){
|
||||
if(jsondata.satus == 'failure'){
|
||||
var answer = confirm('The file has been modified after you opened it. Do you want to overwrite the file with your changes?');
|
||||
if(jsondata.status == 'failure'){
|
||||
var answer = confirm(jsondata.data.message);
|
||||
if(answer){
|
||||
$.post('ajax/savefile.php',{ filecontents: filecontents, file: file, dir: dir, force: 'true' },function(jsondata){
|
||||
if(jsondata.status =='success'){
|
||||
|
@ -34,7 +34,7 @@ $(document).ready(function(){
|
|||
}
|
||||
else {
|
||||
// Save error
|
||||
alert('Error saving the file. Please report this!');
|
||||
alert(jsondata.data.message);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue