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