Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language sort optionlist at LED tab #3178

Merged
merged 2 commits into from Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/js/tabs/led_strip.js
Expand Up @@ -396,6 +396,10 @@ led_strip.initialize = function (callback, scrollPosition) {
},
});

const ledStripSelectFunction = $('#ledStripFunctionSelect');
// Sort the element, if need to group, do it by lexical sort, ie. by naming of (the translated) selection text
ledStripSelectFunction.sortSelect(i18n.getMessage("ledStripFunctionNoneOption"));

HThuren marked this conversation as resolved.
Show resolved Hide resolved
// UI: select LED function from drop-down
$('.functionSelect').on('change', function() {
clearModeColorSelection();
Expand All @@ -405,6 +409,10 @@ led_strip.initialize = function (callback, scrollPosition) {
updateBulkCmd();
});

const ledStripModeColorsModeSelectFunction = $('#ledStripModeColorsModeSelect');
// Sort the element, if need to group, do it by lexical sort, ie. by naming of (the translated) selection text
ledStripModeColorsModeSelectFunction.sortSelect(i18n.getMessage("ledStripModeColorsModeOrientation"));

// UI: select mode from drop-down
$('.modeSelect').on('change', function() {

Expand Down
4 changes: 2 additions & 2 deletions src/tabs/led_strip.html
Expand Up @@ -39,7 +39,7 @@

<div class="select">
<span class="color_section" i18n="ledStripFunctionTitle"></span>
<select class="functionSelect">
<select id="ledStripFunctionSelect" class="functionSelect">
<option value="" i18n="ledStripFunctionNoneOption"></option>
<option value="function-c" i18n="ledStripFunctionColorOption"></option>
<option value="function-f" i18n="ledStripFunctionModesOption"></option>
Expand Down Expand Up @@ -112,7 +112,7 @@
<div class="mode_colors">
<div class="section" i18n="ledStripModeColorsTitle"></div>

<select class="modeSelect">
<select id="ledStripModeColorsModeSelect" class="modeSelect">
<option value="0" i18n="ledStripModeColorsModeOrientation"></option>
<option value="1" i18n="ledStripModeColorsModeHeadfree"></option>
<option value="2" i18n="ledStripModeColorsModeHorizon"></option>
Expand Down