From 9576ea949138fd912e78276cb92a78e88c90fc38 Mon Sep 17 00:00:00 2001 From: Jesus Dugarte Date: Tue, 27 Jul 2021 12:00:58 -0400 Subject: [PATCH 1/2] add turbo event --- .../activeadmin_addons/addons/interactive_select_tag.js | 2 +- app/javascript/activeadmin_addons/addons/toggle_bool.js | 2 +- app/javascript/activeadmin_addons/config.js | 2 +- app/javascript/activeadmin_addons/inputs/color-picker.js | 2 +- app/javascript/activeadmin_addons/inputs/date-time-picker.js | 2 +- app/javascript/activeadmin_addons/inputs/nested-select.js | 2 +- app/javascript/activeadmin_addons/inputs/search-select.js | 2 +- app/javascript/activeadmin_addons/inputs/select2.js | 2 +- app/javascript/activeadmin_addons/inputs/selected-list.js | 2 +- app/javascript/activeadmin_addons/inputs/tags.js | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/javascript/activeadmin_addons/addons/interactive_select_tag.js b/app/javascript/activeadmin_addons/addons/interactive_select_tag.js index edfa017d..be30d41f 100644 --- a/app/javascript/activeadmin_addons/addons/interactive_select_tag.js +++ b/app/javascript/activeadmin_addons/addons/interactive_select_tag.js @@ -92,4 +92,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); diff --git a/app/javascript/activeadmin_addons/addons/toggle_bool.js b/app/javascript/activeadmin_addons/addons/toggle_bool.js index 5505c93c..57457293 100644 --- a/app/javascript/activeadmin_addons/addons/toggle_bool.js +++ b/app/javascript/activeadmin_addons/addons/toggle_bool.js @@ -36,4 +36,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); diff --git a/app/javascript/activeadmin_addons/config.js b/app/javascript/activeadmin_addons/config.js index af497f70..f8aa94f5 100644 --- a/app/javascript/activeadmin_addons/config.js +++ b/app/javascript/activeadmin_addons/config.js @@ -7,4 +7,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); diff --git a/app/javascript/activeadmin_addons/inputs/color-picker.js b/app/javascript/activeadmin_addons/inputs/color-picker.js index 4eb9cecd..f9caedd9 100644 --- a/app/javascript/activeadmin_addons/inputs/color-picker.js +++ b/app/javascript/activeadmin_addons/inputs/color-picker.js @@ -13,4 +13,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); diff --git a/app/javascript/activeadmin_addons/inputs/date-time-picker.js b/app/javascript/activeadmin_addons/inputs/date-time-picker.js index b4da87b7..18a9ec2b 100644 --- a/app/javascript/activeadmin_addons/inputs/date-time-picker.js +++ b/app/javascript/activeadmin_addons/inputs/date-time-picker.js @@ -25,4 +25,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); diff --git a/app/javascript/activeadmin_addons/inputs/nested-select.js b/app/javascript/activeadmin_addons/inputs/nested-select.js index 7a4ce137..a63c689d 100644 --- a/app/javascript/activeadmin_addons/inputs/nested-select.js +++ b/app/javascript/activeadmin_addons/inputs/nested-select.js @@ -167,4 +167,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); diff --git a/app/javascript/activeadmin_addons/inputs/search-select.js b/app/javascript/activeadmin_addons/inputs/search-select.js index 11e1cdcf..5c8b722f 100644 --- a/app/javascript/activeadmin_addons/inputs/search-select.js +++ b/app/javascript/activeadmin_addons/inputs/search-select.js @@ -73,4 +73,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); diff --git a/app/javascript/activeadmin_addons/inputs/select2.js b/app/javascript/activeadmin_addons/inputs/select2.js index 08d1ac5b..93e603f3 100644 --- a/app/javascript/activeadmin_addons/inputs/select2.js +++ b/app/javascript/activeadmin_addons/inputs/select2.js @@ -49,4 +49,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); diff --git a/app/javascript/activeadmin_addons/inputs/selected-list.js b/app/javascript/activeadmin_addons/inputs/selected-list.js index 4183d00f..3613bd45 100644 --- a/app/javascript/activeadmin_addons/inputs/selected-list.js +++ b/app/javascript/activeadmin_addons/inputs/selected-list.js @@ -104,4 +104,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); diff --git a/app/javascript/activeadmin_addons/inputs/tags.js b/app/javascript/activeadmin_addons/inputs/tags.js index e443e152..09bf9d9b 100644 --- a/app/javascript/activeadmin_addons/inputs/tags.js +++ b/app/javascript/activeadmin_addons/inputs/tags.js @@ -73,4 +73,4 @@ var initializer = function() { }; $(initializer); -$(document).on('turbolinks:load', initializer); +$(document).on('turbolinks:load turbo:load', initializer); From 01dcded72059a2fbb53f8c9062dab633597362aa Mon Sep 17 00:00:00 2001 From: Jesus Dugarte Date: Tue, 27 Jul 2021 12:21:49 -0400 Subject: [PATCH 2/2] yarn build --- .../javascripts/activeadmin_addons/all.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/activeadmin_addons/all.js b/app/assets/javascripts/activeadmin_addons/all.js index 8de9cb17..0846df99 100644 --- a/app/assets/javascripts/activeadmin_addons/all.js +++ b/app/assets/javascripts/activeadmin_addons/all.js @@ -171,7 +171,7 @@ }; }; $(initializer$9); - $(document).on("turbolinks:load", initializer$9); + $(document).on("turbolinks:load turbo:load", initializer$9); var initializer$8 = function() { configureSelect2(document); $(document).on("has_many_add:after", function(event, container) { @@ -213,7 +213,7 @@ } }; $(initializer$8); - $(document).on("turbolinks:load", initializer$8); + $(document).on("turbolinks:load turbo:load", initializer$8); var initializer$7 = function() { setupSearchSelect(document); $(document).on("has_many_add:after", function(event, container) { @@ -283,7 +283,7 @@ } }; $(initializer$7); - $(document).on("turbolinks:load", initializer$7); + $(document).on("turbolinks:load turbo:load", initializer$7); $.fn.select2.amd.define("select2/data/nestedCustomAdapter", [ "select2/data/array", "select2/utils" ], function(ArrayData, Utils) { function CustomData($element, options) { CustomData.__super__.constructor.call(this, $element, options); @@ -429,7 +429,7 @@ } }; $(initializer$6); - $(document).on("turbolinks:load", initializer$6); + $(document).on("turbolinks:load turbo:load", initializer$6); var initializer$5 = function() { setupTags(document); $(document).on("has_many_add:after", function(event, container) { @@ -495,7 +495,7 @@ } }; $(initializer$5); - $(document).on("turbolinks:load", initializer$5); + $(document).on("turbolinks:load turbo:load", initializer$5); var initializer$4 = function() { setupSelectedList(document); $(document).on("has_many_add:after", function(event, container) { @@ -589,7 +589,7 @@ } }; $(initializer$4); - $(document).on("turbolinks:load", initializer$4); + $(document).on("turbolinks:load turbo:load", initializer$4); var initializer$3 = function() { setupDateTimePicker(document); $(document).on("has_many_add:after", ".has_many_container", function(event, fieldset) { @@ -613,7 +613,7 @@ } }; $(initializer$3); - $(document).on("turbolinks:load", initializer$3); + $(document).on("turbolinks:load turbo:load", initializer$3); var initializer$2 = function() { setupColorPicker(); $(document).on("has_many_add:after", setupColorPicker); @@ -626,7 +626,7 @@ } }; $(initializer$2); - $(document).on("turbolinks:load", initializer$2); + $(document).on("turbolinks:load turbo:load", initializer$2); var initializer$1 = function() { $(".toggle-bool-switch").click(function(e) { var boolSwitch = $(e.target); @@ -665,7 +665,7 @@ }); }; $(initializer$1); - $(document).on("turbolinks:load", initializer$1); + $(document).on("turbolinks:load turbo:load", initializer$1); var initializer = function() { configureInteractiveSelect(document); $(document).on("has_many_add:after", function(event, container) { @@ -749,5 +749,5 @@ }); }; $(initializer); - $(document).on("turbolinks:load", initializer); + $(document).on("turbolinks:load turbo:load", initializer); });