diff options
Diffstat (limited to 'public/js/main.js')
| -rw-r--r-- | public/js/main.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/public/js/main.js b/public/js/main.js index 3cc144a..39a31f5 100644 --- a/public/js/main.js +++ b/public/js/main.js | |||
| @@ -206,15 +206,12 @@ function checkSocialNetwork(id){ | |||
| 206 | endpoint: 'index.php?head_foot_social_check=' + id, | 206 | endpoint: 'index.php?head_foot_social_check=' + id, |
| 207 | method: 'POST', | 207 | method: 'POST', |
| 208 | onSuccess: (data) => { | 208 | onSuccess: (data) => { |
| 209 | console.log(data); | ||
| 210 | |||
| 211 | checkbox.checked = data.checked; | 209 | checkbox.checked = data.checked; |
| 212 | 210 | document.getElementById(id + '_content').src = 'assets/' + id.split('_')[1] + (data.checked ? '': '-nb') + '.svg'; // assets/facebook.svg ou assets/facebook-nb.svg | |
| 213 | /*const color = checkbox.checked ? "#ff1d04" : "grey"; | 211 | toastNotify('Le logo "' + id.split('_')[1] + '" ' + (data.checked ? 'sera' : 'ne sera pas') + ' affiché aux visiteurs.'); |
| 214 | clicked_menu_entry.querySelector("button").style.color = color;*/ | ||
| 215 | }, | 212 | }, |
| 216 | onFailure: (data) => { | 213 | onFailure: (data) => { |
| 217 | console.log(data); | 214 | console.error(data.message || "Erreur serveur"); |
| 218 | } | 215 | } |
| 219 | }) | 216 | }) |
| 220 | .send({checked: checkbox.checked}); | 217 | .send({checked: checkbox.checked}); |
