summaryrefslogtreecommitdiffstats
path: root/settings/src
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-19 11:16:36 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-19 23:54:00 +0200
commit0281e9dafc6a85b176da3786b62c607e1573e80e (patch)
tree89f9078a389813d582c36dce96b1fa9e5791dbd5 /settings/src
parent21441fad9b6901728f6152d35e2ae33105db5046 (diff)
downloadnextcloud-server-0281e9dafc6a85b176da3786b62c607e1573e80e.tar.gz
nextcloud-server-0281e9dafc6a85b176da3786b62c607e1573e80e.zip
Fit user search to new standard
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'settings/src')
-rw-r--r--settings/src/components/userList.vue14
-rw-r--r--settings/src/main.js1
2 files changed, 6 insertions, 9 deletions
diff --git a/settings/src/components/userList.vue b/settings/src/components/userList.vue
index 31a3bfcd4ef..9b599fb275d 100644
--- a/settings/src/components/userList.vue
+++ b/settings/src/components/userList.vue
@@ -189,11 +189,9 @@ export default {
this.setNewUserDefaultGroup(this.$route.params.selectedGroup);
/**
- * Enable search
+ * Register search
*/
- document.getElementById('searchbox').style.display = 'block';
- document.getElementById('searchbox').addEventListener('input', this.search);
- document.querySelector('.searchbox .icon-close-white').addEventListener('click', this.resetSearch);
+ this.userSearch = new OCA.Search(this.search, this.resetSearch);
},
computed: {
settings() {
@@ -309,15 +307,13 @@ export default {
},
/* SEARCH */
- search() {
- this.searchQuery = document.getElementById('searchbox').value;
+ search(query) {
+ this.searchQuery = query;
this.$store.commit('resetUsers');
this.$refs.infiniteLoading.$emit('$InfiniteLoading:reset');
},
resetSearch() {
- this.searchQuery = '';
- document.getElementById('searchbox').value = '';
- this.search();
+ this.search('');
},
resetForm() {
diff --git a/settings/src/main.js b/settings/src/main.js
index 93d8774e2fe..e8171c95ba3 100644
--- a/settings/src/main.js
+++ b/settings/src/main.js
@@ -33,6 +33,7 @@ sync(store, router);
// bind to window
Vue.prototype.t = t;
Vue.prototype.OC = OC;
+Vue.prototype.OCA = OCA;
Vue.prototype.oc_userconfig = oc_userconfig;
Vue.prototype.oc_current_user = oc_current_user;