Saving status improvements
This commit is contained in:
@@ -276,6 +276,11 @@ angular.module('app')
|
||||
let note = this.note;
|
||||
note.dummy = false;
|
||||
|
||||
if(note.deleted) {
|
||||
alert("The note you are attempting to edit has been deleted, and is awaiting sync. Changes you make will be disregarded.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!modelManager.findItem(note.uuid)) {
|
||||
alert("The note you are attempting to save can not be found or has been deleted. Changes you make will not be synced. Please copy this note's text and start a new note.");
|
||||
return;
|
||||
@@ -330,7 +335,7 @@ angular.module('app')
|
||||
if(!error) {
|
||||
error = {
|
||||
message: "Sync Unreachable",
|
||||
desc: "All changes saved offline"
|
||||
desc: "Changes saved offline"
|
||||
}
|
||||
}
|
||||
this.saveError = true;
|
||||
|
||||
@@ -296,6 +296,13 @@ angular.module('app')
|
||||
})
|
||||
}
|
||||
|
||||
if(note.deleted) {
|
||||
flags.push({
|
||||
text: "Deletion Pending Sync",
|
||||
class: "danger"
|
||||
})
|
||||
}
|
||||
|
||||
note.flags = flags;
|
||||
|
||||
return flags;
|
||||
|
||||
@@ -75,6 +75,7 @@ class RevisionPreviewModal {
|
||||
var uuid = $scope.uuid;
|
||||
item = modelManager.findItem(uuid);
|
||||
item.content = Object.assign({}, $scope.content);
|
||||
// mapResponseItemsToLocalModels is async, but we don't need to wait here.
|
||||
modelManager.mapResponseItemsToLocalModels([item], SFModelManager.MappingSourceRemoteActionRetrieved);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ class SyncManager extends SFSyncManager {
|
||||
this.$rootScope = $rootScope;
|
||||
this.$compile = $compile;
|
||||
|
||||
// this.loggingEnabled = true;
|
||||
|
||||
// Content types appearing first are always mapped first
|
||||
this.contentTypeLoadPriority = [
|
||||
"SN|UserPreferences", "SN|Privileges",
|
||||
|
||||
Reference in New Issue
Block a user