summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-01-31 18:53:27 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-01-31 19:14:58 +0100
commit72a424d4c843c019301a1ee61e6ed8bc0f60913f (patch)
treecabac23774669e7dbf9a0bc9e11b44c330353d33 /apps/files
parentdd91c4e500b1c6049d2af03d126b7f48d3b90621 (diff)
downloadnextcloud-server-72a424d4c843c019301a1ee61e6ed8bc0f60913f.tar.gz
nextcloud-server-72a424d4c843c019301a1ee61e6ed8bc0f60913f.zip
Remove unneeded triggering of event
The "droppedOnTrash" event was being triggered when the file list was initialized, but it should be triggered only when the user actually drops a file on the trash bin. Besides that, the event had no effect; only the file list handles it, but as it was not triggered on any element it ended being triggered on the document, and thus not handled. Moreover, even if it had been triggered on the file list it would have been done before the handler was set, so it would not have been handled anyway. And even if it had been handled no data was provided, so the handler would have failed. In conclusion, triggering the event there was not needed, and thus it was removed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/js/filelist.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 88cb453bd42..66965eab52b 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -360,8 +360,6 @@
this.$fileList.on('click','td.filename>a.name, td.filesize, td.date', _.bind(this._onClickFile, this));
- $.event.trigger({type: "droppedOnTrash"});
-
this.$fileList.on("droppedOnTrash", function (event, filename, directory) {
self.do_delete(filename, directory)
});