diff options
author | Peter Grassberger <petertheone@gmail.com> | 2015-12-01 22:45:12 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2015-12-01 22:45:12 (GMT) |
commit | 85c27fd442b311effd736928ada879180208c9ae (patch) | |
tree | e69c90040945460caaf1ecd0a67961f6fb6b62a0 | |
parent | 17c7d3a6f0f7c511dfc8c008e7be19d44c883396 (diff) |
jingle: set cut description to filename
-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'); +}; |