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