Skip to content
Snippets Groups Projects
Commit ec3a13fa authored by Piotr Gawron's avatar Piotr Gawron
Browse files

warning message improved

parent 5780f1d5
No related branches found
No related tags found
1 merge request!980Resolve "Add warning dialog before removing "general view" overlays"
Pipeline #15535 passed
minerva (15.0.0~alpha.0) stable; urgency=medium minerva (15.0.0~alpha.0) stable; urgency=medium
* Small improvement: when downloading a map results in too big file (>1MB) * Small improvement: when downloading a map results in too big file (>1MB)
the content is compressed and returned as a zip file (#348) the content is compressed and returned as a zip file (#348)
* Small improvement: confirmation dialog when removing "general view"
overlays contain proper warning (#809)
* Bug fix: position of structural state is preserved on upload CellDesigner * Bug fix: position of structural state is preserved on upload CellDesigner
file (#671) file (#671)
......
...@@ -506,8 +506,14 @@ EditProjectDialog.prototype._createOverlayTable = function () { ...@@ -506,8 +506,14 @@ EditProjectDialog.prototype._createOverlayTable = function () {
var button = this; var button = this;
var overlayId = parseInt($(button).attr("data")); var overlayId = parseInt($(button).attr("data"));
var overlay = self._overlayById[overlayId]; var overlay = self._overlayById[overlayId];
var confirmationMessage = "Do you want to delete overlay: " + overlay.getName() + "?";
if (!overlay.getInputDataAvailable()) {
confirmationMessage += "<br/><span style='color:red;font-weight:bold'>Warning: This contains one of the map's " +
"diagrams and is required<br/>" +
"for map display. Removing it cannot be undone.</span>"
}
return GuiConnector.showConfirmationDialog({ return GuiConnector.showConfirmationDialog({
message: "Do you want to delete overlay: " + overlay.getName() + "?" message: confirmationMessage
}).then(function (confirmation) { }).then(function (confirmation) {
if (confirmation) { if (confirmation) {
$(button).attr("disabled", true); $(button).attr("disabled", true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment