diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-02-18 13:52:05 +0400 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-02-25 22:37:33 +0400 |
commit | a0feffb2a786c886e2cba2725d749f76493eaf61 (patch) | |
tree | cb1c79ce92eae40d39d8f42525b6362304352b39 /settings | |
parent | 34d17e61685f479b406bbd300c1d41e35df35cd0 (diff) |
Added loading spinner to users list on scroll
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index 8b98e5928ad..e50a9bd556a 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -223,6 +223,7 @@ var UserList = { if (UserList.updating) { return; } + $('table+.loading').css('visibility', 'visible'); UserList.updating = true; $.get(OC.Router.generate('settings_ajax_userlist', { offset: UserList.offset, limit: UserList.usersToLoad }), function (result) { var loadedUsers = 0; @@ -242,9 +243,11 @@ var UserList = { }); if (result.data.length > 0) { UserList.doSort(); + $('table+.loading').css('visibility', 'hidden'); } else { UserList.noMoreEntries = true; + $('table+.loading').remove(); } UserList.offset += loadedUsers; // animate @@ -371,6 +374,7 @@ $(document).ready(function () { OC.Router.registerLoadedCallback(function() { $(window).scroll(function(e) {UserList._onScroll(e);}); }); + $('table').after($('<div class="loading" style="height: 200px; visibility: hidden;"></div>')); $('select[multiple]').each(function (index, element) { UserList.applyMultiplySelect($(element)); |