mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-04-04 22:17:34 +00:00
automatically load modes into bookmark dialog
This commit is contained in:
parent
a6a29b7032
commit
93b8f75cc3
4 changed files with 13 additions and 11 deletions
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue