summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/js/musicgrid.js11
-rw-r--r--www/js/rivendell.js2
2 files changed, 8 insertions, 5 deletions
diff --git a/www/js/musicgrid.js b/www/js/musicgrid.js
index bd219ff..e751b6c 100644
--- a/www/js/musicgrid.js
+++ b/www/js/musicgrid.js
@@ -87,7 +87,11 @@ Rivendell.MusicgridView.prototype.update = function() {
});
$('tr td:not(.clock)', this.$el).off().on('click', function() {
- musicpoolModal.selectClock($(this).parent().data('dow'), $(this).data('hour'), null);
+ musicpoolModal.selectClock(
+ $(this).parent().data('dow'),
+ $(this).data('hour'),
+ null
+ );
});
};
@@ -106,7 +110,8 @@ Rivendell.MusicpoolModal.prototype.selectClock = function(dow, hour, clockName)
$('tbody', $modalBody).html('');
var self = this;
- $(this.model).on('update', function() {
+ $(this.model).off().on('update', function() {
+ $('tbody tr', $modalBody).remove();
$(self.model.groups).each(function(index, musicpool) {
var $button = null;
if (clockName === musicpool.clock) {
@@ -118,7 +123,7 @@ Rivendell.MusicpoolModal.prototype.selectClock = function(dow, hour, clockName)
$button.on('click', function() {
rivendell.setMusicgrid(dow, hour, musicpool.clock, function() {
$('#musicpoolModal').modal('hide');
- musicgridView.modal.fetch();
+ musicgridView.model.fetch();
});
});
diff --git a/www/js/rivendell.js b/www/js/rivendell.js
index 8566094..1a00f07 100644
--- a/www/js/rivendell.js
+++ b/www/js/rivendell.js
@@ -456,6 +456,4 @@ Rivendell.Cut = function(name, description, cart, length, originDatetime,
}
this.number = this.name.substr(-3);
this.cartNumber = this.cart.number;
-
-
};