mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
filter docs by category, search query params
This commit is contained in:
parent
666ab3151e
commit
9fd53142f3
6 changed files with 18 additions and 19 deletions
|
@ -18,6 +18,8 @@ export default Controller.extend(NotifierMixin, {
|
|||
documentService: service('document'),
|
||||
folderService: service('folder'),
|
||||
localStorage: service('localStorage'),
|
||||
queryParams: ['category'],
|
||||
category: '',
|
||||
|
||||
actions: {
|
||||
onAddSpace(payload) {
|
||||
|
|
|
@ -19,5 +19,6 @@
|
|||
categorySummary=model.categorySummary
|
||||
categoryMembers=model.categoryMembers
|
||||
rootDocCount=model.rootDocCount
|
||||
categoryFilter=category
|
||||
onRefresh=(action 'onRefresh')}}
|
||||
</div>
|
|
@ -10,13 +10,13 @@
|
|||
// https://documize.com
|
||||
|
||||
import { debounce } from '@ember/runloop';
|
||||
|
||||
import { inject as service } from '@ember/service';
|
||||
import Controller from '@ember/controller';
|
||||
|
||||
export default Controller.extend({
|
||||
searchService: service('search'),
|
||||
filter: "",
|
||||
queryParams: ['filter', 'matchDoc', 'matchContent', 'matchTag', 'matchFile'],
|
||||
filter: '',
|
||||
results: [],
|
||||
matchDoc: true,
|
||||
matchContent: true,
|
||||
|
@ -30,12 +30,15 @@ export default Controller.extend({
|
|||
onMatchDoc: function () {
|
||||
debounce(this, this.fetch, 750);
|
||||
}.observes('matchDoc'),
|
||||
|
||||
onMatchContent: function () {
|
||||
debounce(this, this.fetch, 750);
|
||||
}.observes('matchContent'),
|
||||
|
||||
onMatchTag: function () {
|
||||
debounce(this, this.fetch, 750);
|
||||
}.observes('matchTag'),
|
||||
|
||||
onMatchFile: function () {
|
||||
debounce(this, this.fetch, 750);
|
||||
}.observes('matchFile'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue