extension css and logic updates

This commit is contained in:
Mo Bitar
2017-01-07 13:15:30 -06:00
parent ad678a5d21
commit a4f05b8c31
11 changed files with 225 additions and 70 deletions

View File

@@ -113,11 +113,15 @@ angular.module('app.frontend')
$scope.saveNote = function(note, callback) {
note.setDirty(true);
apiController.sync(function(){
note.hasChanges = false;
if(callback) {
callback(true);
apiController.sync(function(response){
if(response && response.error) {
alert("There was an error saving your note. Please try again.");
callback(false);
} else {
note.hasChanges = false;
if(callback) {
callback(true);
}
}
})
}