From fb6132e35be5b5ecc28b29f757231a2ee94175df Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 20 Dec 2021 17:20:47 +0100 Subject: Use ID instead of class for battle dialog. --- play.html | 16 ++++++++-------- ui.js | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/play.html b/play.html index c2e3231..b2f2d68 100644 --- a/play.html +++ b/play.html @@ -164,7 +164,7 @@ body.shift .block.known:hover { position: absolute; } -.battle div.block { +#battle div.block { position: relative; } @@ -244,10 +244,10 @@ div.block { /* BATTLE BOARD */ -.battle { background-color: silver; } -.battle .battle_message { background-color: lightsteelblue; } -.battle .battle_header { background-color: steelblue; color: white; font-weight: bold; } -.battle .battle_separator { background-color: steelblue; } +#battle { background-color: silver; } +#battle_message { background-color: lightsteelblue; } +#battle_header { background-color: steelblue; color: white; font-weight: bold; } +.battle_separator { background-color: steelblue; } .battle_line.enemy .battle_menu_list { min-height: 0; } .battle_reserves > td > div { height: 66px; } @@ -267,9 +267,9 @@ div.block {
- +
- + @@ -285,7 +285,7 @@ div.block { - +
diff --git a/ui.js b/ui.js index b279262..47c3cb7 100644 --- a/ui.js +++ b/ui.js @@ -772,16 +772,16 @@ function on_update() { } if (game.battle) { - document.querySelector(".battle_header").textContent = game.battle.title; - document.querySelector(".battle_message").textContent = game.battle.flash; - document.querySelector(".battle").classList.add("show"); + document.getElementById("battle_header").textContent = game.battle.title; + document.getElementById("battle_message").textContent = game.battle.flash; + document.getElementById("battle").classList.add("show"); update_battle(); } else { - document.querySelector(".battle").classList.remove("show"); + document.getElementById("battle").classList.remove("show"); } } -drag_element_with_mouse(".battle", ".battle_header"); +drag_element_with_mouse("#battle", "#battle_header"); drag_element_with_mouse(".herald", ".herald_header"); scroll_with_middle_mouse("#grid_center", 2); init_map_zoom(); -- cgit v1.2.3