diff --git a/Gemfile.lock b/Gemfile.lock index 5e617058f..d014eaca4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -246,7 +246,7 @@ GEM actionview (>= 5.0.0) activesupport (>= 5.0.0) jquery-qtip2-wrapper-rails (3.0.3) - jquery-rails (4.6.0) + jquery-rails (4.6.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index baebffef4..28b2b1b5a 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -10,7 +10,7 @@ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details // about supported directives. // -//= require jquery +//= require jquery3 //= require jquery.turbolinks //= require jquery_ujs //= require bootstrap-sprockets @@ -79,8 +79,7 @@ const Index = { // Perform an ajax request to load the calendar and replace the contents window.loadCalendar = function(url) { - req = $.ajax(url); - req.done((res) => eval(res)); + $.ajax(url, { dataType: 'script', cache: true }); // Is loaded automatically. return true; } diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 36f517ca0..cab70d890 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -26,7 +26,7 @@