From 41a25d3226c3b00bc5ebc948f245a7d1737c064c Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 27 Mar 2015 11:54:28 +0100 Subject: [PATCH] Made drop area smaller and resize text box correctly --- src/elogd.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index ec737f53..9519d3e8 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -10237,12 +10237,17 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf(" while (p = p.offsetParent)\n"); rsprintf(" t += p.offsetTop;\n"); rsprintf(" if (window.innerHeight) // netscape\n"); - rsprintf(" height = window.innerHeight - t - 135;\n"); + rsprintf(" height = window.innerHeight - t - 135 - 50 - 30;\n"); rsprintf(" else // IE\n"); - rsprintf(" height = document.body.offsetHeight - t - 135;\n"); + rsprintf(" height = document.body.offsetHeight - t - 135 - 50 - 30;\n"); rsprintf(" if (height < 300)\n"); rsprintf(" height = 300;\n"); - rsprintf(" document.form1.Text.style.height = height;\n"); + rsprintf(" document.form1.Text.style.height = height+\"px\";\n"); + rsprintf(" width = window.innerWidth;\n"); + rsprintf(" if (width < 300)\n"); + rsprintf(" width = 300;\n"); + rsprintf(" width = width - 20;"); + rsprintf(" document.form1.Text.style.width = width+\"px\";\n"); rsprintf("}\n\n"); } @@ -11213,14 +11218,9 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("\n"); } - /* main box for text box and icons */ - rsprintf("\n"); - if (enc_selected == 0) - rsprintf("\n"); - if (enc_selected == 0 && show_smileys) { - rsprintf("\n"); + rsprintf("\n"); } - if (enc_selected == 0 && !fixed_text) - rsprintf("\n"); - if (enc_selected == 0) - rsprintf("
\n"); + rsprintf("
\n"); rsicon("smile", loc("smiling"), ":)"); rsprintf("
\n"); rsicon("happy", loc("happy"), ":))"); @@ -11247,11 +11247,10 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("
\n"); rsicon("yawn", loc("yawn"), ":O"); - rsprintf("
\n"); + rsprintf("
\n"); /* set textarea width */ width = 112; @@ -11691,9 +11690,6 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("
\n"); - for (i = 0; i < MAX_ATTACHMENTS; i++) if (!att[i][0]) { /* put first free attachment for show_uploader_finished() */ @@ -11914,8 +11910,8 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL // print the holder for dropping attachments rsprintf("\n"); rsprintf("\n"); - rsprintf("
"); - rsprintf("

%s

", loc("Drop attachments here...")); + rsprintf("
"); + rsprintf("

%s

", loc("Drop attachments here...")); rsprintf(""); } }