This commit is contained in:
asyncnomi 2023-01-10 13:37:49 +01:00
parent a79a8d77ba
commit 6aeca3fc26

View file

@ -307,23 +307,6 @@ function get_admin(type) {
}
break;
case "activity":
$("#admin-content").append(`
<span id="addActivity" class="activity">
<label for="activityType">Choisir une option:</label>
<select name="type" id="activityType">
<option value="event">Event</option>
<option value="treasure">Trésor</option>
</select>
<div class="activity-title">Titre: <textarea class="admin-textarea"></textarea></div>
<div class="activity-desc">Description: <textarea class="admin-textarea"></textarea></div>
<div class="activity-where">Lieu: <textarea class="admin-textarea"></textarea></div>
<div class="activity-start">Début: <input type="datetime-local" class="admin-input-date"></input></div>
<div id="activity-end-add" class="activity-end">Fin: <input type="datetime-local" class="admin-input-date"></input></div>
<span class="activity-btn">
<div id="activity-btn-add">Ajouter une activité</div>
</span>
</span>
`)
let activityData = [];
for (activityUid in data.activityData) {
data.activityData[activityUid].activityUid = activityUid;
@ -367,6 +350,23 @@ function get_admin(type) {
`)
}
}
$("#admin-content").prepend(`
<span id="addActivity" class="activity">
<label for="activityType">Choisir une option:</label>
<select name="type" id="activityType">
<option value="event">Event</option>
<option value="treasure">Trésor</option>
</select>
<div class="activity-title">Titre: <textarea class="admin-textarea"></textarea></div>
<div class="activity-desc">Description: <textarea class="admin-textarea"></textarea></div>
<div class="activity-where">Lieu: <textarea class="admin-textarea"></textarea></div>
<div class="activity-start">Début: <input type="datetime-local" class="admin-input-date"></input></div>
<div id="activity-end-add" class="activity-end">Fin: <input type="datetime-local" class="admin-input-date"></input></div>
<span class="activity-btn">
<div id="activity-btn-add">Ajouter une activité</div>
</span>
</span>
`)
break;
}
refreshListener();
@ -788,7 +788,7 @@ function updateDemandes() {
}),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(data) {
if(data.success) {
if(data.state == "open") {