From c8450f3cb37644a852f07017abda8787c06fae11 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Mon, 30 Jan 2017 12:44:15 +0100 Subject: [PATCH] Changed profile buttons --- website/public/js/friendButtons.js | 32 ++++++++++++++--------------- website/public/js/main.js | 6 +++--- website/public/styles/profile.css | 2 +- website/queries/private_message.php | 4 ++-- website/views/profile.php | 30 ++++++++++++++------------- 5 files changed, 38 insertions(+), 36 deletions(-) diff --git a/website/public/js/friendButtons.js b/website/public/js/friendButtons.js index febc636..d62e919 100644 --- a/website/public/js/friendButtons.js +++ b/website/public/js/friendButtons.js @@ -23,14 +23,14 @@ function placeFriendButtons() { icon1 = "fa-handshake-o"; break; case "1": - value1 = "delete"; - class1 = "red"; - text1 = "Verwijder"; - icon1 = "fa-times"; - value2 = userID; - class2 = "green"; - text2 = "Chat"; - icon2 = "fa-comment-o"; + value1 = userID; + class1 = "green"; + text1 = "Chat"; + icon1 = "fa-comment-o"; + value2 = "delete"; + class2 = "red"; + text2 = "Verwijder"; + icon2 = "fa-times"; break; case "2": value1 = "delete"; @@ -39,14 +39,14 @@ function placeFriendButtons() { icon1 = "fa-cross"; break; case "3": - value1 = "delete"; - class1 = "red"; - text1 = "Weiger"; - icon1 = "fa-times"; - value2 = "accept"; - class2 = "green"; - text2 = "Accepteer"; - icon2 = "fa-check"; + value1 = "accept"; + class1 = "green"; + text1 = "Accepteer"; + icon1 = "fa-check"; + value2 = "delete"; + class2 = "red"; + text2 = "Weiger"; + icon2 = "fa-times"; break; default: console.log(friendshipStatus); diff --git a/website/public/js/main.js b/website/public/js/main.js index 45e4005..07a0cb8 100644 --- a/website/public/js/main.js +++ b/website/public/js/main.js @@ -5,14 +5,14 @@ function fancyText(text) { // Add images and gifs. var regex = /(https?:\/\/.[^ ]*)/ig; text = text.replace(regex, function(link) { - if (link.match(/(https:\/\/.[^ ]*\.(?:png|jpg|jpeg|gif))/ig)) { + if (link.match(/(https?:\/\/.[^ ]*\.(?:png|jpg|jpeg|gif))/ig)) { return "" + link + ""; - } else if (link.match(/(https:\/\/.[^ ]*\.(?:mp4))/ig)) { + } else if (link.match(/(https?:\/\/.[^ ]*\.(?:mp4))/ig)) { return ""; - } else if (link.match(/(https:\/\/.[^ ]*\.(?:ogg))/ig)) { + } else if (link.match(/(https?:\/\/.[^ ]*\.(?:ogg))/ig)) { return "