From e5b81fd75226b70136264addc95e30cecffce444 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 24 Jun 2008 15:25:39 +0000 Subject: Updated tinydns as follows: Renames status to view and basicstatus to status. Added ability to view individual config file / domain. Added link from view to edit actual line. Modified view. Updated jQuery to latest 1.2.6 git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1253 ab2d0c66-481e-0410-8bed-d214d4d58bed --- tinydns-edit-html.lsp | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) (limited to 'tinydns-edit-html.lsp') diff --git a/tinydns-edit-html.lsp b/tinydns-edit-html.lsp index 6a19c65..95b2fa0 100644 --- a/tinydns-edit-html.lsp +++ b/tinydns-edit-html.lsp @@ -16,21 +16,19 @@ this.descriptions[0]=descr0;this.descriptions[1]=descr1;this.descriptions[2]=descr2;this.descriptions[3]=descr3;this.descriptions[4]=descr4;this.descriptions[5]=descr5;this.descriptions[6]=descr6;this.descriptions[7]=descr7;this.descriptions[8]=descr8;this.descriptions[9]=descr9;this.descriptions[10]=descr10; } - var entryTypes = new Array(14); - entryTypes[0]=new Entry("","Empty line",0); - entryTypes[1]=new Entry(";","Comment line",1,"Comment"); - entryTypes[2]=new Entry("#","Comment line",1,"Comment"); - entryTypes[3]=new Entry(".","Name server",6,"Domain","IP address","Name server","Time to live","Timestamp","Location"); - entryTypes[4]=new Entry("&","Delegate subdomain",6,"Domain","IP address","Name server","Time to live","Timestamp","Location"); - entryTypes[5]=new Entry("=","Host",5,"Host","IP address","Time to live","Timestamp","Location"); - entryTypes[6]=new Entry("+","Alias",5,"Alias","IP address","Time to live","Timestamp","Location"); - entryTypes[7]=new Entry("@","Mail exchanger",7,"Domain","IP address","Mail exchanger","Distance","Time to live","Timestamp","Location"); - entryTypes[8]=new Entry("'","Text record",5,"Domain","Text Record","Time to live","Timestamp","Location"); - entryTypes[9]=new Entry("^","Reverse record",5,"PTR","Domain name","Time to live","Timestamp","Location"); - entryTypes[10]=new Entry("C","Canonical name",5,"Domain","Canonical name","Time to live","Timestamp","Location"); - entryTypes[11]=new Entry("Z","SOA record",11,"Domain","Primary name server","Contact address","Serial number","Refresh time","Retry time","Expire time","Minimum time","Time to live","Timestamp","Location"); - entryTypes[12]=new Entry(":","Generic record",6,"Domain","Record type","Record data","Time to live","Timestamp","Location"); - entryTypes[13]=new Entry("%","Client location",2,"Location","IP prefix"); + var entryTypes = new Array(12); + entryTypes[0]=new Entry("","Comment line",1,"Comment"); + entryTypes[1]=new Entry(".","Name server",6,"Domain","IP address","Name server","Time to live","Timestamp","Location"); + entryTypes[2]=new Entry("&","Delegate subdomain",6,"Domain","IP address","Name server","Time to live","Timestamp","Location"); + entryTypes[3]=new Entry("=","Host",5,"Host","IP address","Time to live","Timestamp","Location"); + entryTypes[4]=new Entry("+","Alias",5,"Alias","IP address","Time to live","Timestamp","Location"); + entryTypes[5]=new Entry("@","Mail exchanger",7,"Domain","IP address","Mail exchanger","Distance","Time to live","Timestamp","Location"); + entryTypes[6]=new Entry("'","Text record",5,"Domain","Text Record","Time to live","Timestamp","Location"); + entryTypes[7]=new Entry("^","Reverse record",5,"PTR","Domain name","Time to live","Timestamp","Location"); + entryTypes[8]=new Entry("C","Canonical name",5,"Domain","Canonical name","Time to live","Timestamp","Location"); + entryTypes[9]=new Entry("Z","SOA record",11,"Domain","Primary name server","Contact address","Serial number","Refresh time","Retry time","Expire time","Minimum time","Time to live","Timestamp","Location"); + entryTypes[10]=new Entry(":","Generic record",6,"Domain","Record type","Record data","Time to live","Timestamp","Location"); + entryTypes[11]=new Entry("%","Client location",2,"Location","IP prefix"); function finishForm(entry){ var entrytext = entry.find("select").val() + entry.find("input").map(function(){ @@ -44,17 +42,23 @@ var form = '
"; - entrytext = entrytext.substring(1,entrytext.length) + "::::::::::"; - var entries = entrytext.split(":"); + var entries; + if (entryType.entryType == ""){ + entries = new Array(1); + entries[0] = entrytext; + } else { + entrytext = entrytext.substring(1,entrytext.length) + "::::::::::"; + entries = entrytext.split(":"); + } for (i=0; i' + entryType.descriptions[i] + '
'; @@ -110,6 +114,9 @@ $(function(){ addLinks($("#entries").find("tr")); $("input.submit").click(submitFile); + + $("#entries tr:eq()").find("a:eq(2)").click().parent().next().focus(); + }); -- cgit v1.2.3