update UI js
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-11 13:09:41 +11:00
parent 57b6be74e2
commit 60af423335
4 changed files with 34 additions and 7 deletions

View File

@@ -183,7 +183,20 @@ function getAllSelectedChannels():string[] {
return channels
}
function selectChannelRange(checkbox:HTMLInputElement, event:MouseEvent) {
function scheduleChannelRangeSelection(checkbox:HTMLInputElement, event:MouseEvent) {
var shiftPressed = false
if (event != undefined && event.shiftKey == true) {
shiftPressed = true
}
// Run after the native checkbox toggle so we copy the final checked state.
setTimeout(function() {
selectChannelRange(checkbox, shiftPressed)
}, 0)
}
function selectChannelRange(checkbox:HTMLInputElement, shiftPressed:boolean) {
if (BULK_EDIT == false || checkbox == undefined || checkbox == null) {
return
@@ -212,7 +225,7 @@ function selectChannelRange(checkbox:HTMLInputElement, event:MouseEvent) {
previousIndex = visibleCheckboxes.indexOf(LAST_BULK_CHECKBOX)
}
if (event != undefined && event.shiftKey == true && previousIndex > -1 && currentIndex > -1) {
if (shiftPressed == true && previousIndex > -1 && currentIndex > -1) {
var start = Math.min(previousIndex, currentIndex)
var end = Math.max(previousIndex, currentIndex)
for (var i = start; i <= end; i++) {