diff --git a/cara/apps/calculator/report_generator.py b/cara/apps/calculator/report_generator.py index 95fb9c91..7b7d6949 100644 --- a/cara/apps/calculator/report_generator.py +++ b/cara/apps/calculator/report_generator.py @@ -110,7 +110,7 @@ def concentrations_with_sr_breathing(model: models.ExposureModel, times: typing. lower_concentrations = [] for time in times: for index, (start, stop) in enumerate(short_range_intervals): - # For visualization issues, add short range breathing activity to the initial long range concentrations + # For visualization issues, add short-range breathing activity to the initial long range concentrations if start <= time <= stop and short_range_activities[index] == 'Breathing': lower_concentrations.append(np.array(model.concentration(float(time))).mean()) break diff --git a/cara/apps/calculator/static/js/form.js b/cara/apps/calculator/static/js/form.js index 052c957e..2226554c 100644 --- a/cara/apps/calculator/static/js/form.js +++ b/cara/apps/calculator/static/js/form.js @@ -403,7 +403,7 @@ function validate_form(form) { } } - // Generate the short range interactions list + // Generate the short-range interactions list var short_range_interactions = []; $(".form_field_outer_row").each(function (index, element){ let obj = {}; @@ -598,7 +598,7 @@ function validate_sr_time(obj) { return overlapped_times(obj, start_time, finish_time); }; -// Check if short range durations are filled, and if there is no repetitions +// Check if short-range durations are filled, and if there is no repetitions function validate_sr_parameter(obj, error_message) { if ($(obj).val() == "" || $(obj).val() == null) { if (!$(obj).hasClass("red_border") && !$(obj).prop("disabled")) { @@ -651,7 +651,7 @@ $(document).ready(function () { elemObj.checked = (value==1); } - // Read short range from URL + // Read short-range from URL else if (name == 'short_range_interactions') { let index = 1; for (const interaction of JSON.parse(value)) { @@ -911,7 +911,7 @@ $(document).ready(function () { }); }); - //Edit short range activity type + //Edit short-range activity type $("body").on("click", ".edit_node_btn_frm_field", function() { $(this).hide(); let id = $(this).attr('id').split('_').slice(-1)[0]; @@ -921,7 +921,7 @@ $(document).ready(function () { document.getElementById('validate_row_no_' + String(id)).style.cssText = 'display:inline !important'; }) - //Remove short range interaction (modal field row). + //Remove short-range interaction (modal field row). $("body").on("click", ".remove_node_btn_frm_field", function() { $(this).closest(".form_field_outer_row").remove(); // On delete, check open/unvalidated rows. @@ -932,7 +932,7 @@ $(document).ready(function () { }); }); - //Short range modal - close and save button + //Short-range modal - close and save button $("body").on("click", ".close_btn_frm_field", function() { $(".validate_node_btn_frm_field").click(); if ($(".form_field_outer").find(".form_field_outer_row.row_validated").length == $(".form_field_outer").find(".form_field_outer_row").length) { @@ -942,7 +942,7 @@ $(document).ready(function () { } }); - //Short range modal - reset button + //Short-range modal - reset button $("body").on("click", ".dismiss_btn_frm_field", function() { $(".form_field_outer_row").remove(); $("#sr_interactions").text(0); diff --git a/cara/apps/calculator/static/js/report.js b/cara/apps/calculator/static/js/report.js index b6b81662..5ad8375b 100644 --- a/cara/apps/calculator/static/js/report.js +++ b/cara/apps/calculator/static/js/report.js @@ -1,7 +1,7 @@ /* Generate the concentration plot using d3 library. */ function draw_plot(svg_id) { - // Used for controlling the short range interactions + // Used for controlling the short-range interactions let button_full_exposure = document.getElementById("button_full_exposure"); let button_hide_high_concentration = document.getElementById("button_hide_high_concentration"); let long_range_checkbox = document.getElementById('long_range_cumulative_checkbox') @@ -117,7 +117,7 @@ function draw_plot(svg_id) { var legendShortRangeText = {}; sr_unique_activities.forEach((b, index) => { legendShortRangeText[index] = vis.append('text') - .text('Short range - ' + sr_unique_activities[index]) + .text('Short-range - ' + sr_unique_activities[index]) .style('font-size', '15px') .attr('alignment-baseline', 'central'); }); @@ -179,7 +179,7 @@ function draw_plot(svg_id) { .attr('fill-opacity', '0.1'); }); - // Area representing the short range interaction(s). + // Area representing the short-range interaction(s). var shortRangeArea = {}; var drawShortRangeArea = {}; short_range_intervals.forEach((b, index) => { @@ -273,7 +273,7 @@ function draw_plot(svg_id) { }))); }); - // Short Range Area. + // Short-Range Area. short_range_intervals.forEach((b, index) => { shortRangeArea[index].x(d => xTimeRange(d.time)) .y0(graph_height - 50) @@ -510,7 +510,7 @@ function draw_alternative_scenarios_plot(concentration_plot_svg_id, alternative_ // D3 array of ten categorical colors represented as RGB hexadecimal strings. var colors = d3.schemeAccent; - // Used for controlling the short range interactions + // Used for controlling the short-range interactions let button_full_exposure = document.getElementById("button_alternative_full_exposure"); let button_hide_high_concentration = document.getElementById("button_alternative_hide_high_concentration"); diff --git a/cara/apps/templates/base/calculator.form.html.j2 b/cara/apps/templates/base/calculator.form.html.j2 index 6adb947e..3a84eb74 100644 --- a/cara/apps/templates/base/calculator.form.html.j2 +++ b/cara/apps/templates/base/calculator.form.html.j2 @@ -366,7 +366,7 @@
-
Short range interactions (without masks):
+
Short-range interactions (without masks):
@@ -374,12 +374,12 @@
-

The use of masks mitigates exposure at short-range. The analytical model with short range interactions does not take mask wearing into account.

+

The use of masks mitigates exposure at short-range. The analytical model with short-range interactions does not take mask wearing into account.

-

0 short range interactions.

+

0 short-range interactions.

@@ -387,7 +387,7 @@