Skip to content

Commit 8550a44

Browse files
Latest HTML
1 parent 2b14aee commit 8550a44

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

docs/static/js/characterManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ let showCharacterList = async () => {
415415
label.textContent = "Search"
416416
label.classList.add("justifyleft", "settingsmall")
417417
inputContainer.classList.add("justifyleft", "settingsmall")
418-
input.classList.add("settinglabel")
418+
input.classList.add("settinglabel", "fullScreenTextEditExclude")
419419
input.title = "Search"
420420
input.placeholder = "Search"
421421
input.type = "text"

docs/static/js/fullScreenEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let addFullScreenEditorButtons = () => {
2121
];
2222
document.querySelectorAll("input:not([disabled]):not([type='numeric']):not([type='number']):not([type='button']):not([type='range']):not([inputmode='numeric']):not([inputmode='decimal']):not([type='file']):not([type='checkbox']):not([type='color']),textarea:not([disabled]):not([readonly])").forEach(c => {
2323
// Disable for char creator
24-
if (c.closest(".characterCreatorGrid") !== null) {
24+
if (c.closest(".characterCreatorGrid") !== null || c.id === "scenariosearch" || c.classList.contains("fullScreenTextEditExclude")) {
2525
return;
2626
}
2727
if (c.checkVisibility()) {

docs/static/js/newTopMenuButtons.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,30 @@ window.addEventListener('load', () => {
77
</li>`
88
topButton += `<li class="nav-item" id="topbtn_data_manager">
99
<a class="nav-link mainnav" href="#" onclick="closeTopNav(); showCharacterList();" tabindex="0">Data</a>
10+
<a id="topbtn_save_current" class="nav-link mainnav hidden" href="#" tabindex="0" style="position: absolute; margin-top: 10px;">Save</a>
1011
</li>`
1112

1213
document.querySelector("#navbarNavDropdown > ul").innerHTML += topButton;
1314
treeViewer.showOpenButton();
1415
updateLegacySaveButtonState();
16+
17+
let dataElem = document.querySelector("#topbtn_data_manager")
18+
dataElem.addEventListener("mouseenter", () => {
19+
document.querySelector("#topbtn_save_current").classList.remove("hidden")
20+
})
21+
dataElem.addEventListener("mouseleave", () => {
22+
document.querySelector("#topbtn_save_current").classList.add("hidden")
23+
})
24+
25+
document.querySelector("#topbtn_save_current").addEventListener("click", () => {
26+
inputBox("Enter a Filename", "Save File", "", "Input Filename", () => {
27+
let userinput = getInputBoxValue();
28+
if (userinput != null && userinput.trim() != "") {
29+
waitingToast.show()
30+
waitingToast.setText(`Saving data ${userinput}`)
31+
let data = generate_savefile(true, true, true);
32+
saveKLiteSaveToIndexDB(userinput, data);
33+
}
34+
}, false);
35+
})
1536
})

0 commit comments

Comments
 (0)