This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new e72500f Don't use same name for variable as function
e72500f is described below
commit e72500f5c3eec4a0bf4426c8dbbc829cec4d4e04
Author: Sebb <[email protected]>
AuthorDate: Thu Nov 18 15:45:26 2021 +0000
Don't use same name for variable as function
---
webui/js/source/key-commands.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/webui/js/source/key-commands.js b/webui/js/source/key-commands.js
index fa93ce3..ebf5a4f 100644
--- a/webui/js/source/key-commands.js
+++ b/webui/js/source/key-commands.js
@@ -18,13 +18,13 @@
// Generic modal function
function modal(title, msg, type, isHTML) {
- let modal = document.getElementById('modal');
+ let modalId = document.getElementById('modal');
let text = document.getElementById('modal_text');
- if (modal == undefined) {
+ if (modalId == undefined) {
text = new HTML('p', {
id: 'modal_text'
}, "");
- modal = new HTML('div', {
+ modalId = new HTML('div', {
id: 'modal'
}, [
new HTML('div', {
@@ -40,15 +40,15 @@ function modal(title, msg, type, isHTML) {
new HTML('div', {}, text)
])
]);
- document.body.appendChild(modal);
+ document.body.appendChild(modalId);
}
if (type) {
- modal.setAttribute("class", "modal_" + type);
+ modalId.setAttribute("class", "modal_" + type);
} else {
- modal.setAttribute("class", undefined);
+ modalId.setAttribute("class", undefined);
}
- modal.style.display = 'block';
+ modalId.style.display = 'block';
document.getElementById('modal_title').innerText = title;
// If we trust HTML, use it. Otherwise only show as textNode.
if (isHTML) {