Skip to content
Snippets Groups Projects
Commit 82510c6b authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

Merge branch 'f-noscript' into 'dev'

add noscript hint

See merge request !10
parents 7f857411 86a42484
Branches
Tags
2 merge requests!21Release v0.4.0,!10add noscript hint
Pipeline #7621 failed
...@@ -28,6 +28,7 @@ import java.io.Writer; ...@@ -28,6 +28,7 @@ import java.io.Writer;
import org.caosdb.server.CaosDBServer; import org.caosdb.server.CaosDBServer;
import org.caosdb.server.ServerProperties; import org.caosdb.server.ServerProperties;
import org.jdom2.Document; import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.ProcessingInstruction; import org.jdom2.ProcessingInstruction;
import org.jdom2.output.Format; import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter; import org.jdom2.output.XMLOutputter;
...@@ -68,6 +69,12 @@ public class JdomRepresentation extends WriterRepresentation { ...@@ -68,6 +69,12 @@ public class JdomRepresentation extends WriterRepresentation {
super(MediaType.TEXT_XML); super(MediaType.TEXT_XML);
this.indent = indent; this.indent = indent;
this.document = document; 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) { if (xslPath != null && document != null) {
addStyleSheet(document, xslPath); addStyleSheet(document, xslPath);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment