diff options
author | giorgia <g.sambrotta@gmail.com> | 2017-03-01 21:09:03 +0100 |
---|---|---|
committer | giorgia <g.sambrotta@gmail.com> | 2017-03-03 14:46:06 +0100 |
commit | abc48f9e91fc117c8f6d0fcf7849ffca9489248b (patch) | |
tree | 225a69e3a6567338b9cb1dce21df78cabefff31f /settings | |
parent | 53a484ede6b0211f42c6e0cdb85916ae5e034611 (diff) | |
download | nextcloud-server-abc48f9e91fc117c8f6d0fcf7849ffca9489248b.tar.gz nextcloud-server-abc48f9e91fc117c8f6d0fcf7849ffca9489248b.zip |
add emptycontent div, show/hide emptycontent div, fix #1070
Signed-off-by: giorgia <g.sambrotta@gmail.com>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users/users.js | 9 | ||||
-rw-r--r-- | settings/templates/users/part.userlist.php | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js index db9f6b6006b..8edc20e3e2b 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -383,6 +383,7 @@ var UserList = { } UserList.currentGid = gid; var pattern = this.filter; + var emptyContainer = $userList.siblings('.emptycontent'); $.get( OC.generateUrl('/settings/users/users'), { offset: UserList.offset, limit: limit, gid: gid, pattern: pattern }, @@ -396,15 +397,22 @@ var UserList = { } UserList.add(user); }); + if (result.length > 0) { UserList.doSort(); $userList.siblings('.loading').css('visibility', 'hidden'); // reset state on load UserList.noMoreEntries = false; + $userListHead.show(); + emptyContainer.hide(); + emptyContainer.find('h2 strong').html(); } else { UserList.noMoreEntries = true; $userList.siblings('.loading').remove(); + $userListHead.hide(); + emptyContainer.show(); + emptyContainer.find('h2 strong').html(pattern); } UserList.offset += limit; }).always(function() { @@ -668,6 +676,7 @@ var UserList = { $(document).ready(function () { $userList = $('#userlist'); $userListBody = $userList.find('tbody'); + $userListHead = $userList.find('thead'); UserList.initDeleteHandling(); diff --git a/settings/templates/users/part.userlist.php b/settings/templates/users/part.userlist.php index 4cf395ff62d..12adbb9f30a 100644 --- a/settings/templates/users/part.userlist.php +++ b/settings/templates/users/part.userlist.php @@ -67,3 +67,8 @@ </tr> </tbody> </table> + +<div class="emptycontent" style="display:none"> + <div class="icon-search"></div> + <h2><?php p($l->t("No user found for '"));?><strong></strong>' </h2> +</div> |