Fit user search to new standard
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
21441fad9b
commit
0281e9dafc
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -189,11 +189,9 @@ export default {
|
||||||
this.setNewUserDefaultGroup(this.$route.params.selectedGroup);
|
this.setNewUserDefaultGroup(this.$route.params.selectedGroup);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable search
|
* Register search
|
||||||
*/
|
*/
|
||||||
document.getElementById('searchbox').style.display = 'block';
|
this.userSearch = new OCA.Search(this.search, this.resetSearch);
|
||||||
document.getElementById('searchbox').addEventListener('input', this.search);
|
|
||||||
document.querySelector('.searchbox .icon-close-white').addEventListener('click', this.resetSearch);
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
settings() {
|
settings() {
|
||||||
|
@ -309,15 +307,13 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
/* SEARCH */
|
/* SEARCH */
|
||||||
search() {
|
search(query) {
|
||||||
this.searchQuery = document.getElementById('searchbox').value;
|
this.searchQuery = query;
|
||||||
this.$store.commit('resetUsers');
|
this.$store.commit('resetUsers');
|
||||||
this.$refs.infiniteLoading.$emit('$InfiniteLoading:reset');
|
this.$refs.infiniteLoading.$emit('$InfiniteLoading:reset');
|
||||||
},
|
},
|
||||||
resetSearch() {
|
resetSearch() {
|
||||||
this.searchQuery = '';
|
this.search('');
|
||||||
document.getElementById('searchbox').value = '';
|
|
||||||
this.search();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
resetForm() {
|
resetForm() {
|
||||||
|
|
|
@ -33,6 +33,7 @@ sync(store, router);
|
||||||
// bind to window
|
// bind to window
|
||||||
Vue.prototype.t = t;
|
Vue.prototype.t = t;
|
||||||
Vue.prototype.OC = OC;
|
Vue.prototype.OC = OC;
|
||||||
|
Vue.prototype.OCA = OCA;
|
||||||
Vue.prototype.oc_userconfig = oc_userconfig;
|
Vue.prototype.oc_userconfig = oc_userconfig;
|
||||||
Vue.prototype.oc_current_user = oc_current_user;
|
Vue.prototype.oc_current_user = oc_current_user;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue