From b1b3c9c836464b3426ff9bb41e664f78e49c48ef Mon Sep 17 00:00:00 2001
From: Traboulsi <salam.traboulsi@hft-stuttgart.de>
Date: Sat, 23 Dec 2023 15:47:43 +0000
Subject: [PATCH] Update public/js/add_content.js

---
 public/js/add_content.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/public/js/add_content.js b/public/js/add_content.js
index 74ce7e6..a429dbd 100644
--- a/public/js/add_content.js
+++ b/public/js/add_content.js
@@ -88,10 +88,10 @@ function addcontent(item) {
     var customColor = '#8A2BE2';
     //var imageSize = '5px'; // Adjust this value to your desired size
 
-    sdgProjectHTML = `<a class="btn btn-sm btn-outline- mt-1" style="color: ${customColor}; border-color: ${customColor};" href="javascript:void(0);" onclick="changeImage('${sdgProjectLink}')"><img src="imgs/thumbnails/SDG-HFT.png" alt="SDG Project Image" class="btn-outline-" style="max-width:100px ; max-height:60px;"></a> &nbsp;`;
+    sdgProjectHTML = `<a class="btn btn-sm btn-outline- mt-1" style="color: ${customColor}; border-color: ${customColor};" href="javascript:void(0);" onclick="document.querySelector('.btn-outline- img').src='${sdgProjectLink}'; document.querySelector('.btn-outline- img').alt='SDG Project Image'; document.querySelector('.btn-outline- img').onclick=function(){window.open('${sdgProjectLink}', '_blank');}"><img src="imgs/thumbnails/SDG-HFT.png" alt="SDG Project Image" class="btn-outline-" style="max-width:100px ; max-height:60px;"></a> &nbsp;`;
 
     // Add a JavaScript function to change the image and open the link
-    sdgProjectHTML += `
+   /* sdgProjectHTML += `
     <script>
         function changeImage(sdgProjectLink) {
             var img = document.querySelector('.btn-outline- img');
@@ -99,7 +99,7 @@ function addcontent(item) {
             img.alt = 'SDG Project Image';
             window.open(sdgProjectLink, '_blank');
         }
-    </script>`;
+    </script>`;*/
     }
 
 
-- 
GitLab