diff options
author | Peter Grassberger <petertheone@gmail.com> | 2016-01-31 17:07:57 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2016-01-31 17:07:57 (GMT) |
commit | 59fc2787322aea11bd2a09fc2254ebb26161b729 (patch) | |
tree | f8651ab8b1897c814d8bcdd8dc7029d1ee74c78f | |
parent | e17fe1ce46af9990862f2e5f93064f4a9e4cbfd8 (diff) |
musicgrid: fix no re-render bug, etc.
-rw-r--r-- | www/js/musicgrid.js | 11 | ||||
-rw-r--r-- | www/js/rivendell.js | 2 |
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; - - }; |