From 773a501e40866ea55e4c7f65a3b8f5a6c89ee4cd Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 17 Apr 2016 18:33:32 +0200 Subject: [PATCH] Hide dups when refreshing playlists --- public/script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/script.js b/public/script.js index a3792ef..d33c9fa 100644 --- a/public/script.js +++ b/public/script.js @@ -68,8 +68,8 @@ var errorSource = document.getElementById('error-template').innerHTML, } document.getElementById('get-playlists').addEventListener('click', function () { - var currentElement = $(this); - currentElement.addClass('loading'); + var button = $(this); + button.addClass('loading'); $.ajax({ url: '/get_playlists', data: { @@ -84,7 +84,8 @@ var errorSource = document.getElementById('error-template').innerHTML, } }); - currentElement.removeClass('loading'); + button.removeClass('loading'); + $('#dups').hide(); playlistsPlaceholder.innerHTML = playlistsTemplate({ playlists: pl