Fit user search to new standard

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/9912/head
John Molakvoæ (skjnldsv) 7 years ago
parent 21441fad9b
commit 0281e9dafc
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
  1. 3827
      settings/js/settings-vue.js
  2. 6
      settings/js/settings-vue.js.map
  3. 14
      settings/src/components/userList.vue
  4. 1
      settings/src/main.js

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);
/**
* 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() {

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

Loading…
Cancel
Save