automatically load modes into bookmark dialog
This commit is contained in:
parent
a6a29b7032
commit
93b8f75cc3
@ -211,17 +211,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-field">
|
<div class="form-field">
|
||||||
<label for="modulation">Modulation:</label>
|
<label for="modulation">Modulation:</label>
|
||||||
<select name="modulation" id="modulation">
|
<select name="modulation" id="modulation"></select>
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<div class="openwebrx-button" data-action="cancel">Cancel</div>
|
<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){
|
setModes:function(json){
|
||||||
this.modes = json.map(function(m){ return new Mode(m); });
|
this.modes = json.map(function(m){ return new Mode(m); });
|
||||||
this.updatePanels();
|
this.updatePanels();
|
||||||
|
$('#openwebrx-dialog-bookmark').bookmarkDialog().setModes(this.modes);
|
||||||
},
|
},
|
||||||
getModes:function(){
|
getModes:function(){
|
||||||
return this.modes;
|
return this.modes;
|
||||||
|
@ -72,6 +72,7 @@ class CompiledAssetsController(Controller):
|
|||||||
"lib/Demodulator.js",
|
"lib/Demodulator.js",
|
||||||
"lib/DemodulatorPanel.js",
|
"lib/DemodulatorPanel.js",
|
||||||
"lib/BookmarkBar.js",
|
"lib/BookmarkBar.js",
|
||||||
|
"lib/BookmarkDialog.js",
|
||||||
"lib/AudioEngine.js",
|
"lib/AudioEngine.js",
|
||||||
"lib/ProgressBar.js",
|
"lib/ProgressBar.js",
|
||||||
"lib/Measurement.js",
|
"lib/Measurement.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user