diff options
Diffstat (limited to 'www/js/shows.js')
-rw-r--r-- | www/js/shows.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/www/js/shows.js b/www/js/shows.js index 9cbc72e..b9eb834 100644 --- a/www/js/shows.js +++ b/www/js/shows.js @@ -36,7 +36,6 @@ function shows_init(subpage) { function shows_cleanup() { $('#show-carts tbody').find('tr').remove(); - importer.closeAllUploads(); } Rdxport.ShowListView = function(model, subpage) { @@ -215,7 +214,6 @@ Rdxport.ShowView = function(model) { this.cartViews = []; this.$el = null; - var self = this; this.model.$this.off('update').on('update', function() { self.render(); @@ -242,7 +240,7 @@ Rdxport.ShowView.prototype.render = function() { } } - var $tableBody = $('#app-shows table tbody'); + var $tableBody = $('#app-shows table tbody', this.$el); $('tr', $tableBody).remove(); this.cartViews = []; @@ -251,7 +249,7 @@ Rdxport.ShowView.prototype.render = function() { var cart = self.model.getCartByNumber(log.cartNumber); var upload = importer.getUploadByCartNumber(log.cartNumber); if (upload) { - $('#app-shows table > tbody').append(Rdxport.ShowCartView.renderUploading(upload)); + $('#app-shows table > tbody', self.$el).append(Rdxport.ShowCartView.renderUploading(upload)); if (upload.error) { self.uploadError(upload); } @@ -259,9 +257,9 @@ Rdxport.ShowView.prototype.render = function() { var cartView = new Rdxport.ShowCartView(cart, self); self.cartViews.push(cartView); cartView.render(); - $('#app-shows table > tbody').append(cartView.$el); + $('#app-shows table > tbody', self.$el).append(cartView.$el); } else { - $('#app-shows table > tbody').append(Rdxport.ShowCartView.renderEmpty(self.model, self, log.cartNumber)); + $('#app-shows table > tbody', self.$el).append(Rdxport.ShowCartView.renderEmpty(self.model, self, log.cartNumber)); } }); }; @@ -317,7 +315,6 @@ Rdxport.ShowView.prototype.uploadError = function(upload) { }); var $cart = $('tr[data-upload-id="' + upload.uploadId + '"]', this.$el).first(); - console.log($('tr')); $cart.replaceWith($errorRow); }; |