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 90df0c3 Don't use same name for variable as function
90df0c3 is described below
commit 90df0c3bf522e50e9dde9fca1588722427e5f4ad
Author: Sebb <[email protected]>
AuthorDate: Thu Nov 18 16:50:19 2021 +0000
Don't use same name for variable as function
---
webui/js/source/composer.js | 10 +++++-----
webui/js/source/key-commands.js | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/webui/js/source/composer.js b/webui/js/source/composer.js
index 5d2c477..eda8de4 100644
--- a/webui/js/source/composer.js
+++ b/webui/js/source/composer.js
@@ -127,9 +127,9 @@ function compose_email(replyto, list) {
// Generic modal function
function composer(title, contents) {
- let modal = document.getElementById('composer_modal');
- if (modal == undefined) {
- modal = new HTML('div', {
+ let composer_modal = document.getElementById('composer_modal');
+ if (composer_modal == undefined) {
+ composer_modal = new HTML('div', {
id: 'composer_modal'
}, [
new HTML('div', {
@@ -147,14 +147,14 @@ function composer(title, contents) {
}, contents)
])
]);
- document.body.appendChild(modal);
+ document.body.appendChild(composer_modal);
} else {
document.getElementById('composer_modal_title').innerText = title;
document.getElementById('composer_modal_contents').innerHTML = '';
document.getElementById('composer_modal_contents').inject(contents ||
'');
}
- modal.style.display = 'block';
+ composer_modal.style.display = 'block';
}
// Constructor for email body in replies...
diff --git a/webui/js/source/key-commands.js b/webui/js/source/key-commands.js
index ebf5a4f..b06302a 100644
--- a/webui/js/source/key-commands.js
+++ b/webui/js/source/key-commands.js
@@ -71,9 +71,9 @@ function anyOpen() {
function hideWindows(force_all) {
// First, check if we want to hide a modal
- let modal = document.getElementById('modal');
- if (modal && modal.style.display == 'block') {
- modal.style.display = 'none';
+ let modalId = document.getElementById('modal');
+ if (modalId && modalId.style.display == 'block') {
+ modalId.style.display = 'none';
if (force_all !== true) return;
}