From a14d45cbf45c493cb5b634685fd193aeb051a254 Mon Sep 17 00:00:00 2001 From: Patrik Johanson Date: Tue, 15 Sep 2020 19:11:50 +0200 Subject: [PATCH] Show player on play --- .../src/main/webapp/WEB-INF/jsp/playQueue.jsp | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/airsonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp b/airsonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp index e76725db..cab80fb7 100644 --- a/airsonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp +++ b/airsonic-main/src/main/webapp/WEB-INF/jsp/playQueue.jsp @@ -461,6 +461,7 @@ } function onPlay(id) { playQueueService.play(id, playQueueCallback); + showLeftFrame(); } function onPlayShuffle(albumListType, offset, size, genre, decade) { playQueueService.playShuffle(albumListType, offset, size, genre, decade, playQueueCallback); @@ -1010,6 +1011,27 @@ } } + + function showLeftFrame() { + $("#show-left-frame").hide(); + $("#hide-left-frame").show(); + toggleLeftFrame(420); + multiService.setShowSideBar(true); + showSideBar = true; + } + + function toggleLeftFrame(width) { + <%-- Disable animation in Chrome. It stopped working in Chrome 44. --%> + var duration = navigator.userAgent.indexOf("Chrome") != -1 ? 0 : 400; + + $("#dummy-animation-target").stop(); + $("#dummy-animation-target").animate({"max-width": width}, { + step: function (now, fx) { + top.document.getElementById("mainFrameset").cols = now + ",*"; + }, + duration: duration + }); + }