commit 26/08/2025

This commit is contained in:
2025-08-27 07:16:51 +07:00
parent 09b65738af
commit c73b181ef5

View File

@@ -395,13 +395,18 @@ $(document).ready(function () {
// initialize first state of buttons and text input
$('#soundbanktablebody').empty();
selectedsoundrow = null;
let $btnRemove = $('#btnRemove');
let $btnEdit = $('#btnEdit');
let $modal = $('#soundbankmodal');
const $btnRemove = $('#btnRemove');
const $btnEdit = $('#btnEdit');
const $modal = $('#soundbankmodal');
const modalEl = $modal[0];
const modal = bootstrap.Modal.getOrCreateInstance(modalEl); // creates or reuses
$btnRemove.prop('disabled', true);
$btnEdit.prop('disabled', true);
sendCommand("getSoundBankList", "");
$('#btnClear').click(() => {
if (confirm(`Are you sure want to clear Soundbank ? This procedure is not reversible`)) {
@@ -409,7 +414,7 @@ $(document).ready(function () {
}
});
$('#btnAdd').click(() => {
$modal.modal('show');
modal.show();
$modal.off('hidden.bs.modal').on('hidden.bs.modal', function () {
const desc = $('#description').val();
console.log('Description input value:', desc);
@@ -448,7 +453,7 @@ $(document).ready(function () {
path: cells.eq(6).text()
}
if (confirm(`Are you sure to edit soundbank [${sb.index}] Description=${sb.description} Tag=${sb.tag}?`)) {
$modal.modal('show');
modal.show();
$modal.off('hidden.bs.modal').on('hidden.bs.modal', function () {
const desc = $('#description').val();
console.log('Description input value:', desc);