summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-05-14 11:22:29 +0200
committerrstular <rok@stular.eu>2020-05-14 11:22:29 +0200
commit3f33799a107bf88aa8378fb641322b9d128fcc71 (patch)
treef6c7af7af41d222ba16dd78164e295067d305124
parentBug fix (diff)
downloadbeziapp-3f33799a107bf88aa8378fb641322b9d128fcc71.tar
beziapp-3f33799a107bf88aa8378fb641322b9d128fcc71.tar.gz
beziapp-3f33799a107bf88aa8378fb641322b9d128fcc71.tar.bz2
beziapp-3f33799a107bf88aa8378fb641322b9d128fcc71.tar.lz
beziapp-3f33799a107bf88aa8378fb641322b9d128fcc71.tar.xz
beziapp-3f33799a107bf88aa8378fb641322b9d128fcc71.tar.zst
beziapp-3f33799a107bf88aa8378fb641322b9d128fcc71.zip
-rw-r--r--js/chats.js2
-rw-r--r--js/messaging.js10
2 files changed, 6 insertions, 6 deletions
diff --git a/js/chats.js b/js/chats.js
index a240cce..3073ac9 100644
--- a/js/chats.js
+++ b/js/chats.js
@@ -344,7 +344,7 @@ async function setRecipient(name = null) {
sogovornik = name;
currentlyChattingWith = directory[name];
- $("#chat-mustSelectRecipient").prop("hidden", true);
+ $("#chat-mustSelectRecipient").hide();
updateSendButton();
clearMessages(); // <-- do when recipient selected
diff --git a/js/messaging.js b/js/messaging.js
index 187df17..44c279e 100644
--- a/js/messaging.js
+++ b/js/messaging.js
@@ -181,7 +181,7 @@ async function loadMsg(id) {
"u": username,
"p": password,
"m": "fetchsporocilo",
- "a": id
+ "a": id.replace("_", "|")
},
dataType: "json",
cache: false,
@@ -224,7 +224,7 @@ async function deleteMsg(id) {
"u": username,
"p": password,
"m": "izbrisisporocilo",
- "a": id
+ "a": id.replace("_", "|")
},
dataType: "json",
cache: false,
@@ -281,9 +281,9 @@ function displayMessage(id, data) {
${datatodecrypt}
</div>
`
- $(`#msg_body-${id}`).html(msgcontent);
+ $(`#msg_body-${id.replace("|", "_")}`).html(msgcontent);
} else {
- $(`#msg_body-${id}`).html(filterXSS(data["telo"]));
+ $(`#msg_body-${id.replace("|", "_")}`).html(filterXSS(data["telo"]));
}
}
@@ -300,7 +300,7 @@ function displayData() {
<span class="card-title">
${filterXSS(element["id"])}
</span>
- <p id="msg_body-${filterXSS(element["id"])}">
+ <p id="msg_body-${filterXSS(element["id"]).replace("|", "_")}">
<button
class="btn waves-effect waves-light"
onclick="loadMsg('${filterXSS(element["id"])}')"