Commit 90fad475 authored by Piotr Gawron's avatar Piotr Gawron

Merge branch...

Merge branch '849-during-upload-of-overlay-the-chosen-file-name-is-not-displayed' into 'devel_13.1.x'

Resolve "During upload of overlay the chosen file name is not displayed"

See merge request !884
parents 1f05f5a4 22d353ab
Pipeline #12919 passed with stage
in 9 minutes and 3 seconds
......@@ -4,6 +4,7 @@ minerva (13.1.3) stable; urgency=medium
* Bug fix: submap list must be selected to export from every submap (#874)
* Bug fix: export map as image properly uses bottom limit (#875)
* Bug fix: reaction info window wasn't closed on CLEAR (#876)
* Bug fix: name of the uploaded file is displayed when adding overlay (#849)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 14 Aug 2019 17:00:00 +0200
......
......@@ -94,9 +94,7 @@ AddOverlayDialog.prototype.createGui = function () {
name: "overlay-file"
});
fileInput.addEventListener("change", function () {
return self.processFile(fileInput.files[0]).then(function () {
$(fileInput).val("");
}).catch(GuiConnector.alert);
return self.processFile(fileInput.files[0]).catch(GuiConnector.alert);
}, false);
content.appendChild(fileInput);
content.appendChild(guiUtils.createNewLine());
......@@ -293,9 +291,10 @@ AddOverlayDialog.prototype.open = function () {
return self.addOverlay().then(function (result) {
$(dialog).dialog("close");
return result;
}, function (error) {
}).catch(function (error) {
GuiConnector.hideProcessing();
if (error instanceof NetworkError && error.statusCode === HttpStatus.BAD_REQUEST) {
$("[name='overlay-file']", self.getElement()).val("");
var errorMessage = JSON.parse(error.content);
GuiConnector.alert("Problematic input: <br/>" + errorMessage.reason);
} else if (error instanceof SecurityError) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment