mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 16:10:23 +00:00
Resolved Merge conflicts, removed previously deleted files
This commit is contained in:
@ -35,6 +35,7 @@ define(
|
||||
function TransactionService($q, dirtyModelCache) {
|
||||
this.$q = $q;
|
||||
this.transaction = false;
|
||||
this.committing = false;
|
||||
this.cache = dirtyModelCache;
|
||||
}
|
||||
|
||||
@ -48,6 +49,10 @@ define(
|
||||
return this.transaction;
|
||||
};
|
||||
|
||||
TransactionService.prototype.isCommitting = function () {
|
||||
return this.committing;
|
||||
};
|
||||
|
||||
/**
|
||||
* All persist calls deferred since the beginning of the transaction
|
||||
* will be committed. Any failures will be reported via a promise
|
||||
@ -58,6 +63,8 @@ define(
|
||||
var self = this;
|
||||
cache = this.cache.get();
|
||||
|
||||
this.committing = true;
|
||||
|
||||
function keyToObject(key) {
|
||||
return cache[key];
|
||||
}
|
||||
@ -72,6 +79,9 @@ define(
|
||||
.map(objectToPromise))
|
||||
.then(function () {
|
||||
self.transaction = false;
|
||||
this.committing = false;
|
||||
}).catch(function() {
|
||||
return this.committing = false;
|
||||
});
|
||||
};
|
||||
|
||||
@ -100,6 +110,7 @@ define(
|
||||
.map(objectToPromise))
|
||||
.then(function () {
|
||||
self.transaction = false;
|
||||
this.committing = false;
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user