Skip to content

Commit

Permalink
Make chart button clickable even if results are not present
Browse files Browse the repository at this point in the history
  • Loading branch information
nesnoj committed Aug 31, 2023
1 parent 9f6281b commit 3783558
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions digiplan/static/js/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ futureDropdown.addEventListener("change", function() {
PubSub.subscribe(eventTopics.MENU_RESULTS_SELECTED, simulate);
PubSub.subscribe(eventTopics.MENU_RESULTS_SELECTED, showSimulationSpinner);
PubSub.subscribe(eventTopics.SIMULATION_STARTED, checkResultsPeriodically);
PubSub.subscribe(eventTopics.SIMULATION_STARTED, hideResultButtons);
PubSub.subscribe(eventTopics.SIMULATION_FINISHED, showResultButtons);
// PubSub.subscribe(eventTopics.SIMULATION_STARTED, hideResultButtons);
// PubSub.subscribe(eventTopics.SIMULATION_FINISHED, showResultButtons);
PubSub.subscribe(eventTopics.SIMULATION_FINISHED, showResults);
PubSub.subscribe(eventTopics.SIMULATION_FINISHED, hideSimulationSpinner);
PubSub.subscribe(eventTopics.SIMULATION_FINISHED, showResultCharts);
Expand Down Expand Up @@ -124,17 +124,17 @@ function hideSimulationSpinner(msg) {
return logMessage(msg);
}

function showResultButtons(msg) {
chartViewTab.classList.remove("disabled");
futureDropdown.disabled = false;
return logMessage(msg);
}

function hideResultButtons(msg) {
chartViewTab.classList.add("disabled");
futureDropdown.disabled = true;
return logMessage(msg);
}
// function showResultButtons(msg) {
// chartViewTab.classList.remove("disabled");
// futureDropdown.disabled = false;
// return logMessage(msg);
// }
//
// function hideResultButtons(msg) {
// chartViewTab.classList.add("disabled");
// futureDropdown.disabled = true;
// return logMessage(msg);
// }

function showRegionChart(msg, lookup) {
const region_lookup = `${lookup}_region`;
Expand Down

0 comments on commit 3783558

Please sign in to comment.