diff --git a/exec/ftn-setup.js b/exec/ftn-setup.js index 0b0824a89e70221aa94ae31885c03b6c031cd9f8..2b18eb057244225f4b184b40b5cc0dc2d1e6128c 100644 --- a/exec/ftn-setup.js +++ b/exec/ftn-setup.js @@ -62,6 +62,7 @@ frame.cycle(); var key; var zone; +var high_water = 0; console.ungetstr(KEY_UP); while (!js.terminated) { key = console.getkey(); @@ -69,15 +70,49 @@ while (!js.terminated) { tree.getcmd(key); if (key == KEY_UP || key == KEY_DOWN || key == KEY_HOME || key == KEY_END) { zone = tree.currentItem.__ftn_setup; - info_frame.clear(); - info_frame.putmsg('\1h\1w' + zone.name + '\r\n'); - if (zone.desc) info_frame.putmsg('\1n\1w' + zone.desc + '\r\n\r\n'); - if (zone.info) info_frame.putmsg('\1h\1cInformation\1w:\r\n\1n' + zone.info + '\r\n\r\n'); - if (zone.coord) info_frame.putmsg('\1h\1cCoordinator\1w:\r\n\1n' + zone.coord + '\r\n\r\n'); - if (zone.email) info_frame.putmsg('\1h\1cEmail\1w:\r\n\1n' + zone.email + '\r\n\r\n'); + function crlf() { + info_frame.cleartoeol(); + info_frame.crlf(); + } + info_frame.home(); + info_frame.putmsg('\1h\1w' + zone.name); + crlf(); + if (zone.desc) { + info_frame.putmsg('\1n\1w' + zone.desc); + crlf(); + crlf(); + } + if (zone.info) { + info_frame.putmsg('\1h\1cInformation\1w:'); + crlf(); + info_frame.putmsg('\1n' + zone.info); + crlf(); + crlf(); + } + if (zone.coord) { + info_frame.putmsg('\1h\1cCoordinator\1w:'); + crlf(); + info_frame.putmsg('\1n' + zone.coord); + crlf(); + crlf(); + } + if (zone.email) { + info_frame.putmsg('\1h\1cEmail\1w:'); + crlf(); + info_frame.putmsg('\1n' + zone.email); + crlf(); + crlf(); + } if (addrs[zone._zone_number]) { - info_frame.putmsg('\1h\1rExisting address found: ' + addrs[zone._zone_number]); + info_frame.putmsg('\1h\1rExisting address found: ' + addrs[zone._zone_number]); + crlf(); } + var y = info_frame.cursor.y; + while(high_water > y) { + crlf(); + high_water--; + } + high_water = y; } if (frame.cycle()) console.gotoxy(console.screen_columns, console.screen_rows); } diff --git a/exec/xtrn-setup.js b/exec/xtrn-setup.js index 2f57fc6987f0d011f75964fee53df383c384ee62..76fcc47f12e392b78491fafc7b65750823905a85 100644 --- a/exec/xtrn-setup.js +++ b/exec/xtrn-setup.js @@ -1,4 +1,5 @@ // $Id$ +// vi: tabstop=4 load('sbbsdefs.js'); load('frame.js'); @@ -62,20 +63,53 @@ frame.cycle(); var key; var xtrn; +var high_water = 0; console.ungetstr(KEY_UP); while (!js.terminated) { key = console.getkey(); if (key.toLowerCase() == 'q') break; tree.getcmd(key); + function crlf() { + info_frame.cleartoeol(); + info_frame.crlf(); + } if (key == KEY_UP || key == KEY_DOWN || key == KEY_HOME || key == KEY_END) { xtrn = tree.currentItem.__xtrn_setup; - info_frame.clear(); - info_frame.putmsg('\x01h\x01w' + xtrn.Name + '\r\n'); - if (xtrn.Desc) info_frame.putmsg('\x01n\x01w' + xtrn.Desc + '\r\n'); - info_frame.putmsg('\r\n'); - if (xtrn.By) info_frame.putmsg('\x01h\x01cBy\x01w:\r\n\x01w' + xtrn.By + '\r\n\r\n'); - if (xtrn.Cats) info_frame.putmsg('\x01h\x01cCategories\x01w:\r\n\x01n' + xtrn.Cats + '\r\n\r\n'); - if (xtrn.Subs) info_frame.putmsg('\x01h\x01cSubcategories\x01w:\r\n\x01n' + xtrn.Subs + '\r\n\r\n'); + info_frame.home(); + info_frame.putmsg('\x01h\x01w' + xtrn.Name); + crlf(); + if (xtrn.Desc) { + info_frame.cleartoeol(); + info_frame.putmsg('\x01n\x01w' + xtrn.Desc); + crlf(); + } + crlf(); + if (xtrn.By) { + info_frame.putmsg('\x01h\x01cBy\x01w:'); + crlf(); + info_frame.putmsg('\x01w' + xtrn.By); + crlf(); + crlf(); + } + if (xtrn.Cats) { + info_frame.putmsg('\x01h\x01cCategories\x01w:'); + crlf(); + info_frame.putmsg('\x01n' + xtrn.Cats); + crlf(); + crlf(); + } + if (xtrn.Subs) { + info_frame.putmsg('\x01h\x01cSubcategories\x01w:'); + crlf(); + info_frame.putmsg('\x01n' + xtrn.Subs); + crlf(); + } + var y = info_frame.cursor.y; + while(high_water > y) { + crlf(); + high_water--; + } + high_water = y; } if (frame.cycle()) console.gotoxy(console.screen_columns, console.screen_rows); }