Skip to content
Snippets Groups Projects
Unverified Commit 259f70d6 authored by John Molakvoæ's avatar John Molakvoæ
Browse files

Apps search

parent 8f88c5ac
No related branches found
No related tags found
No related merge requests found
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div id="app"> <div id="app">
<app-navigation :menu="menu" /> <app-navigation :menu="menu" />
<div id="app-content" class="app-settings-content" :class="{ 'with-app-sidebar': currentApp, 'icon-loading': loadingList }"> <div id="app-content" class="app-settings-content" :class="{ 'with-app-sidebar': currentApp, 'icon-loading': loadingList }">
<app-list :category="category" :app="currentApp" :search="search"></app-list> <app-list :category="category" :app="currentApp" :search="searchQuery"></app-list>
<div id="app-sidebar" v-if="id && currentApp"> <div id="app-sidebar" v-if="id && currentApp">
<app-details :category="category" :app="currentApp"></app-details> <app-details :category="category" :app="currentApp"></app-details>
</div> </div>
...@@ -63,8 +63,11 @@ export default { ...@@ -63,8 +63,11 @@ export default {
appList, appList,
}, },
methods: { methods: {
setSearch(search) { setSearch(query) {
this.search = search; this.searchQuery = query;
},
resetSearch() {
this.setSearch('');
} }
}, },
beforeMount() { beforeMount() {
...@@ -74,16 +77,14 @@ export default { ...@@ -74,16 +77,14 @@ export default {
this.$store.commit('setUpdateCount', this.$store.getters.getServerData.updateCount) this.$store.commit('setUpdateCount', this.$store.getters.getServerData.updateCount)
}, },
mounted() { mounted() {
// TODO: remove jQuery once we have a proper standardisation of the search /**
$('#searchbox').show(); * Register search
let self = this; */
$('#searchbox').change(function(e) { this.appSearch = new OCA.Search(this.setSearch, this.resetSearch);
self.setSearch($('#searchbox').val());
});
}, },
data() { data() {
return { return {
search: '' searchQuery: ''
} }
}, },
watch: { watch: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment