Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
55cc09eb
Commit
55cc09eb
authored
3 years ago
by
Rob Swindell
Browse files
Options
Downloads
Plain Diff
Merge branch '247_slyvote_msggroup_undefined' into 'master'
Fix for
#247
: Slyvote javascript error pMsgGrps[pGrpIdx] is undefined See merge request
!122
parents
cb66fc71
9817d68e
No related branches found
No related tags found
2 merge requests
!463
MRC mods by Codefenix (2024-10-20)
,
!122
Fix for #247: Slyvote javascript error pMsgGrps[pGrpIdx] is undefined
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
xtrn/slyvote/readme.txt
+2
-2
2 additions, 2 deletions
xtrn/slyvote/readme.txt
xtrn/slyvote/slyvote.js
+22
-33
22 additions, 33 deletions
xtrn/slyvote/slyvote.js
with
24 additions
and
35 deletions
xtrn/slyvote/readme.txt
+
2
−
2
View file @
55cc09eb
SlyVote
Version 1.1
0
Release date: 202
0
-0
5-2
2
Version 1.1
1
Release date: 202
1
-0
4-0
2
by
...
...
This diff is collapsed.
Click to expand it.
xtrn/slyvote/slyvote.js
+
22
−
33
View file @
55cc09eb
...
...
@@ -171,6 +171,13 @@
* useAllAvailableSubBoards 'false' setting was being
* ignored when it was set to false when changing
* to another sub-board.
* 2021-04-02 Eric Oulashin Version 1.11
* When configured to use all available sub-boards,
* still don't allow choosing a sub-board that has
* polls disabled. This fixes an issue where SlyVote
* was showing all available message groups but
* some could be empty due to having no sub-boards
* that allow polls.
*/
// TODO: Have a messsage group selection so that it doesn't have to display all
...
...
@@ -240,8 +247,8 @@ else
var
gAvatar
=
load
({},
"
avatar_lib.js
"
);
// Version information
var
SLYVOTE_VERSION
=
"
1.1
0
"
;
var
SLYVOTE_DATE
=
"
202
0
-0
5-2
2
"
;
var
SLYVOTE_VERSION
=
"
1.1
1
"
;
var
SLYVOTE_DATE
=
"
202
1
-0
4-0
2
"
;
// Determine the script's startup directory.
// This code is a trick that was created by Deuce, suggested by Rob Swindell
...
...
@@ -616,38 +623,20 @@ function CreateMsgGrpMenu(pListTopRow, pDrawColRetObj, pMsgGrps)
grpMenu
.
ampersandHotkeysInItems
=
false
;
grpMenu
.
scrollbarEnabled
=
true
;
grpMenu
.
AddAdditionalQuitKeys
(
"
qQ
"
);
if
(
gSlyVoteCfg
.
useAllAvailableSubBoards
)
{
grpMenu
.
NumItems
=
function
()
{
return
msg_area
.
grp_list
.
length
;
};
grpMenu
.
GetItem
=
function
(
pItemIndex
)
{
var
menuItemObj
=
this
.
MakeItemWithRetval
(
-
1
);
if
((
pItemIndex
>=
0
)
&&
(
pItemIndex
<
msg_area
.
grp_list
.
length
))
{
menuItemObj
.
text
=
msg_area
.
grp_list
[
pItemIndex
].
name
;
menuItemObj
.
retval
=
pItemIndex
;
}
return
menuItemObj
;
};
}
else
var
grpNameLen
=
pDrawColRetObj
.
textLen
-
2
;
// Count the number of groups. If it's more than the number per page in
// the menu, then subtract 1 from grpNameLen to account for the scrollbar.
var
numGrps
=
0
;
for
(
var
grpIdx
in
pMsgGrps
)
++
numGrps
;
if
(
numGrps
>
grpMenu
.
GetNumItemsPerPage
())
--
grpNameLen
;
// Add the groups to the menu
for
(
var
grpIdx
in
pMsgGrps
)
{
var
grpNameLen
=
pDrawColRetObj
.
textLen
-
2
;
// Count the number of groups. If it's more than the number per page in
// the menu, then subtract 1 from grpNameLen to account for the scrollbar.
var
numGrps
=
0
;
for
(
var
grpIdx
in
pMsgGrps
)
++
numGrps
;
if
(
numGrps
>
grpMenu
.
GetNumItemsPerPage
())
--
grpNameLen
;
// Add the groups to the menu
for
(
var
grpIdx
in
pMsgGrps
)
{
var
grpName
=
msg_area
.
grp_list
[
grpIdx
].
name
;
var
itemText
=
format
(
"
%-
"
+
grpNameLen
+
"
s
"
,
grpName
.
substr
(
0
,
grpNameLen
));
grpMenu
.
Add
(
itemText
,
grpIdx
);
}
var
grpName
=
msg_area
.
grp_list
[
grpIdx
].
name
;
var
itemText
=
format
(
"
%-
"
+
grpNameLen
+
"
s
"
,
grpName
.
substr
(
0
,
grpNameLen
));
grpMenu
.
Add
(
itemText
,
grpIdx
);
}
return
grpMenu
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment