Skip to content

Commit faec5f2

Browse files
authored
Merge pull request #1309 from ElixirTeSS/fix-jquery
Fix jQuery version
2 parents 83bb4d4 + 33a68ef commit faec5f2

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ GEM
246246
actionview (>= 5.0.0)
247247
activesupport (>= 5.0.0)
248248
jquery-qtip2-wrapper-rails (3.0.3)
249-
jquery-rails (4.6.0)
249+
jquery-rails (4.6.1)
250250
rails-dom-testing (>= 1, < 3)
251251
railties (>= 4.2.0)
252252
thor (>= 0.14, < 2.0)

app/assets/javascripts/application.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
1111
// about supported directives.
1212
//
13-
//= require jquery
13+
//= require jquery3
1414
//= require jquery.turbolinks
1515
//= require jquery_ujs
1616
//= require bootstrap-sprockets
@@ -79,8 +79,7 @@ const Index = {
7979

8080
// Perform an ajax request to load the calendar and replace the contents
8181
window.loadCalendar = function(url) {
82-
req = $.ajax(url);
83-
req.done((res) => eval(res));
82+
$.ajax(url, { dataType: 'script', cache: true }); // Is loaded automatically.
8483
return true;
8584
}
8685

app/views/events/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<ul class="nav nav-xs nav-pills index-display-options">
2727
<%# We should consider setting the active status based on the query fragment so we can deeplink %>
2828
<%= tab('List', 'fa fa-list', 'home', active: true) %>
29-
<%= tab('Calendar', 'fa fa-calendar', 'calendar', options: { 'data-calendar': calendar_events_path(search_and_facet_params.merge(format: :js, per_page: 200))}) %>
29+
<%= tab('Calendar', 'fa fa-calendar', 'calendar', options: { 'data-calendar': calendar_events_path(search_and_facet_params.merge(per_page: 200))}) %>
3030
<% if TeSS::Config.map_enabled %>
3131
<%= tab('Map', 'fa fa-globe', 'map',
3232
disabled: { check: (search_and_facet_params[:online] == 'true'),

0 commit comments

Comments
 (0)