From 91435d8494b25dee05808f1caea743d529139ee9 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Sun, 24 Jul 2011 19:25:33 +0100 Subject: [PATCH] tiny fix to chunk merging --- server/djrandom/frontend/static/player.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/djrandom/frontend/static/player.js b/server/djrandom/frontend/static/player.js index 68ef523..29fc892 100644 --- a/server/djrandom/frontend/static/player.js +++ b/server/djrandom/frontend/static/player.js @@ -229,10 +229,12 @@ djr.Player.prototype.mergePlaylistChunks = function() { this.playlist = this.playlist.merge(); // Shuffle the HTML data around (so we don't have to necessarily - // fetch it again from the server). - $('.chunk').each(function(idx) { + // fetch it again from the server). This is done in two steps: + // 1) Copy all .chunk_inner data of chunks > 0 in the first one, + // 2) Change the title of #chunk_0. + $('.chunk .chunk_inner').each(function(idx) { if (idx > 0) { - $('#chunk_0').append($(this).html()); + $('#chunk_0 .chunk_inner').append($(this).html()); $(this).remove(); } }); -- GitLab