diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/js/rivendell.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/www/js/rivendell.js b/www/js/rivendell.js index 18d28af..1531de2 100644 --- a/www/js/rivendell.js +++ b/www/js/rivendell.js @@ -53,12 +53,14 @@ Rivendell.Rivendell.prototype.removeCut = function(destinationCartNumber, destin Rivendell.Rivendell.prototype.copyCut = function(sourceCartNumber, sourceCutNumber, destinationCartNumber, success) { var self = this; + var returnJqXHR; this.addCut(destinationCartNumber, function(data, textStatus, jqXHR) { var destinationCutNumber = $('cutAdd cut cutNumber', data).text(); - self.copyAudio(sourceCartNumber,sourceCutNumber, destinationCartNumber, destinationCutNumber, success).fail(function() { + returnJqXHR = self.copyAudio(sourceCartNumber,sourceCutNumber, destinationCartNumber, destinationCutNumber, success).fail(function() { self.removeCut(destinationCartNumber, destinationCutNumber, null); }); }); + return returnJqXHR; }; /** @@ -71,9 +73,11 @@ Rivendell.Rivendell.prototype.copyCut = function(sourceCartNumber, sourceCutNumb Rivendell.Rivendell.prototype.moveCut = function(sourceCartNumber, sourceCutNumber, destinationCartNumber, success) { var self = this; + var returnJqXHR; this.copyCut(sourceCartNumber, sourceCutNumber, destinationCartNumber, function(data, textStatus, jqXHR) { - self.removeCut(sourceCartNumber, sourceCutNumber, success); + returnJqXHR = self.removeCut(sourceCartNumber, sourceCutNumber, success); }); + return returnJqXHR; }; Rivendell.Rivendell.prototype.copyAudio = function(sourceCartNumber, sourceCutNumber, |