summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-04-17 22:14:04 +0200
committerArthur Schiwon <blizzz@owncloud.com>2014-06-02 12:53:57 +0200
commita9bd416643ad950de5f21aaaa4f5c77dd51c787a (patch)
tree5f7d969e3229d9473a6c591c3354317a94ac720f /settings
parent3ff123f247b8bc29665a28c3641c3fc445a4a161 (diff)
downloadnextcloud-server-a9bd416643ad950de5f21aaaa4f5c77dd51c787a.tar.gz
nextcloud-server-a9bd416643ad950de5f21aaaa4f5c77dd51c787a.zip
add reset button for the filter field
Diffstat (limited to 'settings')
-rw-r--r--settings/css/settings.css10
-rw-r--r--settings/js/users/filter.js12
-rw-r--r--settings/js/users/users.js1
-rw-r--r--settings/templates/users/part.createuser.php3
4 files changed, 23 insertions, 3 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css
index e6ad4fd304f..604b5024371 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -63,8 +63,8 @@ li.active span.utils .delete {
}
li.active .rename {
padding: 8px 14px 20px 14px;
- top: 0px; position: absolute; width: 16px; height: 16px;
- opacity: 0.5;
+ top: 0px; position: absolute; width: 16px; height: 16px;
+ opacity: 0.5;
display: inline-block !important;
}
li.active span.utils .delete img { margin: 14px; }
@@ -108,6 +108,12 @@ div.quota>span {
}
select.quota.active { background: #fff; }
+input.userFilter {width: 200px;}
+span.userFilterReset {
+ width: 16px; height: 16px; position: absolute;
+ padding-top: 20px; margin-left: -20px;
+}
+
/* positioning fixes */
#newuser .multiselect {
min-width: 150px !important;
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');
diff --git a/settings/templates/users/part.createuser.php b/settings/templates/users/part.createuser.php
index 6af1e934e1d..2e37f3885a0 100644
--- a/settings/templates/users/part.createuser.php
+++ b/settings/templates/users/part.createuser.php
@@ -27,6 +27,7 @@
</div>
<?php endif; ?>
<form autocomplete="off" id="usersearchform">
- <input type="text" class="input" placeholder="<?php p($l->t('Search Users and Groups')); ?>" />
+ <input type="text" class="input userFilter" placeholder="<?php p($l->t('Search Users and Groups')); ?>" />
+ <span class="svg icon-delete userFilterReset"></a>
</form>
</div> \ No newline at end of file