From 72a424d4c843c019301a1ee61e6ed8bc0f60913f Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Thu, 31 Jan 2019 18:53:27 +0100 Subject: Remove unneeded triggering of event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apps/files/js/filelist.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'apps/files') 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) }); -- cgit v1.2.3