Skip to content

Commit

Permalink
Merge pull request #35439 from dimagi/jls/webpack-more-misc
Browse files Browse the repository at this point in the history
[webpack] Migrate pages I've been procrastinating on
  • Loading branch information
orangejenny authored Nov 26, 2024
2 parents 04cf1d3 + 26dedb7 commit 9b4c30e
Show file tree
Hide file tree
Showing 46 changed files with 62 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ hqDefine('accounting/js/renew_plan_selection', [
'knockout',
'hqwebapp/js/initial_page_data',
'hqwebapp/js/toggles',
'commcarehq',
], function (
$,
ko,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load i18n %}
{% load crispy_forms_tags %}

{% requirejs_main "hqwebapp/js/bootstrap3/crud_paginated_list_init" %}
{% js_entry_b3 "hqwebapp/js/bootstrap3/crud_paginated_list_init" %}

{% block pagination_header %}
<h2>{% trans 'Manage Accounting Admins' %}</h2>
Expand Down
1 change: 1 addition & 0 deletions corehq/apps/domain/static/domain/js/internal_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ hqDefine("domain/js/internal_settings", [
'hqwebapp/js/initial_page_data',
'hqwebapp/js/multiselect_utils',
'jquery-ui/ui/widgets/datepicker',
'commcarehq',
], function (
$,
ko,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load crispy_forms_tags %}
{% load i18n %}

{% requirejs_main_b5 'smsbillables/js/smsbillables.rate_calc' %}
{% js_entry 'smsbillables/js/rate_calc' %}

{% block title %}{% trans "SMS Pricing" %}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load crispy_forms_tags %}
{% load i18n %}

{% requirejs_main_b5 'smsbillables/js/smsbillables.rate_calc' %}
{% js_entry 'smsbillables/js/rate_calc' %}

{% block page_content %}
<div class="card"> {# todo B5: css-well #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load hq_shared_tags %}
{% load i18n %}

{% requirejs_main 'accounting/js/widgets' %}
{% js_entry_b3 'accounting/js/widgets' %}

{% block plan_breadcrumbs %}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load crispy_forms_tags %}
{% load i18n %}

{% requirejs_main 'domain/js/internal_settings' %}
{% js_entry_b3 'domain/js/internal_settings' %}

{% block stylesheets %}
{{ block.super }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% load compress %}
{% load menu_tags %}

{% requirejs_main 'accounting/js/renew_plan_selection' %}
{% js_entry_b3 'accounting/js/renew_plan_selection' %}

{% block plan_breadcrumbs %}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load hq_shared_tags %}
{% load i18n %}

{% requirejs_main_b5 'accounting/js/widgets' %}
{% js_entry 'accounting/js/widgets' %}

{% block plan_breadcrumbs %}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load crispy_forms_tags %}
{% load i18n %}

{% requirejs_main_b5 'domain/js/internal_settings' %}
{% js_entry 'domain/js/internal_settings' %}

{% block stylesheets %}
{{ block.super }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load crispy_forms_tags %}
{% load hq_shared_tags %}

{% requirejs_main_b5 'domain/js/bootstrap5/internal_subscription_management' %}
{% js_entry 'domain/js/bootstrap5/internal_subscription_management' %}

{% block page_content %}
{% blocktrans %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% load compress %}
{% load menu_tags %}

{% requirejs_main_b5 'accounting/js/renew_plan_selection' %}
{% js_entry 'accounting/js/renew_plan_selection' %}

{% block plan_breadcrumbs %}{% endblock %}

