summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-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);