diff options
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/users/filter.js | 12 | ||||
-rw-r--r-- | settings/js/users/users.js | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/settings/js/users/filter.js b/settings/js/users/filter.js index 456c51376b9..403e9c00c11 100644 --- a/settings/js/users/filter.js +++ b/settings/js/users/filter.js @@ -71,3 +71,15 @@ UserManagementFilter.prototype.run = function() { UserManagementFilter.prototype.getPattern = function() { return this.filterInput.val(); }; + +/** + * @brief adds reset functionality to an HTML element + * @param jQuery the jQuery representation of that element + */ +UserManagementFilter.prototype.addResetButton = function(button) { + var umf = this; + button.click(function(){ + umf.filterInput.val(''); + umf.run(); + }); +};
\ No newline at end of file diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 092998c029f..3832464c346 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -425,6 +425,7 @@ $(document).ready(function () { // Implements User Search filter = new UserManagementFilter( $('#usersearchform input'), UserList, GroupList); + filter.addResetButton($('.userFilterReset').first()); UserList.doSort(); UserList.availableGroups = $('#content table').data('groups'); |