Skip to content
Snippets Groups Projects
Commit 5b0d3f8f authored by Ruben Backx's avatar Ruben Backx :coffee:
Browse files

Merge branch 'new-markdown-editor' into 'development'

Add mardown editor from chihuahui

See merge request !744
parents 29a59611 d4dc50f8
No related branches found
No related tags found
2 merge requests!745Deploy,!744Add mardown editor from chihuahui
......@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- A table showing request per ta and time since last interaction was added in the lab statistics page. [@hpage](https://gitlab.ewi.tudelft.nl/hpage)
- A few general statistics was added in the lab statistics page. [@hpage](https://gitlab.ewi.tudelft.nl/hpage)
- A bar-graph detailing the assignment breakdown between questions and submissions was added in the lab statistics page. [@hpage](https://gitlab.ewi.tudelft.nl/hpage)
- Use ChihuahUI implementation for markdown editors. [@cedricwilleken](https://gitlab.ewi.tudelft.nl/cedricwilleken)
### Changed
- Written feedback sorting now follows a reverse chronological order. [@hpage](https://gitlab.ewi.tudelft.nl/hpage)
......@@ -23,7 +24,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Text used to indicate the number of times a lab is rescheduled is now more intuitive. [@hpage](https://gitlab.ewi.tudelft.nl/hpage)
- Assistants who couldn't locate students are no longer eligible to receive feedback from those students. [@hpage](https://gitlab.ewi.tudelft.nl/hpage)
### Fixed
- The request history page can now be seen for participants. [@mmadara](https://gitlab.ewi.tudelft.nl/mmadara)
- Teachers can now view their own feedback again. [@hpage](https://gitlab.ewi.tudelft.nl/hpage)
......
......
......@@ -12,7 +12,7 @@ val javaVersion = JavaVersion.VERSION_17
val libradorVersion = "1.3.0"
val labradoorVersion = "1.4.1"
val chihuahUIVersion = "1.0.2"
val chihuahUIVersion = "1.1.0"
val queryDslVersion = "5.0.0"
val csvVersion = "5.8"
val guavaVersion = "32.1.3-jre"
......@@ -393,9 +393,7 @@ dependencies {
implementation("org.webjars:momentjs:2.24.0")
implementation("org.webjars:fullcalendar:5.11.3")
implementation("org.webjars:codemirror:5.62.2")
implementation("org.webjars.npm:simplemde:1.11.2")
implementation("org.webjars.npm:chartjs-adapter-date-fns:3.0.0")
// Library for converting markdown to html
implementation("org.commonmark:commonmark:0.21.0")
......
......
......@@ -23,9 +23,6 @@
<title th:text="|Create session for ${'#' + (ec == null ? edition.id : ec.id)}|"></title>
<script src="/webjars/momentjs/min/moment.min.js"></script>
<link rel="stylesheet" href="/webjars/simplemde/dist/simplemde.min.css" />
<script src="/webjars/simplemde/dist/simplemde.min.js"></script>
</head>
<!--@thymesVar id="ec" type="nl.tudelft.labracore.api.dto.EditionCollectionDetailsDTO"-->
......
......
......@@ -4,22 +4,12 @@
<body>
<th:block th:object="${dto}">
<section th:fragment="extra-info">
<h3 class="font-500 mb-3"><label for="markdown-editor">Extra info</label></h3>
<h3 class="font-500 mb-3"><label for="extra-info">Extra info</label></h3>
<div>
<textarea id="markdown-editor" th:field="*{extraInfo}">some extra info!</textarea>
<textarea id="extra-info" th:field="*{extraInfo}" style="display: none" data-editor="markdown"></textarea>
</div>
<div class="mt-500 underlined"></div>
<script th:inline="javascript" type="text/javascript">
let ide = new SimpleMDE({
element: document.getElementById("markdown-editor"),
forceSync: true,
});
$("#form").submit(() => {
$("#markdown-editor").textContent = ide.value();
});
</script>
</section>
</th:block>
</body>
......
......
......@@ -21,9 +21,6 @@
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{edition/view}">
<head>
<script src="/webjars/momentjs/min/moment.min.js"></script>
<link rel="stylesheet" href="/webjars/simplemde/dist/simplemde.min.css" />
<script src="/webjars/simplemde/dist/simplemde.min.js"></script>
</head>
<!--@thymesVar id="ec" type="nl.tudelft.labracore.api.dto.EditionCollectionDetailsDTO"-->
......
......
......@@ -5,22 +5,17 @@
<body>
<th:block th:object="${qSession}">
<section th:fragment="extra-info">
<h3 class="font-500 mb-3"><label for="markdown-editor">Extra info</label></h3>
<h3 class="font-500 mb-3"><label for="extra-info">Extra info</label></h3>
<div class="article">
<textarea id="markdown-editor" name="extraInfo" th:text="${qSession.extraInfo}">some extra info!</textarea>
<textarea
id="extra-info"
name="extraInfo"
th:text="${qSession.extraInfo}"
style="display: none"
data-editor="markdown"></textarea>
</div>
<div class="mt-500 underlined"></div>
<script th:inline="javascript" type="text/javascript">
let ide = new SimpleMDE({
element: document.getElementById("markdown-editor"),
forceSync: true,
});
$("#form").submit(() => {
$("#markdown-editor").textContent = ide.value();
});
</script>
</section>
</th:block>
</body>
......
......
......@@ -33,7 +33,7 @@
<div class="surface p-0" th:if="${!#strings.isEmpty(qSession.extraInfo)}">
<h3 class="surface__header">Extra information for this lab</h3>
<div class="surface__content" th:utext="${qSession.extraInfo}"></div>
<div class="surface__content article" th:utext="${qSession.extraInfo}"></div>
</div>
<dialog th:if="${param.requestFinished != null}" id="feedback-reminder" class="dialog">
......
......
......@@ -39,7 +39,7 @@
<link rel="stylesheet" href="/webjars/chihuahui/main.css" />
<link rel="stylesheet" href="/webjars/font-awesome/css/all.css" />
<script type="module" src="/webjars/chihuahui/components.js"></script>
<script type="module" src="/webjars/chihuahui/bundle.js"></script>
<script src="/webjars/chihuahui/theme.js"></script>
<script src="/webjars/chihuahui/toast.js"></script>
<script src="/webjars/jquery/jquery.min.js"></script>
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment