From b8e60067b91a429fbe6b53bf2fd206ee69c9881b Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 3 Sep 2008 17:22:25 +0000 Subject: Modified tinydns to fix an exception when saving file, fix scrolling to line number, and HTML escape the filecontent. git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1444 ab2d0c66-481e-0410-8bed-d214d4d58bed --- tinydns-edit-html.lsp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tinydns-edit-html.lsp') diff --git a/tinydns-edit-html.lsp b/tinydns-edit-html.lsp index a100c27..ddb4ae4 100644 --- a/tinydns-edit-html.lsp +++ b/tinydns-edit-html.lsp @@ -116,7 +116,9 @@ addLinks($("#entries").find("tr")); $("input.submit").click(submitFile); <% if form.value.filecontent.linenumber then %> - $("#entries tr:eq(<%= form.value.filecontent.linenumber - 1 %>)").find("a:eq(2)").click().parent().next().focus(); + $("#entries tr:eq(<%= form.value.filecontent.linenumber - 1 %>)").find("a:eq(2)").click(); + var top = $("#entries tr:eq(<%= form.value.filecontent.linenumber - 1 %>)").offset().top; + $("html,body").scrollTop(top); <% end %> }); @@ -144,7 +146,7 @@ displayitem(form.value.mtime) <% if form.descr then %>

<%= string.gsub(form.descr, "\n", "
") %>

<% end %> <% if form.errtxt then %>

<%= string.gsub(form.errtxt, "\n", "
") %>

<% end %> -<% for line in string.gmatch(form.value.filecontent.value.."\n", "([^\n]*)\n") do %> +<% for line in string.gmatch(html.html_escape(form.value.filecontent.value).."\n", "([^\n]*)\n") do %> @@ -154,7 +156,7 @@ displayitem(form.value.mtime) " method="POST"> - +

Save and Apply Above Settings

-- cgit v1.2.3
<%= line %>