Skip to content
Snippets Groups Projects
Verified Commit 86a42484 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

add noscript hint

parent 7f857411
No related branches found
No related tags found
2 merge requests!21Release v0.4.0,!10add noscript hint
Pipeline #7283 passed
......@@ -28,6 +28,7 @@ import java.io.Writer;
import org.caosdb.server.CaosDBServer;
import org.caosdb.server.ServerProperties;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.ProcessingInstruction;
import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter;
......@@ -68,6 +69,12 @@ public class JdomRepresentation extends WriterRepresentation {
super(MediaType.TEXT_XML);
this.indent = indent;
this.document = document;
Element noscript = new Element("noscript");
Element div = new Element("h1");
div.addContent("Please enable JavaScript!");
noscript.addContent(div);
document.getRootElement().addContent(0, noscript);
if (xslPath != null && document != null) {
addStyleSheet(document, xslPath);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment