From 8541ad413cc67b77d10032fb98162cb4a3d7c2ed Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Wed, 4 Mar 2020 12:52:12 +0100 Subject: [PATCH] fix not selected card only when needed --- src/js/slaveListing.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index 86c88009eea..9fee57e1768 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -829,7 +829,9 @@ App.UI.SlaveList.penthousePage = function() { slaveWrapper.append(". ", App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Select One", "HG Select"), "major-link"), " ", App.UI.DOM.makeElement("span", "[H]", "hotkey")); slaveWrapper.id = "manageHG"; - slaveWrapper.classList.add("slaveSummary", "card"); + if (V.slavePanelStyle === 2) { + slaveWrapper.classList.add("slaveSummary", "card"); + } } else { slaveWrapper.append("You do not have enough slaves to keep a Head Girl"); slaveWrapper.classList.add("note"); @@ -866,7 +868,9 @@ App.UI.SlaveList.penthousePage = function() { App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Select one", "Recruiter Select"), "major-link"), " ", App.UI.DOM.makeElement("span", "[U]", "hotkey")); slaveWrapper.id = "manageRecruiter"; - slaveWrapper.classList.add("slaveSummary", "card"); + if (V.slavePanelStyle === 2) { + slaveWrapper.classList.add("slaveSummary", "card"); + } } fragment.append(slaveWrapper); @@ -888,7 +892,9 @@ App.UI.SlaveList.penthousePage = function() { App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Select one", "BG Select"), "major-link"), " ", App.UI.DOM.makeElement("span", "[B]", "hotkey")); slaveWrapper.id = "manageBG"; - slaveWrapper.classList.add("slaveSummary", "card"); + if (V.slavePanelStyle === 2) { + slaveWrapper.classList.add("slaveSummary", "card"); + } } fragment.append(slaveWrapper); -- GitLab