From f206bb51776842fa855a5f10c257d776c5bb5bf7 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Thu, 22 Nov 2018 01:35:45 +0200 Subject: [PATCH] Resole auto refresh bug for search --- src/main/resources/static/js/music.js | 8 +++++--- src/main/resources/templates/music.html | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/js/music.js b/src/main/resources/static/js/music.js index 87bda33..34ff078 100644 --- a/src/main/resources/static/js/music.js +++ b/src/main/resources/static/js/music.js @@ -26,9 +26,7 @@ $(document).ready(function () { btn_flush = $('#flush_btn'); btn_add = $('#add_btn'); switchAutoFlow = $("#autoflow"); - $("form").submit(function(e) { - e.preventDefault(); - }); + setInterval("getCurentMusic()", 1000); @@ -512,6 +510,10 @@ function listeners() { }); $('#btn_search').click(search); + $("form").submit(function(e) { + e.preventDefault(); + search(); + }); $('#btn_next').click(function () { sendCommand({command: "NEXT"}); diff --git a/src/main/resources/templates/music.html b/src/main/resources/templates/music.html index b645aca..92ca46b 100644 --- a/src/main/resources/templates/music.html +++ b/src/main/resources/templates/music.html @@ -193,7 +193,7 @@
- +