From 9bfd55c7df7488fe3bf4fab32104e67ada06e43c Mon Sep 17 00:00:00 2001 From: Pierre Date: Tue, 24 Apr 2018 20:19:00 +0200 Subject: [PATCH] Fixed issue on iOS 9 --- assets/js/components/conversations/unreadDropdown.js | 4 ++-- assets/js/components/friends/listModal.js | 4 ++-- assets/js/components/friends/utils.js | 2 +- assets/js/components/languagePicker.js | 4 ++-- assets/js/components/notifications/dropdown.js | 2 +- assets/js/components/notifications/utils.js | 2 +- assets/js/pages/latestPosts/main.js | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/assets/js/components/conversations/unreadDropdown.js b/assets/js/components/conversations/unreadDropdown.js index 7bcee0f0..9e3a8a0f 100644 --- a/assets/js/components/conversations/unreadDropdown.js +++ b/assets/js/components/conversations/unreadDropdown.js @@ -115,7 +115,7 @@ ComunicWeb.components.conversations.unreadDropdown = { var usersID = []; //Process the list of conversations - for (let index = 0; index < conversations.length; index++) { + for (var index = 0; index < conversations.length; index++) { const entry = conversations[index]; var userID = entry.userID; @@ -153,7 +153,7 @@ ComunicWeb.components.conversations.unreadDropdown = { target.innerHTML = ""; //Process each conversation - for (let index = 0; index < conversations.length; index++) { + for (var index = 0; index < conversations.length; index++) { //Get the conversation const conversation = conversations[index]; diff --git a/assets/js/components/friends/listModal.js b/assets/js/components/friends/listModal.js index 4873b217..e6e852c7 100644 --- a/assets/js/components/friends/listModal.js +++ b/assets/js/components/friends/listModal.js @@ -179,7 +179,7 @@ ComunicWeb.components.friends.listModal = { } //Parse the list of friends - ids.forEach(id => { + ids.forEach(function(id){ //Display the user const userContainer = createElem2({ @@ -253,7 +253,7 @@ ComunicWeb.components.friends.listModal = { } //Display each friend - list.forEach(friend => { + list.forEach(function(friend){ //Display the friend ComunicWeb.components.friends.ui.show_personnal_friend(listTarget, friend, users["user-"+friend.ID_friend]); diff --git a/assets/js/components/friends/utils.js b/assets/js/components/friends/utils.js index c44ca9cd..07bf42be 100644 --- a/assets/js/components/friends/utils.js +++ b/assets/js/components/friends/utils.js @@ -16,7 +16,7 @@ ComunicWeb.components.friends.utils = { //Parse the list usersID = []; - list.forEach(friend => { + list.forEach(function(friend){ //Extract user id usersID.push(friend.ID_friend); }); diff --git a/assets/js/components/languagePicker.js b/assets/js/components/languagePicker.js index e66f7ae9..3be174fc 100644 --- a/assets/js/components/languagePicker.js +++ b/assets/js/components/languagePicker.js @@ -69,7 +69,7 @@ ComunicWeb.components.langPicker = { ]; var buttons = []; - langs.forEach(lang => { + langs.forEach(function(lang){ const button = createElem2({ appendTo: modalBody, @@ -118,7 +118,7 @@ ComunicWeb.components.langPicker = { //Restart the app ComunicWeb.common.system.reset(); } - buttons.forEach(btn => {btn.onclick = respond;}); + buttons.forEach(function(btn){btn.onclick = respond;}); //Make the buttons live cancelButton.onclick = closeModal; diff --git a/assets/js/components/notifications/dropdown.js b/assets/js/components/notifications/dropdown.js index 3c76de36..915e7299 100644 --- a/assets/js/components/notifications/dropdown.js +++ b/assets/js/components/notifications/dropdown.js @@ -171,7 +171,7 @@ ComunicWeb.components.notifications.dropdown = { list.innerHTML = ""; //Process the list of notifications - for (let i = 0; i < result.length; i++) { + for (var i = 0; i < result.length; i++) { const notification = result[i]; //Display the notification diff --git a/assets/js/components/notifications/utils.js b/assets/js/components/notifications/utils.js index 6c2d3eb1..7b9d429d 100644 --- a/assets/js/components/notifications/utils.js +++ b/assets/js/components/notifications/utils.js @@ -16,7 +16,7 @@ ComunicWeb.components.notifications.utils = { var users = []; - for (let index = 0; index < list.length; index++) { + for (var index = 0; index < list.length; index++) { const notif = list[index]; if(!users.includes(notif.from_user_id)) diff --git a/assets/js/pages/latestPosts/main.js b/assets/js/pages/latestPosts/main.js index 6a6fe646..c26e439a 100644 --- a/assets/js/pages/latestPosts/main.js +++ b/assets/js/pages/latestPosts/main.js @@ -121,7 +121,7 @@ ComunicWeb.pages.latestPosts.main = { _display_list: function(list, target){ //Process the list of posts - for (let index = 0; index < list.length; index++) { + for (var index = 0; index < list.length; index++) { //Display the post ComunicWeb.components.posts.ui.display_post(list[index], target);