Skip to content

Commit

Permalink
Renamed config.dataTables.bootstrap.js
Browse files Browse the repository at this point in the history
  • Loading branch information
orangejenny committed Dec 11, 2024
1 parent c373361 commit 3fdccf4
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion corehq/apps/fixtures/static/fixtures/js/view-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ hqDefine("fixtures/js/view-table", [
"jquery",
"hqwebapp/js/initial_page_data",
"reports/js/bootstrap3/standard_hq_report",
"reports/js/bootstrap3/config.dataTables.bootstrap",
"reports/js/bootstrap3/datatables_config",
"reports/js/filters/bootstrap3/main",
"datatables.fixedColumns",
], function (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
hqDefine('hqadmin/js/hqadmin_base_report', [
'jquery',
'hqwebapp/js/initial_page_data',
'reports/js/bootstrap3/config.dataTables.bootstrap',
'reports/js/bootstrap3/datatables_config',
], function (
$,
initialPageData,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
+++
@@ -1,4 +1,4 @@
-hqDefine("reports/js/bootstrap3/config.dataTables.bootstrap", [
+hqDefine("reports/js/bootstrap5/config.dataTables.bootstrap", [
-hqDefine("reports/js/bootstrap3/datatables_config", [
+hqDefine("reports/js/bootstrap5/datatables_config", [
'jquery',
'underscore',
'analytix/js/google',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}
);
var table;
- table = hqImport("reports/js/bootstrap3/config.dataTables.bootstrap").HQReportDataTables({
+ table = hqImport("reports/js/bootstrap5/config.dataTables.bootstrap").HQReportDataTables({
- table = hqImport("reports/js/bootstrap3/datatables_config").HQReportDataTables({
+ table = hqImport("reports/js/bootstrap5/datatables_config").HQReportDataTables({
aoColumns: colSorting,
});

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
'jquery',
'underscore',
'hqwebapp/js/initial_page_data',
- 'reports/js/bootstrap3/config.dataTables.bootstrap',
- 'reports/js/bootstrap3/datatables_config',
- 'reports/js/bootstrap3/standard_hq_report',
+ 'reports/js/bootstrap5/config.dataTables.bootstrap',
+ 'reports/js/bootstrap5/datatables_config',
+ 'reports/js/bootstrap5/standard_hq_report',
], function (
$,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
{% block js %}{{ block.super }}
{% compress js %}
<script src="{% static 'hqwebapp/js/select2_knockout_bindings.ko.js' %}"></script>
- <script src="{% static 'reports/js/bootstrap3/config.dataTables.bootstrap.js' %}"></script>
+ <script src="{% static 'reports/js/bootstrap5/config.dataTables.bootstrap.js' %}"></script>
- <script src="{% static 'reports/js/bootstrap3/datatables_config.js' %}"></script>
+ <script src="{% static 'reports/js/bootstrap5/datatables_config.js' %}"></script>
<script src="{% static 'reports/js/datepicker.js' %}"></script>
- <script src="{% static 'reports/js/bootstrap3/hq_report.js' %}"></script>
+ <script src="{% static 'reports/js/bootstrap5/hq_report.js' %}"></script>
Expand Down
2 changes: 1 addition & 1 deletion corehq/apps/reports/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ class GenericTabularReport(GenericReportView):
bad_request_error_text = None
exporting_as_excel = False

# Sets bSort in the datatables instance to true/false (config.dataTables.bootstrap.js)
# Sets bSort in the datatables instance to true/false (datatables_config.js)
sortable = True

# override old class properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
hqDefine("reports/js/bootstrap3/config.dataTables.bootstrap", [
hqDefine("reports/js/bootstrap3/datatables_config", [
'jquery',
'underscore',
'analytix/js/google',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ hqDefine("reports/js/bootstrap3/maps_utils", function () {
}
);
var table;
table = hqImport("reports/js/bootstrap3/config.dataTables.bootstrap").HQReportDataTables({
table = hqImport("reports/js/bootstrap3/datatables_config").HQReportDataTables({
aoColumns: colSorting,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ hqDefine("reports/js/bootstrap3/tabular", [
'jquery',
'underscore',
'hqwebapp/js/initial_page_data',
'reports/js/bootstrap3/config.dataTables.bootstrap',
'reports/js/bootstrap3/datatables_config',
'reports/js/bootstrap3/standard_hq_report',
], function (
$,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
hqDefine("reports/js/bootstrap5/config.dataTables.bootstrap", [
hqDefine("reports/js/bootstrap5/datatables_config", [
'jquery',
'underscore',
'analytix/js/google',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ hqDefine("reports/js/bootstrap5/maps_utils", function () {
}
);
var table;
table = hqImport("reports/js/bootstrap5/config.dataTables.bootstrap").HQReportDataTables({
table = hqImport("reports/js/bootstrap5/datatables_config").HQReportDataTables({
aoColumns: colSorting,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ hqDefine("reports/js/bootstrap5/tabular", [
'jquery',
'underscore',
'hqwebapp/js/initial_page_data',
'reports/js/bootstrap5/config.dataTables.bootstrap',
'reports/js/bootstrap5/datatables_config',
'reports/js/bootstrap5/standard_hq_report',
], function (
$,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% block js %}{{ block.super }}
{% compress js %}
<script src="{% static 'hqwebapp/js/select2_knockout_bindings.ko.js' %}"></script>
<script src="{% static 'reports/js/bootstrap3/config.dataTables.bootstrap.js' %}"></script>
<script src="{% static 'reports/js/bootstrap3/datatables_config.js' %}"></script>
<script src="{% static 'reports/js/datepicker.js' %}"></script>
<script src="{% static 'reports/js/bootstrap3/hq_report.js' %}"></script>
<script src="{% static 'reports/js/util.js' %}"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% block js %}{{ block.super }}
{% compress js %}
<script src="{% static 'hqwebapp/js/select2_knockout_bindings.ko.js' %}"></script>
<script src="{% static 'reports/js/bootstrap5/config.dataTables.bootstrap.js' %}"></script>
<script src="{% static 'reports/js/bootstrap5/datatables_config.js' %}"></script>
<script src="{% static 'reports/js/datepicker.js' %}"></script>
<script src="{% static 'reports/js/bootstrap5/hq_report.js' %}"></script>
<script src="{% static 'reports/js/util.js' %}"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ <h2 id="datatables" class="pt-4">
<p>
In CommCare HQ, we have created a wrapper class around our reporting use of datatables called
<code>GenericTabularReport</code>, which takes care of generating the datatables configuration in
<code>config.dataTables.bootstrap.js</code>. This was done in an effort to reduce the amount of HTML and
<code>datatables_config.js</code>. This was done in an effort to reduce the amount of HTML and
javascript required to create a report, as generating custom reports for projects was once very common in HQ.
With the introduction of User Configurable Reports (UCRs), this need for quickly creating these hard-coded
custom reports has since been eliminated.
Expand All @@ -194,7 +194,7 @@ <h2 id="datatables" class="pt-4">
</p>
<p>
When our reporting tools were created, DataTables was still a fairly young library and had its own set of issues,
which you can see in <code>config.dataTables.bootstrap.js</code> if you examine the strangely named variables in
which you can see in <code>datatables_config.js</code> if you examine the strangely named variables in
still in "hungarian notation" style. Thankfully, the developers of dataTables have kept later versions
backwards-compatible with this older notation, but for reference here is a
<a href="https://datatables.net/upgrade/1.10-convert" target="_blank">conversion guide</a> for the older configuration
Expand All @@ -204,7 +204,7 @@ <h2 id="datatables" class="pt-4">
{# todo future developer: remove with use_bootstrap5 removal cleanup and revisit text above too #}
<strong>Important:</strong> As of the time of this writing, the Bootstrap 3 to 5 migration is still ongoing
and the Reporting section has not yet been migrated. Please ensure that during that migration, the notation in
<code>config.dataTables.bootstrap.js</code> is updated. Thank you.
<code>datatables_config.js</code> is updated. Thank you.
</div>
<h3 id="datatables-simple" class="pt-3">
Simple Example
Expand Down
2 changes: 1 addition & 1 deletion corehq/apps/toggle_ui/static/toggle_ui/js/flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ hqDefine('toggle_ui/js/flags', [
'knockout',
'underscore',
'hqwebapp/js/bootstrap3/alert_user',
'reports/js/bootstrap3/config.dataTables.bootstrap',
'reports/js/bootstrap3/datatables_config',
'hqwebapp/js/components/select_toggle',
'commcarehq',
], function (
Expand Down
2 changes: 1 addition & 1 deletion corehq/apps/userreports/static/userreports/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ hqDefine('userreports/js/base', function () {
}
};

var reportTables = hqImport("reports/js/bootstrap3/config.dataTables.bootstrap").HQReportDataTables({
var reportTables = hqImport("reports/js/bootstrap3/datatables_config").HQReportDataTables({
dataTableElem: '#report_table_' + initialPageData.get('report_slug'),
defaultRows: initialPageData.get('table_default_rows'),
startAtRowNum: initialPageData.get('table_start_at_row'),
Expand Down
2 changes: 1 addition & 1 deletion corehq/apps/userreports/templates/userreports/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% block js %}{{ block.super }}
{% compress js %}
<script src="{% static 'hqwebapp/js/select2_knockout_bindings.ko.js' %}"></script>
<script src="{% static 'reports/js/bootstrap3/config.dataTables.bootstrap.js' %}"></script>
<script src="{% static 'reports/js/bootstrap3/datatables_config.js' %}"></script>
<script src="{% static 'reports_core/js/choice_list_utils.js' %}"></script>
<script src="{% static 'reports_core/js/charts.js' %}"></script>
<script src="{% static 'userreports/js/report_analytix.js' %}"></script>
Expand Down
2 changes: 1 addition & 1 deletion custom/inddex/templates/inddex/partials/report_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<script>
{% if report_table and report_table.datatables %}
$(function() {
var reportTables = hqImport("reports/js/bootstrap3/config.dataTables.bootstrap").HQReportDataTables({
var reportTables = hqImport("reports/js/bootstrap3/datatables_config").HQReportDataTables({
dataTableElem: '#report_table_{{ report_table.slug }}',
defaultRows: {{ report_table.default_rows|default:10 }},
startAtRowNum: {{ report_table.start_at_row|default:0 }},
Expand Down

0 comments on commit 3fdccf4

Please sign in to comment.