Resolved Merge conflicts, removed previously deleted files

This commit is contained in:
Henry
2016-05-12 16:05:27 -07:00
parent bd686790dc
commit cf9eb3f602
27 changed files with 28 additions and 1664 deletions

View File

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