Permalink
Browse files

* EditRepresentation.java

    make edit page (for cxml mainly) prettier with big textarea (see Kenji's comment on HER-1993 dated 2012-03-27 18:03)
  • Loading branch information...
1 parent 335b32a commit 9626b8454a594276728243a77ee85d4a7014a1b1 @nlevitt nlevitt committed Mar 30, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 engine/src/main/java/org/archive/crawler/restlet/EditRepresentation.java
@@ -64,20 +64,21 @@ public void write(Writer writer) throws IOException {
pw.println("<!DOCTYPE html>");
pw.println("<html>");
pw.println("<head><title>"+fileRepresentation.getFile().getName()+"</title></head>");
- pw.println("<body>");
- Flash.renderFlashesHTML(pw, dirResource.getRequest());
- pw.println("<form method='POST'>");
- // TODO: enable button on after changes made
+ pw.println("<body style='background-color:#ddd'>");
+ pw.println("<form style='position:absolute;top:15px;bottom:15px;left:15px;right:15px;overflow:auto' method='POST'>");
+ pw.println("<textarea style='width:98%;height:90%;font-family:monospace' name='contents'>");
+ StringEscapeUtils.escapeHtml(pw,fileRepresentation.getText());
+ pw.println("</textarea>");
pw.println("<div>");
+ // TODO: enable button on after changes made
pw.println("<input type='submit' value='save changes'>");
pw.println(fileRepresentation.getFile());
Reference viewRef = dirResource.getRequest().getOriginalRef().clone();
viewRef.setQuery(null);
pw.println("<a href='"+viewRef+"'>view</a>");
+ Flash.renderFlashesHTML(pw, dirResource.getRequest());
pw.println("</div>");
- pw.println("<textarea style='width:100%;height:94%;' name='contents'>");
- StringEscapeUtils.escapeHtml(pw,fileRepresentation.getText());
- pw.println("</textarea></form>");
+ pw.println("</form>");
pw.println("</body>");
pw.println("</html>");
pw.close();

0 comments on commit 9626b84

Please sign in to comment.