|
|
|
@ -300,7 +300,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(` |
|
|
|
<span id="${activityData[entry].activityUid}" class="activity"> |
|
|
|
<div class="activity-title">Event: <textarea class="admin-textarea">${activityData[entry].title}</textarea></div> |
|
|
|
@ -317,7 +317,7 @@ function get_admin(type) { |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
`)
|
|
|
|
} else if (activityData[entry].type = "treasure") { |
|
|
|
} else if (activityData[entry].type == "treasure") { |
|
|
|
$("#admin-content").prepend(` |
|
|
|
<span id="${activityData[entry].activityUid}" class="activity"> |
|
|
|
<div class="activity-title">Trésor: <textarea class="admin-textarea">${activityData[entry].title}</textarea></div> |
|
|
|
@ -642,7 +642,7 @@ $('#treasure-popup-button').click((e) => { |
|
|
|
var tuid = $('#treasure-popup-uid').val(); |
|
|
|
if(tuid != '') { |
|
|
|
indata.treasureUid = tuid; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
fr.addEventListener('load', () => { |
|
|
|
indata.image = fr.result; |
|
|
|
@ -652,7 +652,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(); |
|
|
|
@ -664,7 +664,7 @@ $('#treasure-popup-button').click((e) => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fr.readAsDataURL(f); |
|
|
|
}); |
|
|
|
@ -830,7 +830,7 @@ function updateDemandes() { |
|
|
|
else |
|
|
|
$elem.addClass('treasure-submitted'); |
|
|
|
$elem.find(".treasure-btn-submit").text('Editer la soumission'); |
|
|
|
|
|
|
|
|
|
|
|
$(`<div class="treasure-image">Image: <a href="${base_url}images/${td[td_uid].image}.html" target="_blank"> Lien</a></div>`).insertAfter($elem.find('.treasure-desc')) |
|
|
|
$(`<div class="treasure-user-desc">${td[td_uid].desc}</div>`).insertAfter($elem.find('.treasure-desc')) |
|
|
|
$(`<p>Votre soumission :</p>`).insertAfter($elem.find('.treasure-desc')) |
|
|
|
@ -845,7 +845,7 @@ function updateDemandes() { |
|
|
|
console.error(data.why); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|