summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2015-09-23 13:09:24 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2015-09-23 13:09:24 (GMT)
commitd1b79c223f072a3d620b66fe76fa28f8f05b805d (patch)
treea2104484e3fc23455ec6bb1b1af68f25d9b50c00
parent6ed66606527e75937a6000af14c7a8d04be089e7 (diff)
jingle: re-fetch after import
-rw-r--r--www/js/jingles.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/www/js/jingles.js b/www/js/jingles.js
index 2dc3b40..599870d 100644
--- a/www/js/jingles.js
+++ b/www/js/jingles.js
@@ -129,11 +129,15 @@ JingleGroup.prototype.fetchCarts = function() {
self.deactivateCart = self.createCartFromXml(cartXml, false);
}, "xml")
).then(function() {
- /*self.mainCart.on('add', function() {
- self.trigger('add');
- });
+ $(self.mainCart).on('add', function() {
+ $(self).trigger('add');
+ });
+
+ $(self.deactivateCart).on('add', function() {
+ $(self).trigger('add');
+ });
- self.mainCart.on('remove', function() {
+ /*self.mainCart.on('remove', function() {
self.trigger('remove');
});*/
@@ -163,6 +167,10 @@ JingleGroup.prototype.createCartFromXml = function(cartXml, active) {
$(self).trigger('remove');
});
+ $(cut).on('add', function() {
+ $(self).trigger('add');
+ });
+
cart.addCut(cut);
});
@@ -370,7 +378,6 @@ Importer.prototype.importAddCut = function(cart, dz, file) {
var data = { COMMAND: 10, LOGIN_NAME: auth_username, PASSWORD: auth_token, CART_NUMBER: cart.number, DESCRIPTION: 'test' };
$.post("/rd-bin/rdxport.cgi", data, null, "xml").done(function(cutXml) {
var cutNumber = $(cutXml).find('cutNumber').text();
- console.log(cutNumber);
dz.on('sending', function(file, xhr, formData) {
formData.append('COMMAND', 2);
formData.append('LOGIN_NAME', auth_username);