summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-07-27 10:23:44 +0200
committerVincent Petry <vincent@nextcloud.com>2022-07-27 10:23:44 +0200
commit8be9b04981c4f0bdf0a2b8d424f55c797ad90a32 (patch)
treefb6783d017fc73e0f54435f464eda71ce0ebb169 /apps/files_trashbin
parent97462295587f4016066264edb6eed5d5e17903f3 (diff)
downloadnextcloud-server-8be9b04981c4f0bdf0a2b8d424f55c797ad90a32.tar.gz
nextcloud-server-8be9b04981c4f0bdf0a2b8d424f55c797ad90a32.zip
Remove legacy #dir element in files list
Removed legacy "#dir" input element in the DOM. Apps should use OCA.Files.App.currentFileList or OCA.Sharing.PublicApp.fileList and call getCurrentDirectory() to retrieve the current directory and changeDirectory() to change it. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/templates/index.php2
-rw-r--r--apps/files_trashbin/tests/js/filelistSpec.js8
2 files changed, 0 insertions, 10 deletions
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
index 441768288fe..5fe2fab4333 100644
--- a/apps/files_trashbin/templates/index.php
+++ b/apps/files_trashbin/templates/index.php
@@ -9,8 +9,6 @@
<p><?php p($l->t('You will be able to recover deleted files from here')); ?></p>
</div>
-<input type="hidden" name="dir" value="" id="dir">
-
<div class="nofilterresults emptycontent hidden">
<div class="icon-search"></div>
<h2><?php p($l->t('No entries found in this folder')); ?></h2>
diff --git a/apps/files_trashbin/tests/js/filelistSpec.js b/apps/files_trashbin/tests/js/filelistSpec.js
index 4b75e2a14fd..90eba960196 100644
--- a/apps/files_trashbin/tests/js/filelistSpec.js
+++ b/apps/files_trashbin/tests/js/filelistSpec.js
@@ -43,8 +43,6 @@ describe('OCA.Trashbin.FileList tests', function () {
// init parameters and test table elements
$('#testArea').append(
'<div id="app-content-trashbin">' +
- // init horrible parameters
- '<input type="hidden" id="dir" value="/"></input>' +
// set this but it shouldn't be used (could be the one from the
// files app)
'<input type="hidden" id="permissions" value="31"></input>' +
@@ -129,7 +127,6 @@ describe('OCA.Trashbin.FileList tests', function () {
fileList.destroy();
fileList = undefined;
- $('#dir').remove();
notificationStub.restore();
alertStub.restore();
});
@@ -174,7 +171,6 @@ describe('OCA.Trashbin.FileList tests', function () {
describe('Rendering rows', function () {
it('renders rows with the correct data when in root', function () {
// dir listing is false when in root
- $('#dir').val('/');
fileList.setFiles(testFiles);
var $rows = fileList.$el.find('tbody tr');
var $tr = $rows.eq(0);
@@ -195,7 +191,6 @@ describe('OCA.Trashbin.FileList tests', function () {
});
it('renders rows with the correct data when in root after calling setFiles with the same data set', function () {
// dir listing is false when in root
- $('#dir').val('/');
fileList.setFiles(testFiles);
fileList.setFiles(fileList.files);
var $rows = fileList.$el.find('tbody tr');
@@ -216,9 +211,6 @@ describe('OCA.Trashbin.FileList tests', function () {
expect(fileList.findFileEl('One.txt.d11111')[0]).toEqual($tr[0]);
});
it('renders rows with the correct data when in subdirectory', function () {
- // dir listing is true when in a subdir
- $('#dir').val('/subdir');
-
fileList.setFiles(testFiles.map(function (file) {
file.name = file.displayName;
return file;