-
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Bootstrap 5 Migration - Rebuilt diffs"
- Loading branch information
Showing
3 changed files
with
938 additions
and
54 deletions.
There are no files selected for viewing
92 changes: 76 additions & 16 deletions
92
corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/reports/js/base.js.diff.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,83 @@ | ||
--- | ||
+++ | ||
@@ -1,8 +1,8 @@ | ||
@@ -1,45 +1,41 @@ | ||
-hqDefine("reports/js/bootstrap3/base", [ | ||
+hqDefine("reports/js/bootstrap5/base", [ | ||
'jquery', | ||
'hqwebapp/js/initial_page_data', | ||
- 'jquery', | ||
- 'hqwebapp/js/initial_page_data', | ||
- 'reports/js/filters/bootstrap3/main', | ||
- 'reports/js/bootstrap3/report_config_models', | ||
+ 'reports/js/filters/bootstrap5/main', | ||
+ 'reports/js/bootstrap5/report_config_models', | ||
'reports/js/bootstrap3/tabular', | ||
'commcarehq', | ||
], function ( | ||
@@ -36,7 +36,7 @@ | ||
reportConfigsView.setConfigBeingViewed(reportConfigModels.reportConfig(defaultConfig)); | ||
} | ||
- 'reports/js/bootstrap3/tabular', | ||
- 'commcarehq', | ||
-], function ( | ||
- $, | ||
- initialPageData, | ||
- filtersMain, | ||
- reportConfigModels | ||
-) { | ||
- $(function () { | ||
- filtersMain.init(); | ||
+import 'commcarehq'; | ||
|
||
- var defaultConfig = initialPageData.get('default_config') || {}; | ||
- if (initialPageData.get('has_datespan')) { | ||
- defaultConfig.date_range = 'last7'; | ||
- } else { | ||
- defaultConfig.date_range = null; | ||
- } | ||
- defaultConfig.has_ucr_datespan = false; | ||
- defaultConfig.datespan_filters = []; | ||
- defaultConfig.datespan_slug = null; | ||
+import $ from 'jquery'; | ||
|
||
- var $savedReports = $("#savedReports"); | ||
- if ($savedReports.length) { | ||
- var reportConfigsView = reportConfigModels.reportConfigsViewModel({ | ||
- filterForm: $("#reportFilters"), | ||
- items: initialPageData.get('report_configs'), | ||
- defaultItem: defaultConfig, | ||
- saveUrl: initialPageData.reverse("add_report_config"), | ||
- }); | ||
- $savedReports.koApplyBindings(reportConfigsView); | ||
- reportConfigsView.setConfigBeingViewed(reportConfigModels.reportConfig(defaultConfig)); | ||
- } | ||
+import initialPageData from 'hqwebapp/js/initial_page_data'; | ||
+import filtersMain from 'reports/js/filters/bootstrap5/main'; | ||
+import reportConfigModels from 'reports/js/bootstrap5/report_config_models'; | ||
|
||
- $('#email-enabled').tooltip({ | ||
+ $('#email-enabled').tooltip({ /* todo B5: plugin:tooltip */ | ||
placement: 'right', | ||
html: true, | ||
title: gettext("You can email a saved version<br />of this report."), | ||
- placement: 'right', | ||
- html: true, | ||
- title: gettext("You can email a saved version<br />of this report."), | ||
+import 'reports/js/bootstrap3/tabular'; | ||
+ | ||
+$(function () { | ||
+ filtersMain.init(); | ||
+ | ||
+ var defaultConfig = initialPageData.get('default_config') || {}; | ||
+ if (initialPageData.get('has_datespan')) { | ||
+ defaultConfig.date_range = 'last7'; | ||
+ } else { | ||
+ defaultConfig.date_range = null; | ||
+ } | ||
+ defaultConfig.has_ucr_datespan = false; | ||
+ defaultConfig.datespan_filters = []; | ||
+ defaultConfig.datespan_slug = null; | ||
+ | ||
+ var $savedReports = $("#savedReports"); | ||
+ if ($savedReports.length) { | ||
+ var reportConfigsView = reportConfigModels.reportConfigsViewModel({ | ||
+ filterForm: $("#reportFilters"), | ||
+ items: initialPageData.get('report_configs'), | ||
+ defaultItem: defaultConfig, | ||
+ saveUrl: initialPageData.reverse("add_report_config"), | ||
}); | ||
+ $savedReports.koApplyBindings(reportConfigsView); | ||
+ reportConfigsView.setConfigBeingViewed(reportConfigModels.reportConfig(defaultConfig)); | ||
+ } | ||
+ | ||
+ $('#email-enabled').tooltip({ /* todo B5: plugin:tooltip */ | ||
+ placement: 'right', | ||
+ html: true, | ||
+ title: gettext("You can email a saved version<br />of this report."), | ||
}); | ||
}); |
Oops, something went wrong.