Remove all/last on Settings

This commit is contained in:
jokob-sk
2024-04-25 10:22:54 +10:00
parent 5599bbdf31
commit 73732a7d0c
13 changed files with 37 additions and 14 deletions

View File

@@ -378,8 +378,6 @@ function showModalFieldInput (title, message, btnCancel=getString('Gen_Cancel'),
$(`#${prefix}-cancel`).html (btnCancel);
$(`#${prefix}-OK`).html (btnOK);
console.log(callbackFunction);
if ( callbackFunction != null)
{
modalCallbackFunction = callbackFunction;

View File

@@ -185,15 +185,26 @@
// -------------------------------------------------------------------
// Function to remove an item from the select element
function removeOptionItem(option) {
settingsChanged();
option.remove();
}
// -------------------------------------------------------------------
// Update value of an item from the select elemen
// Update value of an item from the select element
function updateOptionItem(option, value) {
settingsChanged();
option.html(value);
}
// -------------------------------------------------------------------
// Remove all options
function removeAllOptions(element)
{
settingsChanged();
$(`#${$(element).attr('my-input')}`).empty();
}
// -------------------------------------------------------------------
// Function to initialize remove functionality on select options