diff --git a/index.html b/index.html index 8a219124..af6c5fe1 100644 --- a/index.html +++ b/index.html @@ -7820,7 +7820,7 @@ - + diff --git a/modules/dynamic/editors/cultures-editor.js b/modules/dynamic/editors/cultures-editor.js index 613f1328..9b30fb0e 100644 --- a/modules/dynamic/editors/cultures-editor.js +++ b/modules/dynamic/editors/cultures-editor.js @@ -189,7 +189,7 @@ function culturesEditorAddLines() { } lines += /* html */ `
el.on("mouseenter", cultureHighlightOn)); - $body.querySelectorAll("div.cultures").forEach(el => el.on("mouseleave", cultureHighlightOff)); - $body.querySelectorAll("div.states").forEach(el => el.on("click", selectCultureOnLineClick)); - $body.querySelectorAll("fill-box").forEach(el => el.on("click", cultureChangeColor)); - $body.querySelectorAll("div > input.cultureName").forEach(el => el.on("input", cultureChangeName)); - $body.querySelectorAll("div > span.icon-cw").forEach(el => el.on("click", cultureRegenerateName)); - $body.querySelectorAll("div > input.cultureExpan").forEach(el => el.on("input", cultureChangeExpansionism)); - $body.querySelectorAll("div > select.cultureType").forEach(el => el.on("change", cultureChangeType)); - $body.querySelectorAll("div > select.cultureBase").forEach(el => el.on("change", cultureChangeBase)); - $body.querySelectorAll("div > select.cultureEmblems").forEach(el => el.on("change", cultureChangeEmblemsShape)); - $body.querySelectorAll("div > div.culturePopulation").forEach(el => el.on("click", changePopulation)); - $body.querySelectorAll("div > span.icon-arrows-cw").forEach(el => el.on("click", cultureRegenerateBurgs)); - $body.querySelectorAll("div > span.icon-trash-empty").forEach(el => el.on("click", cultureRemovePrompt)); + $body.querySelectorAll(":scope > div").forEach($line => { + $line.on("mouseenter", cultureHighlightOn); + $line.on("mouseleave", cultureHighlightOff); + $line.on("click", selectCultureOnLineClick); + }); + $body.querySelectorAll("fill-box").forEach($el => $el.on("click", cultureChangeColor)); + $body.querySelectorAll("div > input.cultureName").forEach($el => $el.on("input", cultureChangeName)); + $body.querySelectorAll("div > span.icon-cw").forEach($el => $el.on("click", cultureRegenerateName)); + $body.querySelectorAll("div > input.cultureExpan").forEach($el => $el.on("input", cultureChangeExpansionism)); + $body.querySelectorAll("div > select.cultureType").forEach($el => $el.on("change", cultureChangeType)); + $body.querySelectorAll("div > select.cultureBase").forEach($el => $el.on("change", cultureChangeBase)); + $body.querySelectorAll("div > select.cultureEmblems").forEach($el => $el.on("change", cultureChangeEmblemsShape)); + $body.querySelectorAll("div > div.culturePopulation").forEach($el => $el.on("click", changePopulation)); + $body.querySelectorAll("div > span.icon-arrows-cw").forEach($el => $el.on("click", cultureRegenerateBurgs)); + $body.querySelectorAll("div > span.icon-trash-empty").forEach($el => $el.on("click", cultureRemovePrompt)); const $culturesHeader = byId("culturesHeader"); $culturesHeader.querySelector("div[data-sortby='emblems']").style.display = selectShape ? "inline-block" : "none"; diff --git a/modules/dynamic/editors/religions-editor.js b/modules/dynamic/editors/religions-editor.js index 4ebaa6a8..745d1457 100644 --- a/modules/dynamic/editors/religions-editor.js +++ b/modules/dynamic/editors/religions-editor.js @@ -229,9 +229,11 @@ function religionsEditorAddLines() { byId("religionsFooterPopulation").dataset.population = totalPopulation; // add listeners - $body.querySelectorAll("div.religions").forEach(el => el.on("mouseenter", religionHighlightOn)); - $body.querySelectorAll("div.religions").forEach(el => el.on("mouseleave", religionHighlightOff)); - $body.querySelectorAll("div.states").forEach(el => el.on("click", selectReligionOnLineClick)); + $body.querySelectorAll(":scope > div").forEach($line => { + $line.on("mouseenter", religionHighlightOn); + $line.on("mouseleave", religionHighlightOff); + $line.on("click", selectReligionOnLineClick); + }); $body.querySelectorAll("fill-box").forEach(el => el.on("click", religionChangeColor)); $body.querySelectorAll("div > input.religionName").forEach(el => el.on("input", religionChangeName)); $body.querySelectorAll("div > select.religionType").forEach(el => el.on("change", religionChangeType)); diff --git a/modules/dynamic/editors/states-editor.js b/modules/dynamic/editors/states-editor.js index 26a09d17..e203fe59 100644 --- a/modules/dynamic/editors/states-editor.js +++ b/modules/dynamic/editors/states-editor.js @@ -303,10 +303,10 @@ function statesEditorAddLines() { byId("statesFooterPopulation").dataset.population = totalPopulation; // add listeners - $body.querySelectorAll("div.states").forEach(el => { - el.on("click", selectStateOnLineClick); - el.on("mouseenter", stateHighlightOn); - el.on("mouseleave", stateHighlightOff); + $body.querySelectorAll(":scope > div").forEach($line => { + $line.on("mouseenter", stateHighlightOn); + $line.on("mouseleave", stateHighlightOff); + $line.on("click", selectStateOnLineClick); }); if ($body.dataset.type === "percentage") { diff --git a/modules/ui/editors.js b/modules/ui/editors.js index a9f9f60b..079d95ee 100644 --- a/modules/ui/editors.js +++ b/modules/ui/editors.js @@ -1176,18 +1176,18 @@ function refreshAllEditors() { // dynamically loaded editors async function editStates() { if (customization) return; - const Editor = await import("../dynamic/editors/states-editor.js?v=06062022"); + const Editor = await import("../dynamic/editors/states-editor.js?v=08062022"); Editor.open(); } async function editCultures() { if (customization) return; - const Editor = await import("../dynamic/editors/cultures-editor.js?v=06062022"); + const Editor = await import("../dynamic/editors/cultures-editor.js?v=08062022"); Editor.open(); } async function editReligions() { if (customization) return; - const Editor = await import("../dynamic/editors/religions-editor.js?v=08062022"); + const Editor = await import("../dynamic/editors/religions-editor.js?v=080620222"); Editor.open(); } diff --git a/versioning.js b/versioning.js index 5b1fa228..a2c72283 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.86.03"; // generator version, update each time +const version = "1.86.04"; // generator version, update each time { document.title += " v" + version;