Update error text and style
This commit is contained in:
@@ -229,15 +229,11 @@ angular.module('app')
|
||||
if(success) {
|
||||
if(statusTimeout) $timeout.cancel(statusTimeout);
|
||||
statusTimeout = $timeout(function(){
|
||||
this.saveError = false;
|
||||
this.syncTakingTooLong = false;
|
||||
this.showAllChangesSavedStatus();
|
||||
}.bind(this), 200)
|
||||
} else {
|
||||
if(statusTimeout) $timeout.cancel(statusTimeout);
|
||||
statusTimeout = $timeout(function(){
|
||||
this.saveError = true;
|
||||
this.syncTakingTooLong = false;
|
||||
this.showErrorStatus();
|
||||
}.bind(this), 200)
|
||||
}
|
||||
@@ -277,6 +273,9 @@ angular.module('app')
|
||||
}
|
||||
|
||||
this.showAllChangesSavedStatus = function() {
|
||||
this.saveError = false;
|
||||
this.syncTakingTooLong = false;
|
||||
|
||||
var status = "All changes saved";
|
||||
if(authManager.offline()) {
|
||||
status += " (offline)";
|
||||
@@ -285,7 +284,9 @@ angular.module('app')
|
||||
}
|
||||
|
||||
this.showErrorStatus = function() {
|
||||
this.noteStatus = $sce.trustAsHtml("Error syncing<br>(changes saved offline)")
|
||||
this.saveError = true;
|
||||
this.syncTakingTooLong = false;
|
||||
this.noteStatus = $sce.trustAsHtml("<span class='error bold'>Sync Unreachable</span><br>All changes saved offline")
|
||||
}
|
||||
|
||||
this.contentChanged = function() {
|
||||
|
||||
Reference in New Issue
Block a user