Compare commits

...

2 Commits

Author SHA1 Message Date
Joas Schilling 75d973ee20
Fix "No entries in this …" template
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-30 11:52:47 +02:00
Julius Härtl 0b0db242a1
WIP: Implement local filtering in file list
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-04-29 12:09:06 +02:00
6 changed files with 48 additions and 4 deletions

View File

@ -0,0 +1,42 @@
/*
* @copyright Copyright (c) 2021 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import { subscribe } from '@nextcloud/event-bus'
(function() {
const FilesPlugin = {
attach(fileList) {
subscribe('nextcloud:unified-search.search', ({ query }) => {
fileList.setFilter(query)
})
subscribe('nextcloud:unified-search.reset', () => {
this.query = null
fileList.setFilter('')
})
},
}
window.OC.Plugins.register('OCA.Files.FileList', FilesPlugin)
})()

View File

@ -32,6 +32,8 @@ import Vue from 'vue'
import TemplatePickerView from './views/TemplatePicker'
import { showError } from '@nextcloud/dialogs'
import './legacy/filelistSearch'
// Set up logger
const logger = getLoggerBuilder()
.setApp('files')

View File

@ -5,7 +5,7 @@
<input type="hidden" name="dir" value="" id="dir">
<div class="nofilterresults hidden">
<div class="nofilterresults emptycontent hidden">
<div class="icon-search"></div>
<h2><?php p($l->t('No entries found in this folder')); ?></h2>
<p></p>

View File

@ -8,7 +8,7 @@
<input type="hidden" name="dir" value="" id="dir">
<div class="nofilterresults hidden">
<div class="nofilterresults emptycontent hidden">
<div class="icon-search"></div>
<h2><?php p($l->t('No entries found in this folder')); ?></h2>
<p></p>

View File

@ -5,7 +5,7 @@
<input type="hidden" name="dir" value="" id="dir">
<div class="nofilterresults hidden">
<div class="nofilterresults emptycontent hidden">
<div class="icon-search"></div>
<h2><?php p($l->t('No entries found in this folder')); ?></h2>
</div>

View File

@ -12,7 +12,7 @@
<input type="hidden" name="dir" value="" id="dir">
<div class="nofilterresults hidden">
<div class="nofilterresults emptycontent hidden">
<div class="icon-search"></div>
<h2><?php p($l->t('No entries found in this folder')); ?></h2>
<p></p>