add an input for wsjt_decoding_depths
This commit is contained in:
16
htdocs/lib/settings/WsjtDecodingDepthsInput.js
Normal file
16
htdocs/lib/settings/WsjtDecodingDepthsInput.js
Normal file
@ -0,0 +1,16 @@
|
||||
$.fn.wsjtDecodingDepthsInput = function() {
|
||||
var renderTable = function(data) {
|
||||
var $table = $('<table class="table table-sm table-borderless wsjt-decoding-depths-table">');
|
||||
$table.append($.map(data, function(value, mode){
|
||||
return $('<tr><td>' + mode + '</td><td>' + value + '</td></tr>');
|
||||
}));
|
||||
return $table;
|
||||
}
|
||||
|
||||
this.each(function(){
|
||||
var $input = $(this);
|
||||
var $el = $input.parent();
|
||||
var $table = renderTable(JSON.parse($input.val()));
|
||||
$el.append($table);
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user