Fit user search to new standard

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-06-19 11:16:36 +02:00
parent 21441fad9b
commit 0281e9dafc
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
4 changed files with 33 additions and 3815 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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() {

View File

@ -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;