Close upload when clicking the close button

This commit is contained in:
Tobias Reich 2014-08-16 20:53:46 +02:00
parent cf6ea7530e
commit 1172f3b537

View File

@ -164,9 +164,6 @@ $(document).ready(function(){
/* Add Dialog */ /* Add Dialog */
.on(event_name, ".button_add", function(e) { contextMenu.add(e) }) .on(event_name, ".button_add", function(e) { contextMenu.add(e) })
/* Upload */
.on("change", "#upload_files", function() { modal.close(); upload.start.local(this.files) })
/* Context Menu */ /* Context Menu */
.on("contextmenu", ".photo", function(e) { contextMenu.photo(photo.getID(), e) }) .on("contextmenu", ".photo", function(e) { contextMenu.photo(photo.getID(), e) })
.on("contextmenu", ".album", function(e) { contextMenu.album(album.getID(), e) }) .on("contextmenu", ".album", function(e) { contextMenu.album(album.getID(), e) })
@ -177,6 +174,8 @@ $(document).ready(function(){
.on(event_name, "#infobox_overlay", view.infobox.hide) .on(event_name, "#infobox_overlay", view.infobox.hide)
/* Upload */ /* Upload */
.on("change", "#upload_files", function() { modal.close(); upload.start.local(this.files) })
.on(event_name, ".upload_message a.close", upload.close)
.on("dragover", function(e) { e.preventDefault(); }, false) .on("dragover", function(e) { e.preventDefault(); }, false)
.on("drop", function(e) { .on("drop", function(e) {
e.stopPropagation(); e.stopPropagation();