From 4201d33b7456edc5a980673b2560e4cfcb403d99 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 27 Dec 2021 20:33:45 -0500 Subject: [PATCH] html/preset_sel : many changes and additions --- html/preset_sel/css/preset_sel.css | 6 ++++- html/preset_sel/css/ui.css | 2 +- html/preset_sel/js/ui.js | 40 +++++++++++++++++++++++++++++- html/preset_sel/ui.cfg | 25 +++++-------------- 4 files changed, 51 insertions(+), 22 deletions(-) diff --git a/html/preset_sel/css/preset_sel.css b/html/preset_sel/css/preset_sel.css index 8dca92d..8f14e93 100644 --- a/html/preset_sel/css/preset_sel.css +++ b/html/preset_sel/css/preset_sel.css @@ -2,7 +2,7 @@ .fragList { border: 1px solid LightSteelBlue; - width: 900px; + width: 1000px; height: 450px; } @@ -37,6 +37,10 @@ } */ +.fragNote { + width: 575px; +} + .uiRow { padding-bottom: 5px; padding-top: 5px; diff --git a/html/preset_sel/css/ui.css b/html/preset_sel/css/ui.css index aa44187..1652448 100644 --- a/html/preset_sel/css/ui.css +++ b/html/preset_sel/css/ui.css @@ -140,5 +140,5 @@ label { } .uiSelected { - border: 1px solid red; + border: 1px solid blue; } diff --git a/html/preset_sel/js/ui.js b/html/preset_sel/js/ui.js index 6f0dad4..6b9de29 100644 --- a/html/preset_sel/js/ui.js +++ b/html/preset_sel/js/ui.js @@ -548,6 +548,37 @@ function _ui_on_focus( ele ) _focusVal = ele.value; } + +function ui_set_str_display( ele_id, value ) +{ + + var ele = dom_id_to_ele(ele_id); + + if( typeof(value)=="string") + { + ele.innerHTML = value; + } +} + +function ui_create_str_display( parent_ele, d ) +{ + var ele = ui_create_ctl( parent_ele, "label", d.title, d, "uiStringDisp" ); + + if( ele != null ) + { + if( d.hasOwnProperty('value') ) + { + ui_set_str_display(ele.id, d.value); + } + else + { + ui_send_echo(ele); + } + } + + return ele; +} + function _ui_on_string_blur( ele ) { if( ele.id == _focusId ) @@ -724,7 +755,6 @@ function ui_create_number_display( parent_ele, d ) } return ele; - } function ui_create_text_display( parent_ele, d ) @@ -873,6 +903,10 @@ function ui_set_value( d ) case "option": break; + case "str_disp": + ui_set_str_display(ele.id,d.value); + break + case "string": ele.value = d.value break; @@ -1086,6 +1120,10 @@ function ui_create( d ) ele = ui_create_option( parent_ele, d ); break; + case "str_disp": + ele = ui_create_str_display( parent_ele, d ); + break; + case "string": ele = ui_create_string( parent_ele, d ); break; diff --git a/html/preset_sel/ui.cfg b/html/preset_sel/ui.cfg index 1590235..52885b3 100644 --- a/html/preset_sel/ui.cfg +++ b/html/preset_sel/ui.cfg @@ -11,11 +11,12 @@ button:{ name: quitBtnId, title:"Quit" }, button:{ name: ioReportBtnId, title:"IO Report" }, button:{ name: reportBtnId, title:"App Report" }, + button:{ name: loadBtnId, title:"Load" }, + button:{ name: saveBtnId, title:"Save" }, }, row: { - button:{ name: loadBtnId, title:"Load" }, button:{ name: startBtnId, title:"Start" }, button:{ name: stopBtnId, title:"Stop" }, number:{ name: begLocNumbId, title:"Loc", min:0, max:100000, step:1, decpl:0 }, @@ -28,26 +29,12 @@ numb_disp: { name: totalMidiEvtCntId, title:"Total" }, }, -/* - row: { - - check:{ name: audioThroughCheckId, title:"Audio Thru" }, - numb_disp: { name: curAudioSecsId, title:"Current:", decpl:1 }, - numb_disp: { name: totalAudioSecsId, title:"Total:", decpl:1 }, - }, - -*/ row: { - string:{ name: filenameId, title:"File Name:", value:"record" }, - button:{ name: saveBtnId, title:"Save" }, - }, - - row: { - number:{ name: insertLocId, title:"End Loc", min:0, max:100000, step:1, decpl:0 }, - button:{ name: insertBtnId, title:"Insert", enable: false }, - button:{ name: deleteBtnId, title:"Delete", enable: false }, - + number:{ name: insertLocId, title:"End Loc", min:0, max:100000, step:1, decpl:0 }, + button:{ name: insertBtnId, title:"Insert", enable: false }, + button:{ name: deleteBtnId, title:"Delete", enable: false }, + str_disp:{ name: statusId, title:"Status", value: "" }, }, row: {