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>
This commit is contained in:
parent
dd91c4e500
commit
72a424d4c8
1 changed files with 0 additions and 2 deletions
|
@ -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)
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue