aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorThomas Haddad2017-05-31 16:45:19 +0200
committerThomas Haddad2017-05-31 16:45:58 +0200
commitc48ba9fc153e2b03b5eb02bc9df4e307e64fbc0a (patch)
treeb4eacf795da9d5711415fc78298748f0b1794715 /app
parent57771cd083c14cb915445bd8f2ca96b8c0035f2a (diff)
downloadchouette-core-c48ba9fc153e2b03b5eb02bc9df4e307e64fbc0a.tar.bz2
Refs #3627: Farewell turbolinks
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/application.js1
-rw-r--r--app/assets/javascripts/es6_browserified/journey_patterns/components/JourneyPattern.js2
-rw-r--r--app/assets/javascripts/forms.coffee9
-rw-r--r--app/assets/javascripts/main_menu.coffee2
-rw-r--r--app/assets/javascripts/nav_panels.coffee2
-rw-r--r--app/assets/javascripts/routing_constraint_zones.coffee2
-rw-r--r--app/assets/javascripts/select2.coffee3
-rw-r--r--app/assets/javascripts/selectable_table.coffee3
-rw-r--r--app/assets/javascripts/time_table_combinations.coffee3
-rw-r--r--app/views/layouts/application.html.slim6
-rw-r--r--app/views/routes/show.html.slim6
11 files changed, 21 insertions, 18 deletions
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'