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

@@ -210,7 +210,7 @@ angular.module('app.frontend')
this.note.setDirty(true);
apiController.sync(function(response){
if(!response) {
if(response && response.error) {
this.note.presentation_name = original;
this.url.token = original;
alert("This URL is not available.");

View File

@@ -32,9 +32,11 @@ angular.module('app.frontend')
this.showAccountMenu = !this.showAccountMenu;
this.showFaq = false;
this.showNewPasswordForm = false;
this.showExtensionsMenu = false;
}
this.toggleExtensions = function() {
this.showAccountMenu = false;
this.showExtensionsMenu = !this.showExtensionsMenu;
}
@@ -57,7 +59,13 @@ angular.module('app.frontend')
action.running = true;
extensionManager.executeAction(action, extension, null, function(response){
action.running = false;
apiController.sync(null);
if(response && response.error) {
action.error = true;
alert("There was an error performing this action. Please try again.");
} else {
action.error = false;
apiController.sync(null);
}
})
}
@@ -118,7 +126,7 @@ angular.module('app.frontend')
$timeout(function(){
this.isRefreshing = false;
}.bind(this), 200)
if(!response) {
if(response && response.error) {
alert("There was an error syncing. Please try again. If all else fails, log out and log back in.");
} else {
this.syncUpdated();

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);
}
}
})
}