summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2015-09-26 23:42:11 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2015-09-26 23:42:11 (GMT)
commit3810342679355ee88b8a4342e48c26c29db2bbb9 (patch)
treec8c87c1fc4dab6150a6b2c5c1c46c15b6bcbf28e /www/js
parentd12757624d1dd870fecc1854a75c95720d680828 (diff)
Rivendell return correct jqXHR
Diffstat (limited to 'www/js')
-rw-r--r--www/js/rivendell.js8
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,