From bd2c7834fa9cb72886e1e2cb43fb013ddb1e8e58 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 20 Jun 2007 04:36:03 +0000 Subject: [PATCH] The room info link in the banner no longer appears as the words 'Room info'. Instead, it shows the room info itself if it is short enough, or it shows a shortened version if it is too long. Either way, the user may click on it to see the full version in a popup. I have also replaced the words 'close window' with the close window icon, but I can't figure out how to make it appear on the right side of the box. --- webcit/roomops.c | 32 +++++++++++++++++++++++--------- webcit/static/webcit.css | 1 + 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/webcit/roomops.c b/webcit/roomops.c index d51da9ae3..8e28bc8ea 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -272,22 +272,36 @@ void zapped_list(void) */ void readinfo(void) { - char buf[SIZ]; + char buf[256]; + char briefinfo[128]; + char fullinfo[8192]; + int fullinfo_len = 0; serv_puts("RINF"); serv_getln(buf, sizeof buf); if (buf[0] == '1') { + + while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { + if (fullinfo_len < (sizeof fullinfo - sizeof buf)) { + strcpy(&fullinfo[fullinfo_len], buf); + fullinfo_len += strlen(buf); + } + } + + safestrncpy(briefinfo, fullinfo, sizeof briefinfo); + strcpy(&briefinfo[50], "..."); + wprintf("
"); - wprintf(_("Room info")); - wprintf("
" - "

"); - wprintf(_("Close window")); - wprintf("

"); - fmout("CENTER"); + escputs(briefinfo); + wprintf("
"); + wprintf("\"%s\"", + _("Close window") + ); + escputs(fullinfo); wprintf("
"); } else { diff --git a/webcit/static/webcit.css b/webcit/static/webcit.css index 9dba60757..83c94704c 100644 --- a/webcit/static/webcit.css +++ b/webcit/static/webcit.css @@ -131,6 +131,7 @@ body { font-size: 8pt; color: black; text-align: right; + align: right; padding: 2px; margin-top: 5px; } -- 2.39.2