Skip to content
Snippets Groups Projects
Commit 18a9a9db authored by Eric Oulashin's avatar Eric Oulashin Committed by Rob Swindell
Browse files

DD Message area chooser: Lightbar mode name collapsing: Ensure the...

DD Message area chooser: Lightbar mode name collapsing: Ensure the intermediate subgroup is selected
parent 1d60aa39
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -71,6 +71,9 @@
* Sub-board name collapsing: Fix for incorrect sub-subboard assignment.
* Also, won't collapse if the name before the separator is the same as
* the message group description.
* 2023-10-27 Eric Oulashin Version 1.41
* Lightbar mode: When using name collapisng, ensure the menu item for
* the appropriate subgroup is selected.
*/
// TODO: In the area list, the 10,000ths digit (for # posts) is in a different color)
......@@ -114,8 +117,8 @@ if (system.version_num < 31400)
}
// Version & date variables
var DD_MSG_AREA_CHOOSER_VERSION = "1.40";
var DD_MSG_AREA_CHOOSER_VER_DATE = "2023-10-24";
var DD_MSG_AREA_CHOOSER_VERSION = "1.41";
var DD_MSG_AREA_CHOOSER_VER_DATE = "2023-10-27";
// Keyboard input key codes
var CTRL_H = "\x08";
......@@ -1177,19 +1180,38 @@ function DDMsgAreaChooser_CreateLightbarSubBoardMenu(pLevel, pGrpIdx, pSubIdx)
// Set the currently selected item. If the current sub-board is in this list,
// then set the selected item to that; otherwise, the selected item should be
// the first sub-board.
var selectedItemIdxWasSet = false;
if (msg_area.sub[bbs.cursub_code].grp_index == pGrpIdx)
{
//if (user.is_sysop) console.print("\x01n\r\nHere 1\r\n\x01p"); // Temporary
if ((pSubIdx >= 0) && (pSubIdx < this.group_list[pGrpIdx].sub_list.length))
{
var subSubsValid = Array.isArray(this.group_list[pGrpIdx].sub_list[pSubIdx].sub_subboard_list) && this.group_list[pGrpIdx].sub_list[pSubIdx].sub_subboard_list.length > 0;
if (!subSubsValid && bbs.cursub_code == this.group_list[pGrpIdx].sub_list[pSubIdx].code)
{
//if (user.is_sysop) console.print("\x01n\r\nHere 3\r\n\x01p"); // Temporary
subBoardMenu.selectedItemIdx = pSubIdx;
if (subBoardMenu.selectedItemIdx >= subBoardMenu.topItemIdx+subBoardMenu.GetNumItemsPerPage())
subBoardMenu.topItemIdx = subBoardMenu.selectedItemIdx - subBoardMenu.GetNumItemsPerPage() + 1;
}
}
}
// If the selected item wasn't set, then check whether the current sub-board
// is within any of the sub-subboards for the subgroups in the group, and set
// it if so.
if (!selectedItemIdxWasSet)
{
for (var subIdx = 0; subIdx < this.group_list[pGrpIdx].sub_list.length; ++subIdx)
{
if (this.CurrentSubBoardIsInSubSubsForSub(pGrpIdx, subIdx))
{
subBoardMenu.selectedItemIdx = subIdx;
if (subBoardMenu.selectedItemIdx >= subBoardMenu.topItemIdx+subBoardMenu.GetNumItemsPerPage())
subBoardMenu.topItemIdx = subBoardMenu.selectedItemIdx - subBoardMenu.GetNumItemsPerPage() + 1;
break;
}
}
}
}
else if (pLevel == 3)
{
......
Digital Distortion Area Choosers
Version 1.40
Release date: 2023-10-24
Version 1.41/1.40
Release date: 2023-10-27
by
......
......@@ -5,6 +5,10 @@ Revision History (change log)
=============================
Version Date Description
------- ---- -----------
1.41 2023-1027 Message area chooser only: In lightbar mode, when using
name collapisng, ensure the menu item for the appropriate
subgroup is selected.
The file area chooser was already doing this.
1.40 2023-10-24 Name collapsing: Fix for incorrect subboard/directory
assignment. Also, won't collapse if the name before the
separator is the same as the message group description.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment