From 4f6fcb0d3b52c1bc7ca184cded7425b16a65f0eb Mon Sep 17 00:00:00 2001 From: HThuren <99370924+HThuren@users.noreply.github.com> Date: Mon, 30 Jan 2023 20:40:54 +0100 Subject: [PATCH] OSD select sort (#3287) --- src/js/tabs/osd.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index 73f9ac9c..efb2f7ff 100644 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -2774,6 +2774,8 @@ osd.initialize = function(callback) { const timerSourceOptionText = i18n.getMessage(`osdTimerSourceOption${inflection.camelize(e.toLowerCase())}`); src.append(``); }); + // Sort the element, if need to group, do it by lexical sort, ie. by naming of (the translated) selection text + src.sortSelect(); src[0].selectedIndex = tim.src; src.blur(function() { const idx = $(this)[0].id.split("_")[1]; @@ -2795,6 +2797,8 @@ osd.initialize = function(callback) { const timerPrecisionOptionText = i18n.getMessage(`osdTimerPrecisionOption${inflection.camelize(e.toLowerCase())}`); precision.append(``); }); + // Sort the element, if need to group, do it by lexical sort, ie. by naming of (the translated) selection text + precision.sortSelect(); precision[0].selectedIndex = tim.precision; precision.blur(function() { const idx = $(this)[0].id.split("_")[1]; @@ -3068,6 +3072,9 @@ osd.initialize = function(callback) { .html(i18n.getMessage(variantText))); } + // Sort the element, if need to group, do it by lexical sort, ie. by naming of (the translated) selection text + selectVariant.sortSelect(); + selectVariant.val(field.variant); $labelAndVariant.append(selectVariant);