diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/jingles.js | 3 | ||||
-rw-r--r-- | www/js/rivendell.rh.js | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/www/js/jingles.js b/www/js/jingles.js index 13df2bf..6a1f114 100644 --- a/www/js/jingles.js +++ b/www/js/jingles.js @@ -450,9 +450,8 @@ Importer.prototype.importFileUploadError = function(dz, file, msg, xhr) { }; Importer.prototype.importAddCut = function(dz, file) { - // todo: set additional parameters like DESCRIPTION here, when patch has been applied. var cart = this.currentGroup.mainCart; - rivendell.addCut(cart.number, function(cutXml) { + rivendell.addCut(cart.number, file.name, function(cutXml) { var cutNumber = $(cutXml).find('cutNumber').text(); dz.on('sending', function(file, xhr, formData) { formData.append('COMMAND', 2); diff --git a/www/js/rivendell.rh.js b/www/js/rivendell.rh.js index 04897b0..72cdf9f 100644 --- a/www/js/rivendell.rh.js +++ b/www/js/rivendell.rh.js @@ -33,3 +33,14 @@ Rivendell.Rivendell.prototype.listDropboxes = function(success) { }; return $.post(this.listDropboxesEndpoint, command, success, 'xml'); }; + +Rivendell.Rivendell.prototype.addCut = function(cartNumber, filename, success) { + var command = { + COMMAND: 10, + LOGIN_NAME: this.username, + PASSWORD: this.token, + CART_NUMBER: cartNumber, + DESCRIPTION: filename + }; + return $.post(this.rdxportEndpoint, command, success, 'xml'); +}; |