Skip to content
Permalink
Browse files

Keep the selected view mode when typing a new URL in the ViewFile page

Otherwise, when interested in viewing `Link List` for example, each time
you typed a new URL, `Parsed Sentences` view mode was selected as
default and you had to selected again the view mode you are insterested
in.
  • Loading branch information...
luccioman committed Mar 27, 2018
1 parent db55eaa commit 0b6aed4de6ed232d06cdffb6a29dd1ab9de58f57
Showing with 3 additions and 0 deletions.
  1. +1 −0 htroot/ViewFile.html
  2. +2 −0 htroot/ViewFile.java
@@ -77,6 +77,7 @@
<h2>View URL Content</h2>

<form method="get" action="ViewFile.html" id="searchform" accept-charset="ascii" onkeyup="xmlhttpPost(); return false;">
<input type="hidden" name="viewMode" value="#[viewModeValue]#" />
<fieldset><legend>Get URL Viewer</legend>
<dl>
<dt>URL:</dt>
@@ -89,6 +89,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0);
prop.put("moar", 0);
prop.put("viewMode", VIEW_MODE_NO_TEXT);
prop.put("viewModeValue", "");
prop.putHTML("error_words", "");
prop.put("error_vMode-sentences", "1");
prop.put("error", "1");
@@ -118,6 +119,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
final boolean showSnippet = post.get("show", "").equals("Show Snippet");
final String viewMode = showSnippet ? "sentences" : post.get("viewMode", "sentences");
prop.put("error_vMode-" + viewMode, "1");
prop.put("viewModeValue", viewMode);

DigestURL url = null;
String descr = "";

0 comments on commit 0b6aed4

Please sign in to comment.
You can’t perform that action at this time.