summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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');