-
-
Notifications
You must be signed in to change notification settings - Fork 515
Upgrade jquery 4.0.0 #6687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Upgrade jquery 4.0.0 #6687
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e151e39
Upgrade jquery dependency to 4.0.0
stefannibrasil 49e8ad5
Remove unused bootstrap-select dependency
stefannibrasil 28999ee
Remove console.log from test
stefannibrasil c463e14
Remove JQuery globalizer
stefannibrasil bd2b90b
Remove tooltip require
stefannibrasil 764579d
linter
stefannibrasil ea07609
does it pass in CI?
stefannibrasil a72ec7f
only tests fail but app works
stefannibrasil b024672
whaat
stefannibrasil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,39 +1,38 @@ | ||
| /* global window */ | ||
| import './jQueryGlobalizer.js' | ||
| import '@hotwired/turbo-rails' | ||
| import 'bootstrap' | ||
| import 'bootstrap-select' | ||
| import './sweet-alert-confirm.js' | ||
| import './controllers' | ||
| import 'trix' | ||
| import '@rails/actiontext' | ||
| import './datatable.js' | ||
| Turbo.session.drive = false | ||
| import "./jquery.js"; | ||
| import "@hotwired/turbo-rails"; | ||
| import "bootstrap"; | ||
| import "bootstrap-select"; | ||
| import "./sweet-alert-confirm.js"; | ||
| import "./controllers"; | ||
| import "trix"; | ||
| import "@rails/actiontext"; | ||
| import "./datatable.js"; | ||
| Turbo.session.drive = false; | ||
|
|
||
| require('datatables.net-dt')(null, window.jQuery) // First parameter is the global object. Defaults to window if null | ||
| require('select2')(window.jQuery) | ||
| require('@rails/ujs').start() | ||
| require('@rails/activestorage').start() | ||
| require('bootstrap-datepicker') | ||
| require('./src/add_to_calendar_button') | ||
| require('./src/case_contact') | ||
| require('./src/case_emancipation') | ||
| require('./src/casa_case') | ||
| require('./src/new_casa_case') | ||
| require('./src/dashboard') | ||
| require('./src/emancipations') | ||
| require('./src/import') | ||
| require('./src/password_confirmation') | ||
| require('./src/read_more') | ||
| require('./src/reimbursements') | ||
| require('./src/reports') | ||
| require('./src/require_communication_preference') | ||
| require('./src/select') | ||
| require('./src/tooltip') | ||
| require('./src/time_zone') | ||
| require('./src/session_timeout_poller.js') | ||
| require('./src/display_app_metric.js') | ||
| require('./src/casa_org') | ||
| require('./src/sms_reactivation_toggle') | ||
| require('./src/validated_form') | ||
| require('./src/learning_hours') | ||
| require("datatables.net-dt")(null, window.jQuery); // First parameter is the global object. Defaults to window if null | ||
| require("select2")(window.jQuery); | ||
| require("@rails/ujs").start(); | ||
| require("@rails/activestorage").start(); | ||
| require("bootstrap-datepicker"); | ||
| require("./src/add_to_calendar_button"); | ||
| require("./src/case_contact"); | ||
| require("./src/case_emancipation"); | ||
| require("./src/casa_case"); | ||
| require("./src/new_casa_case"); | ||
| require("./src/dashboard"); | ||
| require("./src/emancipations"); | ||
| require("./src/import"); | ||
| require("./src/password_confirmation"); | ||
| require("./src/read_more"); | ||
| require("./src/reimbursements"); | ||
| require("./src/reports"); | ||
| require("./src/require_communication_preference"); | ||
| require("./src/select"); | ||
| require("./src/tooltip"); | ||
| require("./src/time_zone"); | ||
| require("./src/session_timeout_poller.js"); | ||
| require("./src/display_app_metric.js"); | ||
| require("./src/casa_org"); | ||
| require("./src/sms_reactivation_toggle"); | ||
| require("./src/validated_form"); | ||
| require("./src/learning_hours"); |
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import jquery from "jquery"; | ||
| window.jQuery = jquery; | ||
| window.$ = jquery; | ||
|
|
||
| $(function () { | ||
| console.log("Hey!"); | ||
| }); |
This file contains hidden or 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,5 +1,3 @@ | ||
| /* global $ */ | ||
|
|
||
| import 'add-to-calendar-button' | ||
|
|
||
| function createCalendarEvents () { | ||
|
|
||
This file contains hidden or 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,5 +1,3 @@ | ||
| /* global $ */ | ||
|
|
||
| import { initializeDataTable } from '../../datatable' | ||
|
|
||
| $(() => { | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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,58 +1,51 @@ | ||
| /* global window */ | ||
| /* global $ */ | ||
| import Swal from "sweetalert2"; | ||
|
|
||
| import Swal from 'sweetalert2' | ||
| function convertDateToSystemTimeZone (date) { | ||
| return new Date((typeof date === 'string' ? new Date(date) : date)) | ||
| function convertDateToSystemTimeZone(date) { | ||
| return new Date(typeof date === "string" ? new Date(date) : date); | ||
| } | ||
|
|
||
| async function displayFollowupAlert () { | ||
| const { value: text, isConfirmed } = await fireSwalFollowupAlert() | ||
| async function displayFollowupAlert() { | ||
| const { value: text, isConfirmed } = await fireSwalFollowupAlert(); | ||
|
|
||
| if (!isConfirmed) return | ||
| if (!isConfirmed) return; | ||
|
|
||
| const params = text ? { note: text } : {} | ||
| const caseContactId = this.id.replace('followup-button-', '') | ||
| const params = text ? { note: text } : {}; | ||
| const caseContactId = this.id.replace("followup-button-", ""); | ||
|
|
||
| $.post( | ||
| `/case_contacts/${caseContactId}/followups`, | ||
| params, | ||
| () => window.location.reload() | ||
| ) | ||
| $.post(`/case_contacts/${caseContactId}/followups`, params, () => window.location.reload()); | ||
| } | ||
|
|
||
| async function fireSwalFollowupAlert () { | ||
| const inputLabel = 'Optional: Add a note about what followup is needed.' | ||
| async function fireSwalFollowupAlert() { | ||
| const inputLabel = "Optional: Add a note about what followup is needed."; | ||
|
|
||
| return await Swal.fire({ | ||
| input: 'textarea', | ||
| input: "textarea", | ||
| title: inputLabel, | ||
| inputPlaceholder: 'Type your note here...', | ||
| inputAttributes: { 'aria-label': 'Type your note here' }, | ||
| inputPlaceholder: "Type your note here...", | ||
| inputAttributes: { "aria-label": "Type your note here" }, | ||
|
|
||
| showCancelButton: true, | ||
| showCloseButton: true, | ||
|
|
||
| confirmButtonText: 'Confirm', | ||
| confirmButtonColor: '#dc3545', | ||
| confirmButtonText: "Confirm", | ||
| confirmButtonColor: "#dc3545", | ||
|
|
||
| customClass: { | ||
| inputLabel: 'mx-5' | ||
| } | ||
| }) | ||
| inputLabel: "mx-5", | ||
| }, | ||
| }); | ||
| } | ||
|
|
||
| $(document).on('turbo:load', function () { | ||
| $('.filter-form').on('change', '.filter-input', function () { | ||
| $(this).closest('form').submit() | ||
| }) | ||
| }) | ||
| $(document).on("turbo:load", function () { | ||
| $(".filter-form").on("change", ".filter-input", function () { | ||
| $(this).closest("form").submit(); | ||
| }); | ||
| }); | ||
|
|
||
| $(() => { // JQuery's callback for the DOM loading | ||
| $('[data-toggle="tooltip"]').tooltip() | ||
| $('.followup-button').on('click', displayFollowupAlert) | ||
| }) | ||
| $(() => { | ||
| // JQuery's callback for the DOM loading | ||
| $('[data-toggle="tooltip"]').tooltip(); | ||
| $(".followup-button").on("click", displayFollowupAlert); | ||
| }); | ||
|
|
||
| export { | ||
| convertDateToSystemTimeZone | ||
| } | ||
| export { convertDateToSystemTimeZone }; | ||
This file contains hidden or 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
This file contains hidden or 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,5 +1,4 @@ | ||
| /* global alert */ | ||
| /* global $ */ | ||
| const { Notifier } = require('./notifier') | ||
| let pageNotifier | ||
|
|
||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,4 +1,3 @@ | ||
| /* global $ */ | ||
| import { escape } from 'lodash' | ||
|
|
||
| const TypeChecker = require('./type_checker.js') | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,11 +1,12 @@ | ||
| /* global $ */ | ||
|
|
||
| $(() => { // JQuery's callback for the DOM loading | ||
| $('.select2').select2( | ||
| { | ||
| theme: 'bootstrap-5', | ||
| width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : 'style', | ||
| placeholder: $(this).data('placeholder') | ||
| } | ||
| ) | ||
| }) | ||
| $(() => { | ||
| // JQuery's callback for the DOM loading | ||
| $(".select2").select2({ | ||
| theme: "bootstrap-5", | ||
| width: $(this).data("width") | ||
| ? $(this).data("width") | ||
| : $(this).hasClass("w-100") | ||
| ? "100%" | ||
| : "style", | ||
| placeholder: $(this).data("placeholder"), | ||
| }); | ||
| }); |
This file contains hidden or 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,5 +1,3 @@ | ||
| /* global $ */ | ||
|
|
||
| $(() => { // JQuery's callback for the DOM loading | ||
| $('[data-toggle="tooltip"]').tooltip() | ||
| }) |
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical functionality was removed from this file without replacement. The removed code block (between the turbo:load handler and this export statement) contained click handler registration for .followup-button elements that called displayFollowupAlert(). Without this handler, the "Make Reminder" buttons throughout the application (e.g., in app/views/case_contacts/_followup.html.erb) will not work. The displayFollowupAlert function still exists in this file but is now unused. System tests at spec/system/case_contacts/followups/create_spec.rb will fail. Either restore the click handler registration or implement this functionality through a Stimulus controller.