diff options
| -rw-r--r-- | Gemfile | 2 | ||||
| -rw-r--r-- | Gemfile.lock | 4 | ||||
| -rw-r--r-- | app/assets/javascripts/application.js | 1 | ||||
| -rw-r--r-- | app/assets/javascripts/es6_browserified/journey_patterns/components/JourneyPattern.js | 2 | ||||
| -rw-r--r-- | app/assets/javascripts/forms.coffee | 9 | ||||
| -rw-r--r-- | app/assets/javascripts/main_menu.coffee | 2 | ||||
| -rw-r--r-- | app/assets/javascripts/nav_panels.coffee | 2 | ||||
| -rw-r--r-- | app/assets/javascripts/routing_constraint_zones.coffee | 2 | ||||
| -rw-r--r-- | app/assets/javascripts/select2.coffee | 3 | ||||
| -rw-r--r-- | app/assets/javascripts/selectable_table.coffee | 3 | ||||
| -rw-r--r-- | app/assets/javascripts/time_table_combinations.coffee | 3 | ||||
| -rw-r--r-- | app/views/layouts/application.html.slim | 6 | ||||
| -rw-r--r-- | app/views/routes/show.html.slim | 6 | 
13 files changed, 21 insertions, 24 deletions
| @@ -20,8 +20,6 @@ gem 'browserify-rails'  # Use jquery as the JavaScript library  gem 'jquery-rails', '~> 3.1.4' # Update to v4 for Rails 4.2 -# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks -gem 'turbolinks'  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder  gem 'jbuilder', '~> 2.0'  # bundle exec rake doc:rails generates the API under doc/api. diff --git a/Gemfile.lock b/Gemfile.lock index 4e1337ec5..a56fdfbb6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -523,9 +523,6 @@ GEM        json (>= 1.8, < 3.0)        parser (>= 2.3.0.7)        rainbow (>= 1.99.1, < 3.0) -    turbolinks (5.0.1) -      turbolinks-source (~> 5) -    turbolinks-source (5.0.0)      tzinfo (1.2.3)        thread_safe (~> 0.1)      uglifier (2.7.2) @@ -659,7 +656,6 @@ DEPENDENCIES    teaspoon-jasmine    therubyracer (~> 0.12)    transpec -  turbolinks    uglifier (~> 2.7.2)    webmock    whenever! diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index b90f7539d..0024b62b5 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -4,7 +4,6 @@  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the  // the compiled file.  // -//= require turbolinks  //= require jquery  //= require jquery_ujs  //= require modernizr diff --git a/app/assets/javascripts/es6_browserified/journey_patterns/components/JourneyPattern.js b/app/assets/javascripts/es6_browserified/journey_patterns/components/JourneyPattern.js index 14ddf2b99..43c40a4d5 100644 --- a/app/assets/javascripts/es6_browserified/journey_patterns/components/JourneyPattern.js +++ b/app/assets/javascripts/es6_browserified/journey_patterns/components/JourneyPattern.js @@ -14,7 +14,7 @@ class JourneyPattern extends Component{      let vjURL = routeURL + '/vehicle_journeys?jp=' + jpOid      return ( -      <a data-turbolinks="false" href={vjURL}>Horaires des courses</a> +      <a href={vjURL}>Horaires des courses</a>      )    } diff --git a/app/assets/javascripts/forms.coffee b/app/assets/javascripts/forms.coffee index 6b00e9c26..12d82fef1 100644 --- a/app/assets/javascripts/forms.coffee +++ b/app/assets/javascripts/forms.coffee @@ -41,10 +41,11 @@ isEdge = !isIE && !!window.StyleMedia        else          $(selectedStatus).css('color', selectedValue) -$(document).on 'turbolinks:load', togglableFilter -$(document).on 'turbolinks:load', submitMover -$(document).on 'turbolinks:load', switchInput -$(document).on 'turbolinks:load', colorSelector +$ -> +  togglableFilter() +  submitMover() +  switchInput() +  colorSelector()  if isIE || isEdge    $(document).on 'click', '.formSubmitr', (e)-> diff --git a/app/assets/javascripts/main_menu.coffee b/app/assets/javascripts/main_menu.coffee index f6266f06b..a12c47576 100644 --- a/app/assets/javascripts/main_menu.coffee +++ b/app/assets/javascripts/main_menu.coffee @@ -1,4 +1,4 @@ -$(document).on 'turbolinks:load', -> +$ ->    link = []    ptitleCont = "" diff --git a/app/assets/javascripts/nav_panels.coffee b/app/assets/javascripts/nav_panels.coffee index 829db5ad0..25f15f063 100644 --- a/app/assets/javascripts/nav_panels.coffee +++ b/app/assets/javascripts/nav_panels.coffee @@ -1,4 +1,4 @@ -$(document).on 'turbolinks:load', -> +$ ->    $('#menu_top [data-panel="toggle"]').on 'click', (e) ->      e.preventDefault()      $(this).siblings().removeClass 'active' diff --git a/app/assets/javascripts/routing_constraint_zones.coffee b/app/assets/javascripts/routing_constraint_zones.coffee index fc032f074..e978cd29a 100644 --- a/app/assets/javascripts/routing_constraint_zones.coffee +++ b/app/assets/javascripts/routing_constraint_zones.coffee @@ -22,7 +22,7 @@ fill_stop_points_options = ->  errors_on_form = ->    document.location.pathname.endsWith('routing_constraint_zones') && $('#new_routing_constraint_zone').length -$(document).on 'turbolinks:load', -> +$ ->    if document.location.pathname.endsWith('routing_constraint_zones/new') || errors_on_form()      fill_stop_points_options()    $('#routing_constraint_zone_route_id').change(fill_stop_points_options) diff --git a/app/assets/javascripts/select2.coffee b/app/assets/javascripts/select2.coffee index af3dc6d75..5adaabda5 100644 --- a/app/assets/javascripts/select2.coffee +++ b/app/assets/javascripts/select2.coffee @@ -39,4 +39,5 @@ bind_select2_ajax = (el, cfg = {}) -> -$(document).on 'turbolinks:load', select_2 +$ -> +  select_2() diff --git a/app/assets/javascripts/selectable_table.coffee b/app/assets/javascripts/selectable_table.coffee index 4086bf6c2..681c8f9e6 100644 --- a/app/assets/javascripts/selectable_table.coffee +++ b/app/assets/javascripts/selectable_table.coffee @@ -53,4 +53,5 @@            .addClass 'noselect'            .children('.info-msg').children('span').text(selection.length) -$(document).on 'turbolinks:load', selectTable +$ -> +  selectTable() diff --git a/app/assets/javascripts/time_table_combinations.coffee b/app/assets/javascripts/time_table_combinations.coffee index 8923af958..6104da7ff 100644 --- a/app/assets/javascripts/time_table_combinations.coffee +++ b/app/assets/javascripts/time_table_combinations.coffee @@ -3,4 +3,5 @@      $(this).closest('.has_switch').siblings('.form-group').each ->        $(this).toggleClass('hidden') -$(document).on 'turbolinks:load', combinedTypeToggle +$ -> +  combinedTypeToggle() diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index dc1ec9766..6eab2a761 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -8,10 +8,10 @@ html lang=I18n.locale      title STIF BOIV -    = stylesheet_link_tag 'base', media: 'all', 'data-turbolinks-track': true -    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': true +    = stylesheet_link_tag 'base' +    = stylesheet_link_tag 'application' -    = javascript_include_tag 'application', 'data-turbolinks-track': true +    = javascript_include_tag 'application'    body diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim index d994e3861..6d2d4e90d 100644 --- a/app/views/routes/show.html.slim +++ b/app/views/routes/show.html.slim @@ -3,15 +3,15 @@               @route.name,               'Lorem ipsum dolor sit amet',               t('last_update', time: l(@route.updated_at, format: :short)), -             (policy(@route).edit? ? link_to(t('actions.edit'), edit_referential_line_route_path(@referential, @line, @route), data: {turbolinks: false}, class: 'btn btn-default') : '') do +             (policy(@route).edit? ? link_to(t('actions.edit'), edit_referential_line_route_path(@referential, @line, @route), class: 'btn btn-default') : '') do    / Below is secundary actions & optional contents (filters, ...)    .row.mb-sm      .col-lg-12.text-right        - if @route_sp.any? -        = link_to t('journey_patterns.index.title'), [@referential, @line, @route, :journey_patterns_collection], data: {turbolinks: false}, class: 'btn btn-primary' +        = link_to t('journey_patterns.index.title'), [@referential, @line, @route, :journey_patterns_collection], class: 'btn btn-primary'        - if @route.journey_patterns.present? -        = link_to t('vehicle_journeys.actions.index'), [@referential, @line, @route, :vehicle_journeys], data: {turbolinks: false}, class: 'btn btn-primary' +        = link_to t('vehicle_journeys.actions.index'), [@referential, @line, @route, :vehicle_journeys], class: 'btn btn-primary'        = link_to t('vehicle_journey_exports.new.title'), referential_line_route_vehicle_journey_exports_path(@referential, @line, @route, format: :zip), class: 'btn btn-primary' | 
