This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user