diff --git a/www/html/_assets/css/studio.css b/www/html/_assets/css/studio.css index 284174b..a44a26a 100644 --- a/www/html/_assets/css/studio.css +++ b/www/html/_assets/css/studio.css @@ -84,7 +84,7 @@ .studio .control { background-color: #F3F3F3; - padding:4px; + display:grid; grid-template-columns: 50px auto 40%; gap:8px; align-items: center; } diff --git a/www/html/_assets/js/studio.js b/www/html/_assets/js/studio.js index f03b20a..ff50283 100644 --- a/www/html/_assets/js/studio.js +++ b/www/html/_assets/js/studio.js @@ -161,17 +161,33 @@ studio.grid = function (){ }) var spreadsheet = new ej.spreadsheet.Spreadsheet(); + spreadsheet.sheets = [ + {name:_id.replace(/[#,.]/g,' '), + ranges:[{dataSource:rows}], + + } + ] + if( $(_id)[0].spreadsheet ){ + book = $(_id)[0].spreadsheet ; + book.sheets.forEach((sheet)=>{ + if(sheet.name != _id.replace(/[#,.]/g,' ')){ + + spreadsheet.sheets.push(sheet) + } + }) + + } // spreadsheet.openUrl='/api/io/open' // spreadsheet.openSettings = {chunkSize:1024} // spreadsheet.saveUrl = 'https://services.syncfusion.com/js/production/api/spreadsheet/save' // spreadsheet.created = function (){} - spreadsheet.sheets = [ - {name:_id.replace(/[#,.]/g,' '), - ranges:[{dataSource:rows}], + // spreadsheet.sheets = [ + // {name:_id.replace(/[#,.]/g,' '), + // ranges:[{dataSource:rows}], - } - ] + // } + // ] spreadsheet.appendTo(_id) @@ -220,7 +236,8 @@ studio.frame = function (_args){ }else{ _compute(_label,_r.data) var _id = '.code.'+_args.label.trim() - $(_id).val('-- '+$(_id).val().replace(/\n/g,'-- ') + '\n'+_r['query']) + // $(_id).val('-- '+$(_id).val().replace(/\n/g,'-- ') + '\n'+_r['query']) + $(_id).val(_r['query']) } sessionStorage[_label] = _query