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

@@ -8,7 +8,7 @@ var WS_AVAILABLE = false;
var ACTIVE_MENU_ID = "";
var LAST_FOCUSED_ELEMENT = null;
var LAST_BULK_CHECKBOX = null;
// Menü
// Menu
var menuItems = new Array();
menuItems.push(new MainMenuItem("playlist", "{{.mainMenu.item.playlist}}", "m3u.png", "{{.mainMenu.headline.playlist}}"));
//menuItems.push(new MainMenuItem("pmsID", "{{.mainMenu.item.pmsID}}", "number.png", "{{.mainMenu.headline.pmsID}}"))
@@ -184,7 +184,17 @@ function getAllSelectedChannels() {
}
return channels;
}
function selectChannelRange(checkbox, event) {
function scheduleChannelRangeSelection(checkbox, event) {
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, shiftPressed) {
if (BULK_EDIT == false || checkbox == undefined || checkbox == null) {
return;
}
@@ -207,7 +217,7 @@ function selectChannelRange(checkbox, event) {
if (LAST_BULK_CHECKBOX != null) {
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++) {