From 635ffca883938819a11e7e63ddbbc2ceaa2efde0 Mon Sep 17 00:00:00 2001 From: alterdekim Date: Wed, 27 Nov 2024 19:30:47 +0300 Subject: [PATCH] Slowly adding themes x10 --- src/main/resources/messages_en.properties | 3 ++- .../resources/static/javascript/panel-script.js | 14 +++++++++++++- src/main/resources/templates/panel.html | 9 +++++---- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index 384f75d..705f64f 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -71,4 +71,5 @@ edditreq=Send request scrireqq=Script requests acceptbtnreq=Accept themes=Themes -thmsel=Selected \ No newline at end of file +thmsel=Selected +thmdes=Not used \ No newline at end of file diff --git a/src/main/resources/static/javascript/panel-script.js b/src/main/resources/static/javascript/panel-script.js index 073474f..7688a31 100644 --- a/src/main/resources/static/javascript/panel-script.js +++ b/src/main/resources/static/javascript/panel-script.js @@ -282,4 +282,16 @@ function remove_synergy(obj) { $.post("/api/remove_synergy", "synergy_id="+($(obj).attr("data-synergy-id")), function(data, status) { window.location.reload(); }); -} \ No newline at end of file +} + +$(function() { + $(".is-selected-theme").each(function() { + if( $(this).attr("data-selected") == "true" ) { + $(this).html($("#selected_button_texts").attr("data-selected")); + $(this).addClass("btn-success"); + } else { + $(this).html($("#selected_button_texts").attr("data-notselected")); + $(this).addClass("btn-secondary"); + } + }); +}); \ No newline at end of file diff --git a/src/main/resources/templates/panel.html b/src/main/resources/templates/panel.html index 9c2935d..e4242de 100644 --- a/src/main/resources/templates/panel.html +++ b/src/main/resources/templates/panel.html @@ -4,6 +4,7 @@ +
@@ -91,8 +92,8 @@

- - + + @@ -131,8 +132,8 @@

- - + +