mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-01-09 10:10:01 +01:00
add an overlay feedback
This commit is contained in:
parent
31375fab61
commit
2c3cd98e28
|
|
@ -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') {
|
||||
|
|
|
|||
|
|
@ -208,6 +208,11 @@ class SdrFormControllerWithModal(SdrFormController, metaclass=ABCMeta):
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay overlay-spinner justify-content-center align-items-center">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
""".format(
|
||||
object_type=self.getModalObjectType(),
|
||||
confirm_url=self.getModalConfirmUrl(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue