[Edit] Persist in a group

Invoke persist calls when leaving Edit mode in a group, instead of
in-order, to allow these revision-checking to be handling for the
group as a whole. WTD-1033.
This commit is contained in:
Victor Woeltjen
2015-03-24 10:01:45 -07:00
parent 2554f4ab01
commit 8f288751db
5 changed files with 25 additions and 26 deletions

View File

@@ -70,14 +70,15 @@ define(
* Save any changes that have been made to this domain object
* (as well as to others that might have been retrieved and
* modified during the editing session)
* @param {boolean} nonrecursive if true, save only this
* object (and not other objects with associated changes)
* @returns {Promise} a promise that will be fulfilled after
* persistence has completed.
*/
save: function () {
return resolvePromise(doMutate())
.then(doPersist)
.then(markClean)
.then(saveOthers);
save: function (nonrecursive) {
return nonrecursive ?
resolvePromise(doMutate()).then(doPersist) :
resolvePromise(cache.saveAll());
},
/**
* Cancel editing; Discard any changes that have been made to