From 12b3b7bc50ee82e5de11503304d200b9ccc48306 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Mon, 16 Jul 2012 13:20:10 +0000 Subject: [PATCH] Corrigindo tratamento de campos de senha na exportação para html --- android/res/raw/theme.css | 33 ++++++++++++++++++++++++++++++--- src/lib3270/html.c | 11 +++++++---- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/android/res/raw/theme.css b/android/res/raw/theme.css index bab0518..d34fd69 100644 --- a/android/res/raw/theme.css +++ b/android/res/raw/theme.css @@ -26,13 +26,42 @@ input margin-right: 0.5em; } +input:focus +{ + outline:none; +} + input[type="text"] { border: 1px solid #004000 } +input[type="text"]:focus +{ + border: 1px solid #008000 +} + +input[type="password"] +{ + border: 1px solid #400000 +} + +input[type="password"]:focus +{ + border: 1px solid #800000 +} + +#terminal +{ + z-index: 10; + background-color: black; +} + #pfbar { + z-index: -1; + position: fixed; + bottom: 1px; width: 49em; background: black; color: white; @@ -57,6 +86,7 @@ a font-size: 15px; font-family: arial; display: inline-block; + border-radius: 3px; } .IW001 @@ -458,6 +488,3 @@ a { width: 41em; } - - - diff --git a/src/lib3270/html.c b/src/lib3270/html.c index 24fee0b..6986d82 100644 --- a/src/lib3270/html.c +++ b/src/lib3270/html.c @@ -178,13 +178,15 @@ } - static void open_input(struct html_info *info, int addr) + static void open_input(struct html_info *info, int addr, const char *type) { char name[30]; snprintf(name,29,"F%04d",addr); - append_string(info,"mode = HTML_MODE_INPUT_TEXT; @@ -256,9 +258,10 @@ if(!FA_IS_PROTECTED(fa)) { // Input field - char *text = lib3270_get_field_at(session,baddr+col+1); + unsigned char attr = get_field_attribute(session,baddr+col+1); + char * text = lib3270_get_field_at(session,baddr+col+1); - open_input(&info,baddr+col+1); + open_input(&info,baddr+col+1,FA_IS_ZERO(attr) ? "password" : "text"); if(text) { -- libgit2 0.21.2