refresh button

This commit is contained in:
Mo Bitar
2016-12-29 22:57:46 -06:00
parent 96006e3dca
commit 110dc4e758
9 changed files with 69 additions and 28 deletions

View File

@@ -69,6 +69,16 @@ angular.module('app.frontend')
}
}
this.getLastRefreshDate = function() {
return apiController.lastRefreshDate;
}
this.refreshData = function() {
apiController.refreshItems(function(items){
})
}
this.loginSubmitPressed = function() {
this.loginData.status = "Generating Login Keys...";
$timeout(function(){

View File

@@ -7,6 +7,11 @@ angular.module('app.frontend')
$scope.allTag = new Tag({all: true});
$scope.allTag.content.title = "All";
$scope.tags = modelManager.tags;
$scope.allTag.notes = modelManager.notes;
// setInterval(function () {
// apiController.refreshItems(null);
// }, 1000);
// apiController.verifyEncryptionStatusOfAllItems($scope.defaultUser, function(success){});
}
@@ -28,7 +33,7 @@ angular.module('app.frontend')
*/
$scope.updateAllTag = function() {
$scope.allTag.notes = modelManager.filteredNotes;
// $scope.allTag.notes = modelManager.notes;
}
$scope.tagsWillMakeSelection = function(tag) {
@@ -94,10 +99,7 @@ angular.module('app.frontend')
if(!$scope.selectedTag.all) {
modelManager.addTagToNote($scope.selectedTag, note);
$scope.updateAllTag();
} else {
$scope.selectedTag.notes.unshift(note);
}
}
/*
@@ -108,7 +110,6 @@ angular.module('app.frontend')
modelManager.addDirtyItems(note);
apiController.saveDirtyItems(function(){
modelManager.addNote(note);
note.hasChanges = false;
if(callback) {