templates/includes/common/js-config.html.twig line 1

Open in your IDE?
  1. {% set contactUrl = (portal_url is defined and portal_url is not empty) ? portal_url ~ 'portal-contact-us' | trans : baseUrl ~ path('contact') %}
  2. {% if custom_feedback_url_redirect_list is defined and custom_feedback_url_redirect_list is not empty and app.request.locale in custom_feedback_url_redirect_list|keys %}
  3. {% set contactUrl = (portal_url is defined and portal_url is not empty) ? portal_url ~ custom_feedback_url_redirect_list[app.request.locale] : custom_feedback_url_redirect_list[app.request.locale] %}
  4. {% endif %}
  5. window.oConfig = {
  6. shortCommit: '{{ short_commit }}',
  7. subjectsInformationZou: '{{ getSubjectsInformationFormZou(true)|raw }}',
  8. subjectsClaimZou: '{{ getSubjectsClaimFormZou(true)|raw }}',
  9. baseUrl: {% if isPdfDownloaded is defined and isPdfDownloaded == true %}'{{ wkhtmltopdf_host }}'{% else %}'{{ baseUrl }}'{% endif %},
  10. locale: '{{ app.request.get('_locale') }}',
  11. networkId: '{{ network_id }}',
  12. networkTimezone: '{{ networkTimezone }}',
  13. deviceType: '{{ deviceType is defined ? deviceType : 'desktop' }}',
  14. deviceOS: '{{ deviceOS is defined ? deviceOS : 'unknown' }}',
  15. networkTimezone: '{{ networkTimezone }}',
  16. {% if external is defined %}external: {{ external == true ? 1 : 0 }},{% endif %}
  17. {% if fromSEO is defined %}fromSEO: {{ fromSEO == true ? 1 : 0 }},{% endif %}
  18. {% if fromWidget is defined %}fromWidget: {{ fromWidget == true ? 1 : 0}},{% endif %}
  19. {% if sim_module is defined %}simModule: {{ sim_module == true ? 1 : 0}},{% endif %}
  20. {% if ticketing_module is defined %}ticketingModule: {{ ticketing_module == true ? 1 : 0}},{% endif %}
  21. {% if widget_module is defined %}widgetModule: {{ widget_module == true ? 1 : 0}},{% endif %}
  22. refererBaseDir: '{{ asset('./') }}',
  23. homeUrl: '/',
  24. outdatedBrowserUrl: '{{ path('outdated_browser') }}',
  25. defaultColor: '#666',
  26. brandColor: '{{ brand_color }}',
  27. hideNavLabelsBreakpoint: {{ hide_nav_labels_breakpoint }},
  28. maxDate: '{%if maxDate is defined %}{{ maxDate }}{%else%}{%endif%}',
  29. enableIsochrones: '{{ enable_isochrones }}',
  30. linesRedirectToSchedules: '{{ lines_redirect_to_schedules }}',
  31. useLatencyInPlacesSearch: {{ use_latency_in_places_search ? 'true' : 'false' }},
  32. faviconUrl: '{{ favicon_base_url() }}',
  33. boundariesUrl: '{{ boundaries_url() }}',
  34. events: {
  35. resultsLoaded: 'is.results.loaded'
  36. },
  37. trans: {
  38. line: '{{ 'journey.line'|trans }}',
  39. departure_stop: '{{ 'booking.transport.departure_stoparea_placeholder'|trans }}',
  40. arrival_stop: '{{ 'booking.transport.arrival_stoparea_placeholder'|trans }}',
  41. no_destination_stoparea: '{{ 'booking.no_destination_stoparea'|trans }}',
  42. journey_not_reservable: '{{ 'booking.journey_not_reservable'|trans }}',
  43. booking_date_unavailable: '{{ 'booking.date.unavailable'|trans }}',
  44. validate_btn: '{{ 'booking.transport.validate'|trans }}',
  45. validate_in_progress_btn: '{{ 'booking.transport.validate_in_progress'|trans }}',
  46. unknown_remaining_seats: '{{ 'booking.transport.unknown_remaining_seats'|trans }}',
  47. remaining_seat: '{{ 'booking.transport.remaining_seat'|trans|raw }}',
  48. remaining_seats: '{{ 'booking.transport.remaining_seats'|trans|raw }}',
  49. amount_error: '{{ 'ticketing.amount_to_topup_error'|trans }}',
  50. and: '{{ 'schedule.and'|trans }}',
  51. modes: {
  52. bus: '{{ 'mode.bus'|trans }}',
  53. transport: '{{ 'mode.transport'|trans }}',
  54. airport: '{{ 'mode.airport'|trans }}',
  55. walk: '{{ 'mode.walk'|trans }}',
  56. metro: '{{ 'mode.metro'|trans }}',
  57. tram: '{{ 'mode.tram'|trans }}',
  58. coach: '{{ 'mode.coach'|trans }}',
  59. bike: '{{ 'mode.bike'|trans }}',
  60. bikepark: '{{ 'mode.bikepark'|trans }}',
  61. bikesharing: '{{ 'mode.bikesharing'|trans }}',
  62. car: '{{ 'mode.car'|trans }}',
  63. train: '{{ 'mode.train'|trans }}',
  64. railshuttle: '{{ 'mode.railshuttle'|trans }}',
  65. rapidtransit: '{{ 'mode.rapidtransit'|trans }}',
  66. train_rapidtransit: '{{ 'mode.train_rapidtransit'|trans }}',
  67. shuttle: '{{ 'mode.shuttle'|trans }}',
  68. parkandride: '{{ 'mode.parkandride'|trans }}',
  69. park: '{{ 'mode.park'|trans }}',
  70. airpark: '{{ 'mode.airpark'|trans }}',
  71. flight: '{{ 'mode.flight'|trans }}',
  72. ridesharing: '{{ 'mode.ridesharing'|trans }}',
  73. ridesharing_external: '{{ 'mode.ridesharing_external'|trans }}',
  74. ridesharingad: '{{ 'mode.ridesharingad'|trans }}',
  75. bikesharingstation: '{{ 'mode.bikesharingstation'|trans }}',
  76. carrental: '{{ 'mode.carrental'|trans }}',
  77. carrentalcheckin: '{{ 'mode.carrentalcheckin'|trans }}',
  78. carrentalcheckout: '{{ 'mode.carrentalcheckout'|trans }}',
  79. ridesharingcheckin: '{{ 'mode.ridesharingcheckin'|trans }}',
  80. ridesharingcheckout: '{{ 'mode.ridesharingcheckout'|trans }}'
  81. },
  82. pendingSearch: '{{ 'journey.pending_search'|trans }}',
  83. pdfGenerating: '{{ 'journey.pdf_generating'|trans }}',
  84. pdfGenerationError: '{{ 'journey.pdf_generation_error'|trans }}',
  85. back: '{{ 'nav.back'|trans }}',
  86. datetimeChosenValue: '{{ 'date.datetime_chosen_value'|trans }}',
  87. dateChosenValue: '{{ 'date.date_chosen_value'|trans }}',
  88. timeChosenValue: '{{ 'date.time_chosen_value'|trans }}',
  89. selectYear: '{{ 'date.select_year'|trans }}',
  90. selectMonth: '{{ 'date.select_month'|trans }}',
  91. selectDay: '{{ 'date.select_day'|trans }}',
  92. selectHour: '{{ 'date.select_hour'|trans }}',
  93. selectMinute: '{{ 'date.select_minute'|trans }}',
  94. months: {
  95. january: '{{ 'date.months.january'|trans }}',
  96. february: '{{ 'date.months.february'|trans }}',
  97. march: '{{ 'date.months.march'|trans }}',
  98. april: '{{ 'date.months.april'|trans }}',
  99. may: '{{ 'date.months.may'|trans }}',
  100. june: '{{ 'date.months.june'|trans }}',
  101. july: '{{ 'date.months.july'|trans }}',
  102. august: '{{ 'date.months.august'|trans }}',
  103. september: '{{ 'date.months.september'|trans }}',
  104. october: '{{ 'date.months.october'|trans }}',
  105. november: '{{ 'date.months.november'|trans }}',
  106. december: '{{ 'date.months.december'|trans }}'
  107. },
  108. autocomplete: {
  109. searchLoading: '{{ 'autocomplete.search_loading'|trans }}',
  110. defaultNotice: '{{ 'autocomplete.default_notice'|trans }}',
  111. selectedValue: '{{ 'autocomplete.selected_value'|trans }}',
  112. noSuggestion: "{{ 'autocomplete.no_suggestions_new_format'|trans({ 'contactUrl': contactUrl })|raw|escape('js') }}",
  113. noExactSuggestion: '{{ 'autocomplete.no_exact_suggestion_new_format'|trans({ 'contactUrl': contactUrl })|raw|escape('js') }}',
  114. suggestionsFound: '{{ 'autocomplete.suggestions_found'|trans }}',
  115. resetLabel: '{{ 'autocomplete.reset'|trans }}',
  116. checkLabel: '{{ 'autocomplete.check'|trans }}',
  117. resultsFound: '{{ 'autocomplete.found_results'|trans }}',
  118. noSuggestionSelected: '{{ 'autocomplete.no_suggestion_selected'|trans }}',
  119. {# Clé Lokalise : 'Veuillez renseigner au moins {nbChars} caractères.' - vide tant qu'elle n'est pas importée (repli JS) #}
  120. {% set autocompleteMinCharsMessage = 'autocomplete.min_chars'|trans({ 'nbChars': autocomplete_min_chars is defined ? autocomplete_min_chars : 3 }) %}
  121. minChars: "{{ autocompleteMinCharsMessage != 'autocomplete.min_chars' ? autocompleteMinCharsMessage|escape('js') : '' }}",
  122. notice: '{{ 'autocomplete.notice'|trans }}',
  123. my_position: '{{ 'my_position'|trans }}'
  124. },
  125. loader: {
  126. search: '{{ 'loader.search'|trans }}',
  127. journeySearch: '{{ 'loader.journey_search'|trans }}',
  128. localitySearch: '{{ 'loader.locality_search'|trans }}',
  129. stopareaSearch: '{{ 'loader.stoparea_search'|trans }}',
  130. lineSearch: '{{ 'loader.line_search'|trans }}',
  131. stoppointSearch: '{{ 'loader.stoppoint_search'|trans }}'
  132. },
  133. error: {
  134. ticketing_download: '{{ 'ticketing.download_error' | trans }}',
  135. journey_same_address: '{{ 'journey.same_address' | trans }}',
  136. select_payment_card: '{{ 'payment.tokens.error.select_payment_card' | trans }}',
  137. outward_return_dates_error: '{{ 'outward_return_dates_error' | trans }}'
  138. },
  139. direction: '{{ 'schedule.direction' | trans }}',
  140. ticketing: {
  141. payment: {
  142. success: '{{ 'ticketing.payment.operator.success' | trans }}',
  143. failure: '{{ 'ticketing.payment.operator.failure' | trans }}',
  144. error_select: '{{ 'ticketing.payment.operator.error_select' | trans }}'
  145. }
  146. },
  147. forms: {
  148. agreeTerms: "{{ 'messagesErrors.forms.agreeTerms' | trans }}",
  149. selectAddress: "{{ 'messagesErrors.forms.selectAddress' | trans }}",
  150. captcha: "{{ 'messagesErrors.forms.captcha' | trans }}",
  151. error: "{{ 'get.data.error.message' | trans }}"
  152. },
  153. loading: '{{ 'ticketing.loading' | trans }}',
  154. crop_empty: '{{ 'ticketing.order.crop_empty' | trans }}'
  155. },
  156. switchMapMobile: '{{switch_map_mobile is defined ? switch_map_mobile }}',
  157. enableHurryTraveler: '{{enable_hurry_traveler is defined ? enable_hurry_traveler }}',
  158. limitPlacesResults: '{{ limit_places_results is defined ? limit_places_results }}',
  159. autocompleteMinChars: {{ autocomplete_min_chars is defined ? autocomplete_min_chars : 3 }},
  160. };
  161. var journeyConfig = null,
  162. ticketingConfig = null,
  163. schedulesConfig = null,
  164. disruptionConfig = null,
  165. mapConfig = null,
  166. accountConfig = null,
  167. newsConfig = null,
  168. alertingConfig = null,
  169. widgetConfig;
  170. journeyConfig = {
  171. placeListPath: oConfig.baseUrl + '{{ path('place.list') }}',
  172. journeyListPath: oConfig.baseUrl + '{{ path('journey.list') }}',
  173. placeFavoritePostPath: oConfig.baseUrl + '{{ path('place.favorite.post') }}',
  174. placeFavoriteDeletePath: oConfig.baseUrl + '{{ path('place.favorite.post') }}',
  175. journeySchedulePath: oConfig.baseUrl + '{{ path('journey.schedule') }}',
  176. contactUrl: '{{ contactUrl }}',
  177. transitPassListPath: '{{ path('transitpass.list') }}',
  178. transitPassPostPath: '{{ path('transitpass.post') }}',
  179. isTransitPassEnabled: {% if isTransitPassEnabled is defined and true == isTransitPassEnabled%}1{% else %}0{% endif %},
  180. sendLogUrl: oConfig.baseUrl + '{{ path('sendlog') }}',
  181. autocompleteMinChars: {{ autocomplete_min_chars is defined ? autocomplete_min_chars : 3 }},
  182. };
  183. disruptionConfig = {
  184. disruptionPath: oConfig.baseUrl + '{{ path('homepage.traffic') }}',
  185. linesAndPoiPath: oConfig.baseUrl + '{{ path('homepage.linesandpoi') }}'
  186. };
  187. alertingConfig = {
  188. alertingCreateSubscriptionsPath: oConfig.baseUrl + '{{ path('alerting.create.subscription') }}',
  189. alertingDeleteSubscriptionsPath: oConfig.baseUrl + '{{ path('alerting.delete.subscription') }}'
  190. };
  191. maasConfig = {
  192. libeloCheckPasswordUrl: '{{ url('bikesharing.check_password', {'bikeSharingType':'libelo'}) }}',
  193. libeloValidateGiftCertificate: '{{ url('bikesharing.validate_gift_certificate', {'bikeSharingType':'libelo'}) }}'
  194. };
  195. schedulesConfig = {
  196. schedulesPath: oConfig.baseUrl + '{{ path('schedule') }}',
  197. lineDirectionListPath: oConfig.baseUrl + '{{ path('line.direction.list') }}',
  198. lineSchedulesPath: oConfig.baseUrl + '{{ path('line.schedule.list.generic') }}',
  199. stopareaSchedulesPath: oConfig.baseUrl + '{{ path('stoparea.schedule.list.generic') }}',
  200. lineSchedulesTodPath: oConfig.baseUrl + '{{ path('line.schedule.tod_list.generic') }}',
  201. localityLinesPath: oConfig.baseUrl + '{{ path('line.locality.list.generic') }}',
  202. getStopPointSchedules: oConfig.baseUrl + '{{ path('stoppoint.schedule.list.generic') }}',
  203. scheduleListPath: oConfig.baseUrl + '{{ path('schedule.list') }}',
  204. bookingStopAreasListPath: oConfig.baseUrl + '{{ path('booking.stoparea.list') }}',
  205. bookingStopAreasDestinationListPath: oConfig.baseUrl + '{{ path('booking.stoparea.destination') }}',
  206. bookingStopAreasTimeSheetsListPath: oConfig.baseUrl + '{{ path('booking.stoparea.timesheets') }}',
  207. createLineStoppointDirectionSchedulePath: oConfig.baseUrl + '{{ path('schedule.favorite.line_stoppoint_direction.post') }}',
  208. scheduleFavoriteListPath: oConfig.baseUrl + '{{ path('schedule.favorite.list') }}',
  209. scheduleFavoriteDeletePath: oConfig.baseUrl + '{{ path('schedule.favorite.post') }}',
  210. scheduleFavoriteLinelistPath: oConfig.baseUrl + '{{ path('schedule.favorite.line.list') }}',
  211. scheduleFavoriteLinePostPath: oConfig.baseUrl + '{{ path('schedule.favorite.line.post') }}',
  212. scheduleFavoriteLineDeletePath: oConfig.baseUrl + '{{ path('schedule.favorite.line.post') }}',
  213. displayAllLinesOnEmptyInputFocus: {{ (app.session is defined and app.session.get('layoutScheduleLine')) ? 'true' : 'false' }}
  214. };
  215. mapConfig = {
  216. zoomDelta: 0,
  217. maxZoom: {{ default_max_zoom }},
  218. minZoom: {{ default_min_zoom }},
  219. geoserver: '{{ geoserver_url }}',
  220. defaultTileLayer: '{{ default_tile_layer }}',
  221. vectorTiles: '{{ vector_tiles }}',
  222. vectorStyle: '{{ vector_style }}',
  223. defaultLatLon: {{ (customLatLon is defined and customLatLon is not empty) ? customLatLon : ((default_latlon is defined and default_latlon is not empty) ? default_latlon : "``") }},
  224. defaultZoom: {{ (customZoom is defined and customZoom is not empty) ? customZoom : default_zoom }},
  225. defaultPoiZoom: {{ default_poi_zoom }},
  226. stoppointUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  227. addressUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/address',
  228. tramUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  229. aerialliftUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  230. metroUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  231. busUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  232. coachUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  233. trainUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stop',
  234. parkUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/park',
  235. markersUrl: oConfig.baseUrl + '{{ path('map.markers') }}',
  236. checkCustomIconUrl: oConfig.baseUrl + '{{ path('map.checkCustomIcon') }}',
  237. linesShapeUrl: oConfig.baseUrl + '{{ path('map.linesShape') }}',
  238. getAllLinesUrl: oConfig.baseUrl + '{{ path('homepage.getAllLines') }}',
  239. getLinesBySubnetworkUrl: oConfig.baseUrl + '{{ path('homepage.getLinesBySubnetwork') }}',
  240. isochronesUrl: oConfig.baseUrl + '{{ path('map.isochrones') }}',
  241. parkandrideUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/parkandrides',
  242. bikesharingstationUrl: oConfig.baseUrl + '/{{ app.request.attributes.get('_locale') }}/carte/bikesharingstation',
  243. carsharingstationUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/carsharingstation',
  244. securebikeparkUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/securebikepark',
  245. bikeparkUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/bikepark',
  246. chargingstationUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/chargingstation',
  247. bikerentalagencyUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/bikerentalagency',
  248. ridesharingparkUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/rideSharingPark',
  249. pointofsaleUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/carte/pointdeventes',
  250. pointofinterestUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/pointofinterest',
  251. taxistationUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/taxistation',
  252. vehicleUrl: oConfig.baseUrl + '{{ path('map.vehicle') }}',
  253. stopAreaUrl: oConfig.baseUrl + '/{{ app.request.getLocale() }}/map/stopArea',
  254. lineByStopPointUrl: oConfig.baseUrl + '{{ path('map.lineByStopPoint') }}',
  255. getRideSharingParksUrl: oConfig.baseUrl + '{{ path('map.ridesharingparks') }}',
  256. userPosition: {
  257. latitude: '',
  258. longitude: ''
  259. },
  260. networkPosition: {
  261. latitude: {{ (network_lat is defined and network_lat is not empty) ? network_lat : "''" }},
  262. longitude: {{ (network_lon is defined and network_lon is not empty) ? network_lon : "''" }},
  263. },
  264. widgetPosition: {
  265. latitude: {{ (islat is defined and islat is not empty) ? islat : "''" }},
  266. longitude: {{ (islon is defined and islon is not empty) ? islon : "''" }}
  267. },
  268. operators: {% if operators is defined %}{{ operators | raw }}{% else %}''{% endif %},
  269. icons: {{ icons | json_encode | raw }},
  270. assetsBucketUrl: '{{ cdn_public_url ~ cdn_public_name ~ '/' }}'
  271. };
  272. {% if referer is not defined %}
  273. {% set referer = '' %}
  274. {% endif %}
  275. accountConfig = {
  276. putAccountAddress: '{{ path('account.global.informations') }}',
  277. addAddress: '{{ path('account.global.add_address') }}',
  278. deleteAddress: '{{ path('account.global.delete_address') }}',
  279. saveAddress: '{{ path('account.global.save_address') }}',
  280. homeUserAccountUrl : '{{ path('account') }}',
  281. loginUrl: '{{ absolute_url(path('user_login', {isModal: 'true'})) }}',
  282. resetPasswordUrl: '{{ absolute_url(path('user_reset_password')) }}',
  283. referer: '{{ referer }}',
  284. updateAccountImagePath: oConfig.baseUrl + '{{ path('account.image') }}',
  285. loginMode: '{{ login_mode }}',
  286. isLoggedIn: {{ is_granted('IS_AUTHENTICATED_REMEMBERED') ? 'true' : 'false' }},
  287. {% if userData is defined %}
  288. userMail: '{% if userData.email is defined %}{{ userData.email }}{% endif %}',
  289. userFirstName: '{% if userData.firstname is defined %}{{ userData.firstname }}{% endif %}',
  290. userPhone: '{% if userData.phone is defined %}{{ userData.phone }}{% endif %}'
  291. {% endif %}
  292. };
  293. {% set widgetParamsProvided = (widgetParams is defined and widgetParams is not empty) ? true : false %}
  294. widgetConfig = {
  295. isWidget: {% if isWidget is defined and isWidget is same as(true) %}true{% else %}false{% endif %},
  296. widgetRequestReferer: '{% if requestReferer is defined and requestReferer is not empty %}{{ requestReferer | raw }}{% endif %}',
  297. isRedirection: {% if isRedirection is defined and isRedirection is same as(true) %}true{% else %}false{% endif %},
  298. isInternal: {% if isInternal is defined and isInternal is same as(true) %}true{% else %}false{% endif %},
  299. isSplit: {% if isSplit is defined and isSplit is same as(false) %}false{% else %}true{% endif %},
  300. widgetTarget: '{% if widgetTarget is defined %}{{ widgetTarget }}{% endif %}',
  301. isPartner: '{% if isPartner is defined %}{{ isPartner }}{% endif %}',
  302. istoken: '{% if istoken is defined %}{{ istoken }}{% endif %}',
  303. isfid: "{% if isfid is defined %}{{ isfid | raw }}{% endif %}",
  304. isfv: "{% if isfv is defined %}{{ isfv | raw }}{% endif %}",
  305. istid: "{% if istid is defined %}{{ istid | raw }}{% endif %}",
  306. istv: "{% if istv is defined %}{{ istv | raw }}{% endif %}",
  307. isflat: "{% if isflat is defined %}{{ isflat }}{% endif %}",
  308. isflon: "{% if isflon is defined %}{{ isflon }}{% endif %}",
  309. istlat: "{% if istlat is defined %}{{ istlat }}{% endif %}",
  310. istlon: "{% if istlon is defined %}{{ istlon }}{% endif %}",
  311. islid: '{% if islid is defined %}{{ islid }}{% endif %}',
  312. isdir: '{% if isdir is defined %}{{ isdir }}{% endif %}',
  313. issaid: '{% if issaid is defined %}{{ issaid }}{% endif %}',
  314. issav: '{% if issav is defined %}{{ issav }}{% endif %}',
  315. islocid: '{% if islocid is defined %}{{ islocid }}{% endif %}',
  316. isspid: '{% if isspid is defined %}{{ isspid }}{% endif %}',
  317. issubnet: '{% if issubnet is defined %}{{ issubnet }}{% endif %}',
  318. ismode: '{% if ismode is defined %}{{ ismode }}{% endif %}',
  319. islsn: '{% if islsn is defined %}{{ islsn }}{% endif %}',
  320. issubnetworks: '{% if issubnetworks is defined %}{{ issubnetworks }}{% endif %}',
  321. external_widget_redirection: '{% if external_widget_redirection is defined %}{{ external_widget_redirection }}{% endif %}',
  322. external_widget_redirection_url: '{% if external_widget_redirection_url is defined %}{{ external_widget_redirection_url }}{% endif %}',
  323. widgetParams: {
  324. css: {{ ((isWidget is not defined or (isWidget is defined and isWidget is not same as(true))) and (widgetParamsProvided and widgetParams['css'] is defined and not widgetParams['css'])) ? 'false' : 'true' }},
  325. autocompleteModal: {{ network_id == 22 ? 'true' : 'false' }}
  326. },
  327. {% if widgetType is defined and widgetType is not empty %}
  328. widgetType: '{{ widgetType }}',
  329. {% endif %}
  330. };
  331. window.i18n = {
  332. showMenu: "{{ 'nav.show_menu' | trans }}",
  333. hideMenu: "{{ 'nav.hide_menu' | trans }}",
  334. datetimeFormat: "{{ 'date.datetimeFormat' | trans }}",
  335. dateFormat: "{{ 'date.dateFormat' | trans }}",
  336. displayedDateFormat: "{{ 'date.displayedDateFormat' | trans }}",
  337. labelDateFormat: "{{ 'date.labelDateFormat' | trans }}",
  338. timeFormat: "{{ 'date.timeFormat' | trans }}",
  339. displayedTimeFormat: "{{ 'date.displayedTimeFormat' | trans }}",
  340. prevDateButtonLabel: "{{ 'date.prevDateButtonLabel' | trans }}",
  341. nextDateButtonLabel: "{{ 'date.nextDateButtonLabel' | trans }}",
  342. prevTimeButtonLabel: "{{ 'date.prevTimeButtonLabel' | trans }}",
  343. nextTimeButtonLabel: "{{ 'date.nextTimeButtonLabel' | trans }}",
  344. departureTime: "{{ 'date.departureTime' | trans }}",
  345. close: "{{ 'close' | trans }}",
  346. leaveFrom: "{{ 'map.context-menu.start' | trans }}",
  347. goTo: "{{ 'map.context-menu.arrival' | trans }}",
  348. centerHere: "{{ 'map.context-menu.center-here' | trans }}",
  349. accessTime: "{{ 'isochrones.access_time' | trans }}",
  350. address: "{{ 'isochrones.address' | trans }}",
  351. zoomIn: '{{ 'map.context-menu.zoom-in' | trans }}',
  352. zoomOut: '{{ 'map.context-menu.zoom-out' | trans }}',
  353. start: '{{ 'journey.departure' | trans | lower }}',
  354. arrival: '{{ 'journey.arrival' | trans | lower }}',
  355. stage_placeholder: '{{ 'journey.stage_placeholder' | trans }}',
  356. from : '{{ 'from' | trans | capitalize }}',
  357. deleteAccountSuccess: '{{ 'user.account_delete.success' | trans }}',
  358. label: {
  359. dateNotAvailable: "{{ 'schedule.label.date_not_available' | trans }}"
  360. },
  361. popup: {
  362. leave: "{{ 'map.popup.leave' | trans }}",
  363. goTo: "{{ 'map.popup.go-to' | trans }}",
  364. stepVia: "{{ 'map.popup.step-via' | trans }}",
  365. streetView: "{{ 'map.popup.street-view' | trans }}",
  366. favorite: "{{ 'map.popup.favorite' | trans }}"
  367. },
  368. messagesErrors: {
  369. errorInternetConnection: "{{ 'messagesErrors.errorInternetConnection' | trans }}",
  370. refreshBrowser: "{{ 'messagesErrors.refreshBrowser' | trans }}",
  371. errorServer: "{{ 'messagesErrors.errorServer' | trans }}",
  372. itineraryNotAvailable: "{{ 'itinerary.not_available' | trans }}",
  373. tryLater: "{{ 'try_later' | trans }}",
  374. emptyVia: "{{ 'messagesErrors.place.empty.via' | trans }}",
  375. emptySchedule: "{{ 'messagesErrors.schedule.empty.emptySchedule' | trans }}",
  376. invalidSchedule: "{{ 'messagesErrors.schedule.invalid.invalidSchedule' | trans }}",
  377. emptyModes: "{{ 'messagesErrors.place.empty.modes' | trans }}",
  378. emptyDeparture: "{{ 'messagesErrors.place.empty.from' | trans }}",
  379. emptyArrival: "{{ 'messagesErrors.place.empty.to' | trans }}",
  380. emptyDepartureArrival: "{{ 'messagesErrors.place.empty.emptyDepartureAndArrival' | trans}}",
  381. invalidDeparture: "{{ 'messagesErrors.place.invalid.departure' | trans }}",
  382. invalidArrival: "{{ 'messagesErrors.place.invalid.arrival' | trans }}",
  383. invalidVia: "{{ 'messagesErrors.place.invalid.via' | trans }}",
  384. emptyUsername: "{{ 'messagesErrors.userAccount.emptyUsername' | trans }}",
  385. emptyPassword: "{{ 'messagesErrors.userAccount.emptyPassword' | trans }}",
  386. wrongUsername: "{{ 'messagesErrors.userAccount.wrongUsername' | trans }}",
  387. infoPassword: "{{ 'subscription.password_min_characters' | trans }}",
  388. Email: "{{ 'messagesErrors.userAccount.emptyEmail' | trans }}",
  389. emptyCode: "{{ 'messagesErrors.userAccount.emptyCode' | trans }}",
  390. emptyFirstname: "{{ 'messagesErrors.userAccount.emptyFirstname' | trans }}",
  391. emptyLastname: "{{ 'messagesErrors.userAccount.emptyLastname' | trans }}",
  392. emptyPassword: "{{ 'messagesErrors.userAccount.emptyPassword' | trans }}",
  393. emptyPasswordConfirm: "{{ 'messagesErrors.userAccount.emptyPasswordConfirm' | trans }}",
  394. wrongPasswordAndConfirm: "{{ 'subscription.wrong_passwords' | trans }}",
  395. helpMessageItinerary: "{{ 'messagesError.place.chooseFromList' | trans}}",
  396. errorOccured: "{{ 'error.occured' | trans }}"
  397. },
  398. positive_elevation: "{{ 'positive_elevation' | trans }} ",
  399. distance_km: "{{ 'distance_km' | trans }} ",
  400. altitude_m: "{{ 'altitude_m' | trans }} ",
  401. geolocation_not_supported_by_browser: "{{ 'geolocation_not_supported_by_browser' | trans }} ",
  402. favoriteAddButton: "{{ 'place.favorite.action.add' | trans }}",
  403. favoriteEditButton: "{{ 'place.favorite.action.edit' | trans }}",
  404. favorite: {
  405. addModalLabel: "{{ 'place.favorite.add_modal.label' | trans }}",
  406. addModalValidate: "{{ 'place.favorite.add_modal.validate' | trans }}",
  407. editModalLabel: "{{ 'place.favorite.edit_modal.label' | trans }}",
  408. deleteConfirm: "{{ 'place.favorite.delete_confirm' | trans }}",
  409. deleteLabel: "{{ 'place.favorite.delete_label' | trans }}",
  410. deleteValidate: "{{ 'place.favorite.delete_validate' | trans }}",
  411. picto: {
  412. 'home': "{{ 'place.favorite.picto.home' | trans }}",
  413. 'work': "{{ 'place.favorite.picto.work' | trans }}",
  414. 'unset': "{{ 'place.favorite.picto.unset' | trans }}"
  415. },
  416. editModalTitle: {
  417. 'home': "{{ 'place.favorite.edit_modal.homeTitle' | trans }}",
  418. 'work': "{{ 'place.favorite.edit_modal.workTitle' | trans }}"
  419. },
  420. editModalSave: "{{ 'place.favorite.edit_modal.save' | trans }}",
  421. editModalUpdate: "{{ 'place.favorite.edit_modal.update' | trans }}",
  422. editModalCancel: "{{ 'place.favorite.edit_modal.cancel' | trans }}",
  423. editModalPlaceholder: "{{ 'place.favorite.edit_modal.placeholder' | trans }}",
  424. subscribeAlert: "{{ 'place.favorite.action.subscribe_alert' | trans }}",
  425. unsubscribeAlert: "{{ 'place.favorite.action.unsubscribe_alert' | trans }}",
  426. subscribeAlertSuccess: "{{ 'place.favorite.info.favorite_success' | trans}}",
  427. subscribeAlertError: "{{ 'place.favorite.info.favorite_error' | trans}}",
  428. unsubscribeAlertSuccess: "{{ 'place.favorite.info.unsubscribe_favorite_success' | trans}}",
  429. unsubscribeAlertError: "{{ 'place.favorite.info.unsubscribe_favorite_error' | trans}}",
  430. scheduleSubscribeAlertSuccess: "{{ 'schedule.favorite.info.favorite_success' | trans}}",
  431. scheduleSubscribeAlertError: "{{ 'schedule.favorite.info.favorite_error' | trans}}",
  432. scheduleUnsubscribeAlertSuccess: "{{ 'schedule.favorite.info.unsubscribe_favorite_success' | trans}}",
  433. scheduleUnsubscribeAlertError: "{{ 'schedule.favorite.info.unsubscribe_favorite_error' | trans}}",
  434. noResultMessage: "{{ 'place.favorite.no_result_message' | trans}}",
  435. schedule: {
  436. addModalLabel: "{{ 'schedule.favorite.add_modal' | trans }}",
  437. deleteConfirm: "{{ 'schedule.favorite.delete_confirm' | trans }}",
  438. linePlaceholder: "{{ 'schedule.favorite.inputs.line.placeholder' | trans }}",
  439. directionPlaceholder: "{{ 'schedule.favorite.inputs.direction.placeholder' | trans }}",
  440. stoppointPlaceholder: "{{ 'schedule.favorite.inputs.stoppoint.placeholder' | trans }}",
  441. lineLabel: "{{ 'schedule.favorite.inputs.line.label' | trans }}",
  442. directionLabel: "{{ 'schedule.favorite.inputs.direction.label' | trans }}",
  443. stoppointLabel: "{{ 'schedule.favorite.inputs.stoppoint.label' | trans }}",
  444. addModalSave: "{{ 'schedule.favorite.action.add' | trans }}",
  445. addModalCancel: "{{ 'schedule.favorite.action.cancel' | trans }}",
  446. addNewButton: "{{ 'schedule.favorite.add_new_button' | trans }}",
  447. noResultMessage: "{{ 'schedule.favorite.no_result_message' | trans }}"
  448. }
  449. },
  450. schedules: {
  451. modalInputLabel: '{{ 'widgets_tabs.schedules' | trans }}',
  452. nextDepartures: '{{ 'schedule.next_departures' | trans }}',
  453. stopAreaLines: '{{ 'schedule.lines_in_this_stoparea' | trans }}',
  454. direction: '{{ 'schedule.direction' | trans }}',
  455. add_to_favorites: "{{ 'schedule.add_to_favorites' | trans }}",
  456. remove_from_favorites: "{{ 'schedule.remove_from_favorites' | trans }}"
  457. },
  458. poi: {
  459. totalPark: '{{ 'poi.totalPark' | trans }}',
  460. covered: '{{ 'poi.covered' | trans }}',
  461. notCovered: '{{ 'poi.notCovered' | trans }}',
  462. network: '{{ 'poi.network' | trans }}',
  463. availableParks: "{{ 'journey.available_parks' | trans | raw }}",
  464. bikesAvailable: "{{ 'journey.available_bikes' | trans | raw }}",
  465. bikeChance: "{{ 'journey.available_bikes_chance' | trans | raw }}",
  466. standChance: "{{ 'journey.available_stands_chance' | trans | raw }}",
  467. capacity: '{{ 'journey.park_capacity' | trans | raw }}',
  468. bikepark: '{{ 'poi.bikepark' | trans}}',
  469. bikerentalagency: '{{ 'poi.bikerentalagency' | trans }}',
  470. plateNumber: '{{ 'journey.freefloatingvehiclecheckin.plate_number' | trans }}',
  471. parkAndRide: ' {{ 'PARKANDRIDE' | trans }}',
  472. ridesharingpark: '{{ 'mode.ridesharingpark' | trans }}',
  473. carsharingstation: ' {{ 'place.favorite.type.carsharingstation' | trans }}',
  474. parking: ' {{ 'poi.parking' | trans }}',
  475. securebikepark: ' {{ 'mode.securebikepark' | trans }}',
  476. taxistation: ' {{ 'poi.taxistation' | trans }}',
  477. chargingstation: ' {{ 'poi.chargingstation' | trans }}',
  478. bikesharingstation: '{{ 'mode.bikesharingstation'|trans }}',
  479. parkandride: '{{ 'mode.parkandride'|trans }}'
  480. },
  481. alt: {
  482. park: '{{ 'poi.alt.park' | trans }}',
  483. parkandride: '{{ 'poi.alt.parkandride' | trans }}',
  484. bikesharingstation: '{{ 'poi.alt.bikesharingstation' | trans }}',
  485. bikepark: '{{ 'poi.alt.bikepark' | trans }}',
  486. chargingstation: '{{ 'poi.alt.chargingstation' | trans }}',
  487. freefloatingvehiclecheckin: '{{ 'poi.alt.freefloatingvehiclecheckin' | trans }}'
  488. },
  489. disruption: {
  490. network: '{{ 'traffic_infos.network' | trans}}'
  491. },
  492. addToCalendar: {
  493. addToMyCalendar: '{{ 'user.add_to_my_calendar'|trans }}',
  494. journey: {
  495. title: '{{ 'journey.add_to_calendar.title'|trans }}',
  496. desc: {
  497. departure: '{{ 'journey.add_to_calendar.desc.departure'|trans }}',
  498. arrival: '{{ 'journey.add_to_calendar.desc.arrival'|trans }}',
  499. from: '{{ 'journey.add_to_calendar.desc.from'|trans|raw }}',
  500. to: '{{ 'journey.add_to_calendar.desc.to'|trans|raw }}'
  501. }
  502. }
  503. },
  504. travellerProfile: {
  505. noSubscription: '{{ 'journey.traveller_profile.no_subscriptions'|trans }}',
  506. emptySubscriptionListError: '{{ 'journey.traveller_profile.subscriptions_modal.error.empty_subscriptions_list'|trans }}',
  507. mySubscriptions: '{{ 'journey.traveller_profile.my_subscriptions'|trans }}',
  508. publicTransportsTitle: '{{ 'journey.traveller_profile.subscriptions_modal.public_transports.title'|trans }}',
  509. publicTransportsSubtitle: '{{ 'journey.traveller_profile.subscriptions_modal.public_transports.subtitle'|trans }}',
  510. othersModesTitle: '{{ 'journey.traveller_profile.subscriptions_modal.others_modes.title'|trans }}',
  511. othersModesSubtitle: '{{ 'journey.traveller_profile.subscriptions_modal.others_modes.subtitle'|trans }}',
  512. saveAndLeave: '{{ 'journey.traveller_profile.subscriptions_modal.save_and_leave'|trans }}',
  513. continue: '{{ 'journey.traveller_profile.subscriptions_modal.continue'|trans }}',
  514. back: '{{ 'journey.traveller_profile.subscriptions_modal.back'|trans }}',
  515. leave: '{{ 'journey.traveller_profile.subscriptions_modal.leave'|trans }}',
  516. i_understood: '{{ 'journey.traveller_profile.subscriptions_infos_modal.i_understood'|trans }}',
  517. configurationRecordingError: '{{ 'journey.traveller_profile.subscriptions_modal.error.configuration_recording_failed'|trans }}',
  518. configurationSavedTitle: '{{ 'journey.traveller_profile.subscriptions_modal.configuration_saved'|trans }}',
  519. configurationSavedMessage: '{{ 'journey.traveller_profile.subscriptions_modal.configuration_saved_message'|trans }}'
  520. },
  521. ticketing: {
  522. refundConfirmationTitle: '{{ 'ticketing.account.etickets.refund.modal.success.title' | trans }}',
  523. arrival_city: '{{ 'ticketing.zou_etudes.informations_form.journey.arrival_city.label' | trans }}',
  524. departure_city: '{{ 'ticketing.zou_etudes.informations_form.journey.departure_city.label' | trans }}',
  525. arrival_station: '{{ 'ticketing.zou_etudes.informations_form.journey.arrival_station.label' | trans }}',
  526. departure_station: '{{ 'ticketing.zou_etudes.informations_form.journey.departure_station.label' | trans }}',
  527. choose: '{{ 'ticketing.filters.choose' | trans }}'
  528. },
  529. meta: {
  530. appTitle: "{{ 'app_title'| trans | raw }}",
  531. journeyTitle: "{{ 'meta.journey.title' | trans | raw }}",
  532. journeyDescription: "{{ 'meta.journey.description' | trans | raw }}",
  533. journeyKeywords: "{{ 'meta.home.keywords' | trans | raw }}",
  534. scheduleTitle: "{{ 'meta.schedule.schedule.title_new_format' | trans | raw}}",
  535. scheduleDescription: "{{ 'meta.schedule.line-schedules.description_new_format' | trans | raw }}",
  536. scheduleKeywords: "{{ 'meta.schedule.keywords' | trans | raw }}",
  537. scheduleText: "{{ 'meta.schedule.schedule.keyword'| trans }}",
  538. disruptionTitle: "{{ 'meta.disruption.title' | trans | raw }}",
  539. disruptionDescription: "{{ 'meta.disruption.description' | trans | raw }}",
  540. disruptionKeywords: "{{ 'meta.disruption.keywords' | trans | raw }}",
  541. disruptionText: "{{ 'disruptions.line'| trans }}",
  542. mapTitle: "{{ 'meta.map.title' | trans | raw }}",
  543. mapDescription: "{{ 'meta.map.description' | trans | raw }}",
  544. mapKeywords: "{{ 'meta.map.keywords' | trans | raw }}",
  545. scheduleText: "{{ 'meta.schedule.schedule.keyword'| trans }}"
  546. }
  547. };
  548. var extend = function(out) {
  549. out = out || {};
  550. for (var i = 1; i < arguments.length; i++) {
  551. var obj = arguments[i];
  552. if (!obj) {
  553. continue;
  554. }
  555. for (var key in obj) {
  556. if (obj.hasOwnProperty(key)) {
  557. out[key] = obj[key];
  558. }
  559. }
  560. }
  561. return out;
  562. };
  563. {#{% if isWidget is defined and isWidget %}#}
  564. extend(window.oConfig, window.oConfig, newsConfig, journeyConfig, ticketingConfig, schedulesConfig, alertingConfig, maasConfig, disruptionConfig, mapConfig, accountConfig, widgetConfig);
  565. {#{% endif %}#}