From b6e3b402faee30fa8cb4a6b43bd34151e2f4a1bc Mon Sep 17 00:00:00 2001 From: tenox Date: Sun, 21 Aug 2016 09:43:46 -0700 Subject: more JS fixes --- dialogs.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'dialogs.c') diff --git a/dialogs.c b/dialogs.c index 5fbcf4c..e0a86ff 100644 --- a/dialogs.c +++ b/dialogs.c @@ -256,8 +256,7 @@ void about(void) { "GCC: %s
\n" "Server: %s
\n" "User Agent: %s
\n" - "JavaScript Supported: %s
\n" - "\"Valid\n" + "JavaScript Level: %d
\n" " 

\n" " 

\n" "\n" @@ -274,7 +273,7 @@ void about(void) { " \n" "\n" "\n\n", - ICONSURL, TAGLINE, VERSION, __DATE__, __TIME__, __VERSION__, cgiServerSoftware, cgiUserAgent, (js) ? "Yes" : "No", cgiScriptName, virt_dirname, token); + ICONSURL, TAGLINE, VERSION, __DATE__, __TIME__, __VERSION__, cgiServerSoftware, cgiUserAgent, js, cgiScriptName, virt_dirname, token); } @@ -286,14 +285,14 @@ void login_ui(void) { cgiHeaderContentType("text/html"); html_title("Login"); - if(js) fputs( + if(js>=2) fputs( "\n", cgiOut); fputs("\n", cgiOut); - if(js) + if(js>=2) fputs("\n", cgiOut); else fputs("\n", cgiOut); @@ -315,9 +314,9 @@ void login_ui(void) { " \n" " \n" " =2) fprintf(cgiOut, "onClick=\"self.location='%s?directory=%s&login=client&token=' + hex_md5('%s:' + document.wfm.username.value + ':' + document.wfm.password.value); return false;\"", cgiScriptName, virt_dirname, cgiRemoteAddr); @@ -335,14 +334,6 @@ void login_ui(void) { // // Text Area File Editor // -// size info: the file is read as raw text with size in bytes -// the output is escaped in textarea resulting in more length -// however the output from textarea is saved unescaped so the -// resulting file size is same as before escaping -// -// size variable is used by edit_save() to read the specified -// lenght from cgiFormString() however fwrite() uses strlen() -// void edit_ui(void) { FILE *input; char *buff; @@ -446,14 +437,13 @@ void edit_ui(void) { "\n" "\n" "\n" - "\n"//onClick=\"document.EDITOR.size.value=document.EDITOR.content.value.length+1; return true;\"> \n" + "\n" "\n" "\n" "\n" "\n" "\n" "\n" -// "\n" "\n" "\n" "\n" -- cgit v1.2.3