Skip to content

Commit

Permalink
Different syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
york-stsci committed Aug 28, 2024
1 parent 7ca57e5 commit 552e788
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions jwql/website/apps/jwql/templates/log_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,17 @@ <h4> {{ log_name|safe }} </h4><hr>
const idInputField = document.getElementById('log_select');
var logsList = document.getElementById("logs");
idInputField.addEventListener('input', function () {
if (logsList.options.namedItem(this.value) != null) {
if (logsList.options.namedItem(this.value) !== null) {
document.getElementById("log_submit").disabled = false;
} else {
document.getElementById("log_submit").disabled = true;
}
});

const folderInputField = document.getElementById('log_folder');
var logFoldersList = document.getElementById("log_folders");
folderInputField.addEventListener('input', function () {
if (this.value === "all_logs") {
if (logFoldersList.options.namedItem(this.value) === "all_logs") {
listOfLogNamesByFolder = {{ all_logs['all']|safe }};
} else {
listOfLogNamesByFolder = logsByFolder[this.value];
Expand All @@ -133,8 +134,9 @@ <h4> {{ log_name|safe }} </h4><hr>
});

const dateInputField = document.getElementById('log_date');
var logDatesList = document.getElementById("log_dates");
dateInputField.addEventListener('input', function () {
if (this.value === "all_logs") {
if (logDatesList.options.namedItem(this.value) === "all_logs") {
listOfLogNamesBydate = {{ all_logs['all']|safe }};
} else {
listOfLogNamesBydate = logsByDate[this.value];
Expand All @@ -143,8 +145,9 @@ <h4> {{ log_name|safe }} </h4><hr>
});

const levelInputField = document.getElementById('log_level');
var logLevelsList = document.getElementById('log_levels');
levelInputField.addEventListener('input', function () {
if (this.value === "all_logs") {
if (logLevelsList.options.namedItem(this.value) === "all_logs") {
listOfLogNamesByLevel = {{ all_logs['all']|safe }};
} else {
listOfLogNamesByLevel = logsByLevel[this.value];
Expand Down

0 comments on commit 552e788

Please sign in to comment.