Expand Down
1 change: 1 addition & 0 deletions corehq/apps/hqwebapp/static/hqwebapp/js/soil.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
hqDefine("hqwebapp/js/soil", [
"jquery",
"hqwebapp/js/initial_page_data",
"commcarehq",
], function (
$,
initialPageData
Expand Down
2 changes: 1 addition & 1 deletion corehq/apps/hqwebapp/static/hqwebapp/js/sso_inactivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handles communication about the status of SSO login after the inactivity
* timer has requested a re-login
*/
hqDefine('hqwebapp/js/sso_inactivity', [], function () {
hqDefine('hqwebapp/js/sso_inactivity', ['commcarehq'], function () {
localStorage.setItem('ssoInactivityMessage', JSON.stringify({
isLoggedIn: true,
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{% block title %}{% trans "Thank you for logging in with Single Sign-On!" %}{% endblock %}

{% requirejs_main 'hqwebapp/js/sso_inactivity' %}
{% js_entry_b3 'hqwebapp/js/sso_inactivity' %}

{% block container_class %}container-fluid{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load i18n %}
{% load hq_shared_tags %}

{% requirejs_main "hqwebapp/js/soil" %}
{% js_entry_b3 "hqwebapp/js/soil" %}

{% block page_content %}
{% initial_page_data 'download_id' download_id %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{% block title %}{% trans "Thank you for logging in with Single Sign-On!" %}{% endblock %}

{% requirejs_main 'hqwebapp/js/sso_inactivity' %}
{% js_entry 'hqwebapp/js/sso_inactivity' %}

{% block container_class %}container-fluid{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load i18n %}
{% load hq_shared_tags %}

{% requirejs_main_b5 "hqwebapp/js/soil" %}
{% js_entry "hqwebapp/js/soil" %}

{% block page_content %}
{% initial_page_data 'download_id' download_id %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% load i18n %}

-{% js_entry_b3 'smsbillables/js/rate_calc' %}
+{% requirejs_main_b5 'smsbillables/js/smsbillables.rate_calc' %}
+{% js_entry 'smsbillables/js/rate_calc' %}

{% block title %}{% trans "SMS Pricing" %}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% load i18n %}

-{% js_entry_b3 'smsbillables/js/rate_calc' %}
+{% requirejs_main_b5 'smsbillables/js/smsbillables.rate_calc' %}
+{% js_entry 'smsbillables/js/rate_calc' %}

{% block page_content %}
- <div class="well">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
{% load hq_shared_tags %}
{% load i18n %}

-{% requirejs_main 'accounting/js/widgets' %}
+{% requirejs_main_b5 'accounting/js/widgets' %}
-{% js_entry_b3 'accounting/js/widgets' %}
+{% js_entry 'accounting/js/widgets' %}

{% block plan_breadcrumbs %}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
{% load crispy_forms_tags %}
{% load i18n %}

-{% requirejs_main 'domain/js/internal_settings' %}
+{% requirejs_main_b5 'domain/js/internal_settings' %}
-{% js_entry_b3 'domain/js/internal_settings' %}
+{% js_entry 'domain/js/internal_settings' %}

{% block stylesheets %}
{{ block.super }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% load hq_shared_tags %}

-{% js_entry_b3 'domain/js/bootstrap3/internal_subscription_management' %}
+{% requirejs_main_b5 'domain/js/bootstrap5/internal_subscription_management' %}
+{% js_entry 'domain/js/bootstrap5/internal_subscription_management' %}

{% block page_content %}
{% blocktrans %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{% load compress %}
{% load menu_tags %}

-{% requirejs_main 'accounting/js/renew_plan_selection' %}
+{% requirejs_main_b5 'accounting/js/renew_plan_selection' %}
-{% js_entry_b3 'accounting/js/renew_plan_selection' %}
+{% js_entry 'accounting/js/renew_plan_selection' %}

{% block plan_breadcrumbs %}{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
---
+++
@@ -5,7 +5,7 @@

{% block title %}{% trans "Thank you for logging in with Single Sign-On!" %}{% endblock %}

-{% js_entry_b3 'hqwebapp/js/sso_inactivity' %}
+{% js_entry 'hqwebapp/js/sso_inactivity' %}

{% block container_class %}container-fluid{% endblock %}

@@ -15,7 +15,7 @@
<h1>{% trans "Thank you for logging in with Single Sign-On!" %}</h1>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
{% load i18n %}
{% load hq_shared_tags %}

-{% requirejs_main "hqwebapp/js/soil" %}
+{% requirejs_main_b5 "hqwebapp/js/soil" %}
-{% js_entry_b3 "hqwebapp/js/soil" %}
+{% js_entry "hqwebapp/js/soil" %}

{% block page_content %}
{% initial_page_data 'download_id' download_id %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
+ 'reports/js/bootstrap5/readable_form',
'bootstrap', // needed for $.tab
'jquery-memoized-ajax/jquery.memoized.ajax.min',
], function (
@@ -92,7 +92,7 @@
'commcarehq',
@@ -93,7 +93,7 @@
// form data panel uses sticky tabs when it's its own page
// but that behavior would be disruptive here
$panel.find(".sticky-tabs").removeClass("sticky-tabs");
Expand All @@ -30,7 +30,7 @@

singleForm.initSingleForm({
instance_id: data.xform_id,
@@ -275,7 +275,7 @@
@@ -276,7 +276,7 @@
$propertiesModal.koApplyBindings(modalData);
$casePropertyNames.click(function () {
modalData.init($(this).data('property-name'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<link rel="stylesheet" type="text/css" href="{% static "hqwebapp/css/proptable.css" %}">
{% endblock %}

-{% requirejs_main 'reports/js/bootstrap3/case_details' %}
+{% requirejs_main_b5 'reports/js/bootstrap5/case_details' %}
-{% js_entry_b3 'reports/js/bootstrap3/case_details' %}
+{% js_entry 'reports/js/bootstrap5/case_details' %}

{% block page_content %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ hqDefine('registration/js/register_new_user', [
'hqwebapp/js/initial_page_data',
'analytix/js/kissmetrix',
'registration/js/login',
'commcarehq',
], function (
$,
ko,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% load compress %}
{% load crispy_forms_tags %}

{% requirejs_main 'registration/js/register_new_user' %}
{% js_entry_b3 'registration/js/register_new_user' %}

{% block title %}{% trans "Create an Account" %}{% endblock title %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ hqDefine("reports/js/bootstrap3/case_details", [
'reports/js/bootstrap3/readable_form',
'bootstrap', // needed for $.tab
'jquery-memoized-ajax/jquery.memoized.ajax.min',
'commcarehq',
], function (
$,
ko,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ hqDefine("reports/js/bootstrap5/case_details", [
'reports/js/bootstrap5/readable_form',
'bootstrap', // needed for $.tab
'jquery-memoized-ajax/jquery.memoized.ajax.min',
'commcarehq',
], function (
$,
ko,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" href="{% static "hqwebapp/css/proptable.css" %}">
{% endblock %}

{% requirejs_main 'reports/js/bootstrap3/case_details' %}
{% js_entry_b3 'reports/js/bootstrap3/case_details' %}

{% block page_content %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" href="{% static "hqwebapp/css/proptable.css" %}">
{% endblock %}

{% requirejs_main_b5 'reports/js/bootstrap5/case_details' %}
{% js_entry 'reports/js/bootstrap5/case_details' %}

{% block page_content %}

Expand Down
1 change: 1 addition & 0 deletions corehq/apps/sms/static/sms/js/sms_language_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ hqDefine("sms/js/sms_language_main",[
"langcodes/js/langcodes",
"hqwebapp/js/bulk_upload_file",
"sms/js/languages",
"commcarehq",
],function () {

});
Expand Down
2 changes: 1 addition & 1 deletion corehq/apps/sms/templates/sms/languages.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% trans "SMS Languages" %}
{% endblock %}

{% requirejs_main 'sms/js/sms_language_main' %}
{% js_entry_b3 'sms/js/sms_language_main' %}

{% block stylesheets %}{{ block.super }}
<link rel="stylesheet" href="{% static 'jquery-ui-built-themes/redmond/jquery-ui.min.css' %}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ hqDefine("userreports/js/ucr_expression", [
'hqwebapp/js/initial_page_data',
'hqwebapp/js/base_ace',
'hqwebapp/js/bootstrap3/alert_user',
'commcarehq',
], function (
moment,
ko,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ hqDefine('userreports/js/ucr_expressions', [
"hqwebapp/js/initial_page_data",
"hqwebapp/js/bootstrap3/crud_paginated_list_init",
'hqwebapp/js/base_ace',
'commcarehq',
], function () {
// used to include base_ace on the ucr_statements page

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% endcompress %}
{% endblock %}

{% requirejs_main "userreports/js/ucr_expression" %}
{% js_entry_b3 "userreports/js/ucr_expression" %}

{% block page_content %}
{% initial_page_data "expression" expression %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load i18n %}
{% load hq_shared_tags %}

{% requirejs_main "userreports/js/ucr_expressions" %}
{% js_entry_b3 "userreports/js/ucr_expressions" %}

{% block pagination_templates %}
<script type="text/html" id="base-ucr-statement-template">
Expand Down
1 change: 1 addition & 0 deletions corehq/apps/users/static/users/js/accept_invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ hqDefine('users/js/accept_invite', [
'registration/js/login', // contains password obfuscation & login requirements
'registration/js/bootstrap3/password',
'hqwebapp/js/captcha',
'commcarehq',
], function () {});
2 changes: 1 addition & 1 deletion corehq/apps/users/templates/users/accept_invite.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load field_tags %}
{% load hq_shared_tags %}

{% requirejs_main 'users/js/accept_invite' %}
{% js_entry_b3 'users/js/accept_invite' %}

{% block title %}{% trans "Invitation to join the " %}{{ invite_to }} {{ invite_type }}{% endblock title %}

Expand Down
Loading

0 comments on commit 9b4c30e

Please sign in to comment.