From 956b570f67d737cd37af7cdd97da21309f742988 Mon Sep 17 00:00:00 2001 From: asyncnomi Date: Mon, 9 Jan 2023 10:38:50 +0100 Subject: [PATCH] bla --- static/js/main.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index dd6cfb4..88fb4c3 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -289,7 +289,7 @@ function get_admin(type) { } activityData.sort((a, b) => new Date(a.start) - new Date(b.start)); for (entry in activityData) { - if (activityData[entry].type = "event") { + if (activityData[entry].type == "event") { $("#admin-content").append(`
Event:
@@ -306,7 +306,7 @@ function get_admin(type) {
`) - } else if (activityData[entry].type = "treasure") { + } else if (activityData[entry].type == "treasure") { $("#admin-content").prepend(`
Trésor:
@@ -631,7 +631,7 @@ $('#treasure-popup-button').click((e) => { var tuid = $('#treasure-popup-uid').val(); if(tuid != '') { indata.treasureUid = tuid; - } + } fr.addEventListener('load', () => { indata.image = fr.result; @@ -641,7 +641,7 @@ $('#treasure-popup-button').click((e) => { data: JSON.stringify(indata), contentType: "application/json; charset=utf-8", dataType: "json", - + success: function(data) { if(data.success) { updateDemandes(); @@ -653,7 +653,7 @@ $('#treasure-popup-button').click((e) => { }); }); - + fr.readAsDataURL(f); }); @@ -816,7 +816,7 @@ function updateDemandes() { $elem = $('#' + td[td_uid].activityUid); $elem.addClass('treasure-submitted'); $elem.find(".treasure-btn-submit").text('Editer la soumission'); - + $(`
Image: Lien
`).insertAfter($elem.find('.treasure-desc')) $(`
${td[td_uid].desc}
`).insertAfter($elem.find('.treasure-desc')) $(`

Votre soumission :

`).insertAfter($elem.find('.treasure-desc')) @@ -831,7 +831,7 @@ function updateDemandes() { console.error(data.why); } } - + }); } }