Commit 222460e0 authored by hypsug0's avatar hypsug0
Browse files

refactor: replace js var with let/const

parent 48b386c0
......@@ -32,7 +32,7 @@ $(document).on('click', '.table-responsive [data-toggle="dropdown"]', () => {
$buttonGroup = $(this).parent()
if (!$buttonGroup.attr('data-attachedUl')) {
var ts = +new Date()
const ts = +new Date()
$ul = $(this).siblings('ul')
$ul.attr('data-parent', ts)
$buttonGroup.attr('data-attachedUl', ts)
......@@ -49,7 +49,7 @@ $(document).on('click', '.table-responsive [data-toggle="dropdown"]', () => {
dropDownFixPosition($(this).parent(), $ul)
const dropDownFixPosition = (button, dropdown) => {
var dropDownTop = button.offset().top + button.outerHeight()
const dropDownTop = button.offset().top + button.outerHeight()
dropdown.css('top', dropDownTop + 'px')
dropdown.css('left', button.offset().left + 'px')
dropdown.css('position', 'absolute')
......@@ -282,9 +282,9 @@ const placeSearchBlock = () => {
const detailRows = []
$('#place_results tbody').on('click', 'tr td.details-control', function () {
var tr = $(this).closest('tr')
var row = table.row(tr)
var idx = $.inArray(tr.attr('id'), detailRows)
const tr = $(this).closest('tr')
const row = table.row(tr)
const idx = $.inArray(tr.attr('id'), detailRows)
if (row.child.isShown()) {
tr.removeClass('details')
......@@ -412,8 +412,8 @@ const placeSearchBlock = () => {
L.geoJSON(data, {
style: polygon_style,
onEachFeature: function onEachFeature(feature, layer) {
var props = feature.properties
var content =
const props = feature.properties
const content =
'<h3>MetaSite&nbsp;:&nbsp;' +
props.name +
'</h3><p><ul><li><b>Type</b>: ' +
......@@ -589,7 +589,7 @@ const placeDetailMap = () => {
const map_init_basic = (map, options, marker) => {
// Géolocalisation de l'utilisateur
var locateOptions = {
const locateOptions = {
flyTo: true,
title: 'Ma position',
icon: 'fa fa-location-arrow',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment