This commit is contained in:
Mo Bitar
2016-12-30 00:07:13 -06:00
parent 110dc4e758
commit d5d1b2b7f7
6 changed files with 67 additions and 93 deletions

View File

@@ -207,8 +207,9 @@ angular.module('app.frontend')
var original = this.note.presentation_name;
this.note.presentation_name = this.url.token;
modelManager.addDirtyItems([this.note]);
apiController.saveItems([this.note], function(response){
apiController.sync(function(response){
if(!response) {
this.note.presentation_name = original;
this.url.token = original;

View File

@@ -74,9 +74,7 @@ angular.module('app.frontend')
}
this.refreshData = function() {
apiController.refreshItems(function(items){
})
apiController.sync(null);
}
this.loginSubmitPressed = function() {

View File

@@ -9,9 +9,9 @@ angular.module('app.frontend')
$scope.tags = modelManager.tags;
$scope.allTag.notes = modelManager.notes;
// setInterval(function () {
// apiController.refreshItems(null);
// }, 1000);
setInterval(function () {
apiController.sync(null);
}, 1000);
// apiController.verifyEncryptionStatusOfAllItems($scope.defaultUser, function(success){});
}
@@ -51,7 +51,8 @@ angular.module('app.frontend')
}
$scope.tagsSave = function(tag, callback) {
apiController.saveItems([tag], callback);
modelManager.addDirtyItems([tag]);
apiController.sync(callback);
}
/*
@@ -65,7 +66,7 @@ angular.module('app.frontend')
modelManager.addTagToNote(newTag, originalNote);
}
apiController.saveDirtyItems(function(){});
apiController.sync(function(){});
}
/*
@@ -109,7 +110,7 @@ angular.module('app.frontend')
$scope.saveNote = function(note, callback) {
modelManager.addDirtyItems(note);
apiController.saveDirtyItems(function(){
apiController.sync(function(){
note.hasChanges = false;
if(callback) {
@@ -133,7 +134,7 @@ angular.module('app.frontend')
}
apiController.deleteItem(note, function(success){})
apiController.saveDirtyItems(function(){});
apiController.sync(function(){});
}
/*