Skip to content

Commit 5844fb6

Browse files
authored
Merge pull request #9027 from johndoh/list-loading
2 parents 53b1e7b + c8e4a02 commit 5844fb6

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
- Fix insert_or_update() and reading database server config on PostgreSQL (#9710)
7777
- Fix Oauth issues with use_secure_urls=true (#9722)
7878
- Fix handling of binary mail parts (e.g. PDF) encoded with quoted-printable (#9728)
79+
- Clear "list is empty" message on loading a new list. Previously that message was still visible until the new list was fully loaded, which (if loading was slow) could give the impression that the newly loading is list empty, too. (#9006)
7980

8081
## Release 1.6.9
8182

skins/elastic/ui.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -633,9 +633,7 @@ function rcube_elastic_ui() {
633633
msg = table.data('label-msg'),
634634
list = table.is('ul') ? table : table.children('tbody');
635635

636-
if (!rcmail.env.search_request && !rcmail.env.qsearch
637-
&& msg && !list.children(':visible').length
638-
) {
636+
if (msg && !list.children(':visible').length) {
639637
ext = table.data('label-ext');
640638
command = table.data('create-command');
641639

@@ -644,15 +642,16 @@ function rcube_elastic_ui() {
644642
}
645643

646644
info.text(msg).removeClass('hidden');
647-
return;
648645
}
649-
650-
info.addClass('hidden');
651646
},
652647
callback = function () {
648+
info.addClass('hidden');
649+
653650
// wait until the UI stops loading and the list is visible
654651
if (rcmail.busy || !table.is(':visible')) {
655-
return setTimeout(callback, 250);
652+
clearTimeout(env.list_timer);
653+
env.list_timer = setTimeout(callback, 250);
654+
return;
656655
}
657656

658657
clearTimeout(env.list_timer);

tests/Browser/Contacts/ExportTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public function testExportAll()
4646
public function testExportSelected()
4747
{
4848
$this->browse(function ($browser) {
49-
$browser->ctrlClick('#contacts-table tbody tr:first-child');
49+
$browser->waitFor('#contacts-table tbody tr:first-child')
50+
->ctrlClick('#contacts-table tbody tr:first-child');
5051

5152
$browser->clickToolbarMenuItem('export', 'export.select');
5253

0 commit comments

Comments
 (0)