summaryrefslogtreecommitdiff
path: root/www/js/importer.js
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2016-03-24 16:58:34 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2016-03-24 16:58:34 (GMT)
commitd67d45412f398b074d3cb2762d98c4139b0ab9bd (patch)
treef2730f75bba2591bf0b6c79624f5c6a03daf37a9 /www/js/importer.js
parent2396977fd57fee58eec84ce0ac6fc91b1b0d1dc9 (diff)
jingles, musicpools: fix renderUploading
Diffstat (limited to 'www/js/importer.js')
-rw-r--r--www/js/importer.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/www/js/importer.js b/www/js/importer.js
index cba7d23..7e190f2 100644
--- a/www/js/importer.js
+++ b/www/js/importer.js
@@ -113,24 +113,28 @@ Rivendell.Importer.prototype.removeUpload = function(upload) {
});
};
-Rivendell.Importer.prototype.getUploadByCartId = function (cartNumber) {
+Rivendell.Importer.prototype.getUploadByCartNumber = function (cartNumber) {
var upload = null;
$.each(this.uploads, function(index, currentUpload){
- if (currentUpload.newCartNumber === cartNumber) {
+ if (currentUpload.cart !== null &&
+ currentUpload.cart.number === cartNumber ) {
upload = currentUpload;
}
});
return upload;
};
-Rivendell.Importer.prototype.hasUploadByCartId = function (cartNumber) {
- var found = false;
- $.each(this.uploads, function(index, currentUpload){
- if (currentUpload.newCartNumber === cartNumber) {
- found = true;
+Rivendell.Importer.prototype.getUploadByCartAndCutNumber = function (cartNumber, cutNumber) {
+ var upload = null;
+ $.each(this.uploads, function(index, currentUpload) {
+ if (currentUpload.cart !== null &&
+ currentUpload.cart.number === cartNumber &&
+ currentUpload.cut !== null &&
+ currentUpload.cut.number === cutNumber) {
+ upload = currentUpload;
}
});
- return found;
+ return upload;
};
Rivendell.Upload = function(group, groupView, createCart, newCartNumber, useMetadata, dropzone) {