mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-02-11 22:18:27 -06:00
work on event editing in dashboard part 5 (image link)
This commit is contained in:
@@ -5,6 +5,7 @@ import com.cloudcraftgaming.discal.api.database.DatabaseManager;
|
||||
import com.cloudcraftgaming.discal.api.enums.event.EventColor;
|
||||
import com.cloudcraftgaming.discal.api.enums.event.EventFrequency;
|
||||
import com.cloudcraftgaming.discal.api.object.calendar.CalendarData;
|
||||
import com.cloudcraftgaming.discal.api.object.event.EventData;
|
||||
import com.cloudcraftgaming.discal.api.object.event.Recurrence;
|
||||
import com.cloudcraftgaming.discal.api.object.web.WebGuild;
|
||||
import com.cloudcraftgaming.discal.api.utils.ExceptionHandler;
|
||||
@@ -141,6 +142,10 @@ public class EventEndpoint {
|
||||
jo.put("recurrence", rjo);
|
||||
}
|
||||
|
||||
EventData ed = DatabaseManager.getManager().getEventData(Long.valueOf(g.getId()), e.getId());
|
||||
|
||||
jo.put("image", ed.getImageLink());
|
||||
|
||||
eventsJson.add(jo);
|
||||
}
|
||||
|
||||
|
||||
@@ -390,6 +390,19 @@ function getEventsForSelectedDate() {
|
||||
form.appendChild(document.createElement("br"));
|
||||
form.appendChild(document.createElement("br"));
|
||||
|
||||
//Image
|
||||
var imageLabel = document.createElement("label");
|
||||
imageLabel.innerHTML = "Image";
|
||||
imageLabel.appendChild(document.createElement("br"));
|
||||
form.appendChild(imageLabel);
|
||||
var image = document.createElement("input");
|
||||
image.name = "image";
|
||||
image.type = "text";
|
||||
image.value = event.image;
|
||||
imageLabel.appendChild(image);
|
||||
form.appendChild(document.createElement("br"));
|
||||
form.appendChild(document.createElement("br"));
|
||||
|
||||
//ID for API
|
||||
var hiddenId = document.createElement("input");
|
||||
hiddenId.type = "hidden";
|
||||
|
||||
Reference in New Issue
Block a user