Skip to content
Snippets Groups Projects
Commit 88930f5a authored by Arkerthan's avatar Arkerthan
Browse files

add an option to display units for the options textbox

parent 69a92f58
No related branches found
No related tags found
1 merge request!6787convert options in starting slaves
......@@ -68,10 +68,14 @@ App.UI.OptionsGroup = (function() {
}
/**
* @param {string} [unit]
* @returns {Option}
*/
showTextBox() {
showTextBox(unit) {
this.textbox = true;
if (unit) {
this.unit = unit;
}
return this;
}
......@@ -256,6 +260,9 @@ App.UI.OptionsGroup = (function() {
textbox.classList.add("number");
}
buttonGroup.append(textbox);
if (option.unit) {
buttonGroup.append(" ", option.unit);
}
}
if (option.comment) {
const comment = document.createElement("span");
......@@ -264,7 +271,6 @@ App.UI.OptionsGroup = (function() {
buttonGroup.append(comment);
}
container.append(buttonGroup);
}
return container;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment