Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always show spinner when copying/moving to mailbox #1235

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modules/core/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -1858,6 +1858,14 @@ var err_msg = function(msg) {
return "ERR"+hm_trans(msg);
};

var hm_spinner = function(type = 'border', size = '') {
return `<div class="d-flex justify-content-center spinner">
<div class="spinner-${type} text-dark${size ? ` spinner-${type}-${size}` : ''}" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>`
};

var fillImapData = function(details) {
$('#srv_setup_stepper_imap_address').val(details.server);
$('#srv_setup_stepper_imap_port').val(details.port);
Expand Down
7 changes: 1 addition & 6 deletions modules/sievefilters/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,11 +678,6 @@ $(function () {
' </td>' +
extra_options +
' <td class="col-sm-5">' +
' <div class="d-flex justify-content-center spinner d-none">' +
' <div class="spinner-border text-dark role="status">' +
' <span class="visually-hidden">Loading...</span>' +
' </div>' +
' </div>' +
' <input type="hidden" name="sieve_selected_action_value[]" value="">' +
' </input>' +
' <td class="col-sm-1 text-end align-middle">' +
Expand Down Expand Up @@ -779,7 +774,7 @@ $(function () {
}
if (selected_action.type === 'mailbox') {
let mailboxes = null;
tr_elem.children().find('.spinner').removeClass('d-none');
tr_elem.children().eq(2).html(hm_spinner());
Hm_Ajax.request(
[ {'name': 'hm_ajax_hook', 'value': 'ajax_sieve_get_mailboxes'},
{'name': 'imap_account', 'value': current_account} ],
Expand Down