automatically load modes into bookmark dialog
This commit is contained in:
parent
a6a29b7032
commit
93b8f75cc3
@ -211,17 +211,7 @@
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label for="modulation">Modulation:</label>
|
||||
<select name="modulation" id="modulation">
|
||||
<option value="nfm">FM</option>
|
||||
<option value="am">AM</option>
|
||||
<option value="usb">USB</option>
|
||||
<option value="lsb">LSB</option>
|
||||
<option value="cw">CW</option>
|
||||
<option value="dmr">DMR</option>
|
||||
<option value="dstar">D-Star</option>
|
||||
<option value="nxdn">NXDN</option>
|
||||
<option value="ysf">YSF</option>
|
||||
</select>
|
||||
<select name="modulation" id="modulation"></select>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<div class="openwebrx-button" data-action="cancel">Cancel</div>
|
||||
|
10
htdocs/lib/BookmarkDialog.js
Normal file
10
htdocs/lib/BookmarkDialog.js
Normal file
@ -0,0 +1,10 @@
|
||||
$.fn.bookmarkDialog = function() {
|
||||
var $el = this;
|
||||
return {
|
||||
setModes: function(modes) {
|
||||
$el.find('#modulation').html(modes.map(function(m) {
|
||||
return '<option value="' + m.modulation + '">' + m.name + '</option>';
|
||||
}).join(''));
|
||||
}
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ var Modes = {
|
||||
setModes:function(json){
|
||||
this.modes = json.map(function(m){ return new Mode(m); });
|
||||
this.updatePanels();
|
||||
$('#openwebrx-dialog-bookmark').bookmarkDialog().setModes(this.modes);
|
||||
},
|
||||
getModes:function(){
|
||||
return this.modes;
|
||||
|
@ -72,6 +72,7 @@ class CompiledAssetsController(Controller):
|
||||
"lib/Demodulator.js",
|
||||
"lib/DemodulatorPanel.js",
|
||||
"lib/BookmarkBar.js",
|
||||
"lib/BookmarkDialog.js",
|
||||
"lib/AudioEngine.js",
|
||||
"lib/ProgressBar.js",
|
||||
"lib/Measurement.js",
|
||||
|
Loading…
Reference in New Issue
Block a user