summaryrefslogtreecommitdiff
path: root/www/js/importer.js
diff options
context:
space:
mode:
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) {