summaryrefslogtreecommitdiff
path: root/www/js/jingles.js
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2015-12-16 16:30:37 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2015-12-16 16:30:37 (GMT)
commitecb289de62a82a087df3fea11d4cbed47cb4bedb (patch)
tree67cb725c0fc6c5e3a70dd7c00267f503ad5775cc /www/js/jingles.js
parentce3ccc03ff5485ff2efccfb0f46c58318bf6ed72 (diff)
jingle: clear dom before render
Diffstat (limited to 'www/js/jingles.js')
-rw-r--r--www/js/jingles.js15
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');