diff --git a/htdocs/lib/settings/ProfileList.js b/htdocs/lib/settings/ProfileList.js index dcf9df9d..e215dbbf 100644 --- a/htdocs/lib/settings/ProfileList.js +++ b/htdocs/lib/settings/ProfileList.js @@ -11,14 +11,6 @@ $.fn.profileList = function() { return !!$target.length; } - var moveProfile = function(profileId, index) { - return $.ajax(document.location.href + '/moveprofile', { - data: JSON.stringify({profile_id: profileId, index: index}), - contentType: 'application/json', - method: 'POST' - }); - } - this.each(function () { var $profileList = $(this); var $profiles = $profileList.find('.profile'); @@ -26,6 +18,16 @@ $.fn.profileList = function() { $profiles.find('a').attr('draggable', 'false'); var $profileEl; var originalIndex; + + var moveProfile = function(profileId, index) { + var url = $profileList.find('.device a').attr('href'); + return $.ajax(url + '/moveprofile', { + data: JSON.stringify({profile_id: profileId, index: index}), + contentType: 'application/json', + method: 'POST' + }); + } + $profileList.on('dragstart', '.profile', function(event){ $profileEl = $(event.originalEvent.target); originalIndex = $profileEl.index(); diff --git a/owrx/controllers/settings/sdr.py b/owrx/controllers/settings/sdr.py index 9440465c..110b2fa0 100644 --- a/owrx/controllers/settings/sdr.py +++ b/owrx/controllers/settings/sdr.py @@ -130,7 +130,7 @@ class SdrFormController(SettingsFormController, metaclass=ABCMeta): def render_tabs(self): return """