OSD select sort (#3287)
parent
bdd87a5d54
commit
4f6fcb0d3b
|
@ -2774,6 +2774,8 @@ osd.initialize = function(callback) {
|
|||
const timerSourceOptionText = i18n.getMessage(`osdTimerSourceOption${inflection.camelize(e.toLowerCase())}`);
|
||||
src.append(`<option value="${i}">${timerSourceOptionText}</option>`);
|
||||
});
|
||||
// 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(`<option value="${i}">${timerPrecisionOptionText}</option>`);
|
||||
});
|
||||
// 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);
|
||||
|
|
Loading…
Reference in New Issue