diff options
Diffstat (limited to 'settings/src')
-rw-r--r-- | settings/src/components/userList.vue | 14 | ||||
-rw-r--r-- | settings/src/main.js | 1 |
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; |