Add language settings in UI

This commit is contained in:
grey committed 2022-05-12 21:01:49 +02:00
1 parent c201d6b2e1
commit f3bcf63860
12 files changed
+191 -32

No files matched your search

+13
View File
@@ -50,6 +50,19 @@ $(function () {
jsonview.expand(tree2);
})
$("#applyLang").on("click", function (event) {
const lang = $("#lang").val()
saveOption("/api/ui/v1/lang/set?lang=" + lang, function handleLangSelect(event, xmlHttp) {
const temp = JSON.parse(xmlHttp.responseText)
if(temp.status == "error") {
alert("Request failed reason: " + temp.reason)
} else {
location.reload()
}
console.log(JSON.parse(xmlHttp.responseText))
})
})
$("#addRow").on("click", function (event) {
const tableEntryDom = document.getElementById("tableCopySource").cloneNode(true)
let temp = tableEntryDom.innerHTML