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-02-01 16:21:23 +0100
commit414804d534056230871d4aa24fcb53c9b642099e (patch)
tree0eb92d62a77955727c5417a069113c676496832a /apps/files
parente94412e9e8bf16e39b0178f57f13625e301aee1c (diff)
downloadnextcloud-server-414804d534056230871d4aa24fcb53c9b642099e.tar.gz
nextcloud-server-414804d534056230871d4aa24fcb53c9b642099e.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 40dde82778b..df346b3c63a 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -354,8 +354,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)
});