Commit 1e33f8a0 authored by Alan Mitchell's avatar Alan Mitchell

Merge branch 'essential'

parents 70657caf dad1199b
......@@ -79,6 +79,7 @@ load_report = ->
report_url = "#{ _base_url }organization/#{ $("#select_org").val() }/#{ report_file_name }"
$("#report-content").attr("src", report_url)
$("#print-link").attr("href", report_url) # update link to printable version of report
# ---------------------------------------------------------------
# function that runs when the document is ready.
......@@ -119,3 +120,4 @@ $ ->
$("#select_org").change update_bldg_list
$("#select_org").change update_report_list
$("#select_bldg").change update_report_list
\ No newline at end of file
// Generated by CoffeeScript 1.12.7
(function() {
var _base_url, _bldg_reports, _last_bldg, _last_org, _org_reports, _org_to_bldgs, load_report, update_bldg_list, update_report_list;
var _base_url, _bldg_reports, _org_reports, _org_to_bldgs, load_report, update_bldg_list, update_report_list;
_base_url = "";
......@@ -30,10 +30,6 @@
}
};
_last_bldg = "";
_last_org = "";
update_report_list = function() {
var add_report, bldg, i, j, len, len1, org, ref, ref1, rpt;
org = $("#select_org").val();
......@@ -71,7 +67,8 @@
} else {
report_url = _base_url + "organization/" + ($("#select_org").val()) + "/" + report_file_name;
}
return $("#report-content").attr("src", report_url);
$("#report-content").attr("src", report_url);
return $("#print-link").attr("href", report_url);
};
$(function() {
......
......@@ -109,13 +109,19 @@
</div>
</div>
</div>
<div class="container mt-0 pt-3">
<h2>{% block title %}{% endblock %}</h2>
{% block content %}{% endblock %}
</div>
<div class="container-fluid" mt=3>
{% block fullwidth %}{% endblock %}
</div>
<div class="container mt-0 pt-3">
<hr />
<div class="row">
<div class="col-auto">
......
......@@ -10,12 +10,12 @@
{% block this_nav_link %}link_energy-reports{% endblock %}
{% block title %}Energy Reports{% endblock %}
{% block content %}
<span id="energy-reports-url" style="display:none">{{ energy_reports_url }}</span>
<h2>Energy Reports</h2>
<h5><i>Under Construction: Formatting Improvements in Progress</i></h5>
<hr/>
......@@ -39,10 +39,19 @@
</ul>
</div>
<div class="row mt-3">
<iframe id="report-content" src="" width="100%" height="1000px"></iframe>
</div>
{% endblock %}
{% block fullwidth %}
<div class="row mt-3 mx-2">
<div class="col">
<a id="print-link" href="" class="float-right" target="_blank">
Click Here for Printable Report View
</a>
</div>
</div>
<div class="row mx-2">
<iframe id="report-content" src="" width="100%" height="750px"></iframe>
</div>
{% endblock %}
{% block scripts %}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment