work on event editing in dashboard part 5 (image link)

This commit is contained in:
NovaFox161
2018-03-12 11:38:22 -05:00
parent 1435a9a7e1
commit 19fa981e19
3 changed files with 18 additions and 0 deletions

View File

@@ -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);
}

View File

@@ -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";