openwebrxplus/htdocs/lib/settings/Profiles.js

24 lines
753 B
JavaScript

$.fn.profiles = function() {
this.each(function() {
$(this).on('click', '.move-down', function(e) {
$.ajax(document.URL.replace(/\/profile\//, '/moveprofiledown/'), {
contentType: 'application/json',
method: 'GET'
}).done(function() {
document.location.reload();
});
return false;
});
$(this).on('click', '.move-up', function(e) {
$.ajax(document.URL.replace(/\/profile\//, '/moveprofileup/'), {
contentType: 'application/json',
method: 'GET'
}).done(function() {
document.location.reload();
});
return false;
});
});
}