mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-04-06 06:55:10 +00:00
add an overlay feedback
This commit is contained in:
parent
31375fab61
commit
2c3cd98e28
3 changed files with 19 additions and 0 deletions
|
|
@ -163,4 +163,14 @@ h1 {
|
|||
|
||||
.device-log-messages {
|
||||
max-height: 500px;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -18,6 +18,7 @@ $.fn.profileList = function() {
|
|||
$profiles.find('a').attr('draggable', 'false');
|
||||
var $profileEl;
|
||||
var originalIndex;
|
||||
var $spinner = $('.overlay-spinner');
|
||||
|
||||
var moveProfile = function(profileId, index) {
|
||||
var url = $profileList.find('.device a').attr('href');
|
||||
|
|
@ -50,6 +51,8 @@ $.fn.profileList = function() {
|
|||
if (!isValidDrag(event)) return;
|
||||
var $target = $(event.target).closest('.profile');
|
||||
var index = $profileList.find('.profile').index($target);
|
||||
|
||||
$spinner.addClass('d-flex');
|
||||
moveProfile(event.originalEvent.dataTransfer.getData(dataType), index).done(function() {
|
||||
// done
|
||||
}).fail(function() {
|
||||
|
|
@ -57,6 +60,7 @@ $.fn.profileList = function() {
|
|||
$profileEl.remove().insertBefore($profileList.children().eq(originalIndex));
|
||||
}).always(function() {
|
||||
$profileEl = undefined;
|
||||
$spinner.removeClass('d-flex');
|
||||
});
|
||||
}).on('dragend', '.profile', function(event) {
|
||||
if (event.originalEvent.dataTransfer.dropEffect === 'none') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue