diff options
author | Peter Grassberger <petertheone@gmail.com> | 2015-12-16 16:30:37 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2015-12-16 16:30:37 (GMT) |
commit | ecb289de62a82a087df3fea11d4cbed47cb4bedb (patch) | |
tree | 67cb725c0fc6c5e3a70dd7c00267f503ad5775cc /www/js | |
parent | ce3ccc03ff5485ff2efccfb0f46c58318bf6ed72 (diff) |
jingle: clear dom before render
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/jingles.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/www/js/jingles.js b/www/js/jingles.js index aa982a1..496b7b3 100644 --- a/www/js/jingles.js +++ b/www/js/jingles.js @@ -48,6 +48,7 @@ var JingleGroupList = function() { JingleGroupList.prototype.fetch = function() { this.groups = []; + $('#app-jingles .groups').html(''); var self = this; rivendell.listDropboxes(function(groupsXml, status, req) { @@ -72,15 +73,11 @@ JingleGroupList.prototype.fetch = function() { }); }; -JingleGroupList.prototype.render = function() { - $('#app-jingles .groups').html(''); - $(this.groups).each(function(index, group) { - group.render(); - }); -}; - JingleGroupList.prototype.destroy = function() { // todo: implement + $(this.groups).each(function(index, group) { + group.destroy(); + }); }; var JingleGroup = function(title, groupName, description, lowcart, highcart, normlevel, trimlevel) { @@ -172,6 +169,10 @@ JingleGroup.prototype.renderCarts = function() { } }; +JingleGroup.prototype.destroy = function() { + $('table > tbody', this.$el).html(''); +}; + /*JingleGroup.prototype.addUpload = function() { var $tfoot = $('table > tfoot', this.$el); var $progressBar = $('.progressBarTemplate').clone().removeClass('progressBarTemplate'); |