Commit 3140a26d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

confirmatin dialog introduced

parent cc50e382
......@@ -7,6 +7,8 @@ minerva (14.0.0~alpha.0) unstable; urgency=low
* Feature removal: BioCompendium annotator removed (#32)
* Small improvement: caching is active by default for new users when
uploading project (#202)
* Small improvement: when removing overlay in admin panel there is a
confirmation dialog (#696)
* Bug fix: export to CellDesigner of reaction with two modifiers connected
with boolean operator resulted was skipping some layout information
* Bug fix: reaction in SBGNML file containing two products was improperly
......
......@@ -487,8 +487,16 @@ EditProjectDialog.prototype._createOverlayTable = function () {
$(overlaysTable).on("click", "[name='removeOverlay']", function () {
var button = this;
$(button).attr("disabled", true);
return self.removeOverlay(parseInt($(button).attr("data"))).then(null, GuiConnector.alert);
var overlayId = parseInt($(button).attr("data"));
var overlay = self._overlayById[overlayId];
return GuiConnector.showConfirmationDialog({
message: "Do you want to delete overlay: " + overlay.getName() + "?"
}).then(function (confirmation) {
if (confirmation) {
$(button).attr("disabled", true);
return self.removeOverlay(overlayId).catch(GuiConnector.alert);
}
});
});
$(overlaysTable).on("change", "[name='overlayName']", function () {
......
......@@ -408,7 +408,7 @@ OverlayPanel.prototype.openEditOverlayDialog = function (overlay) {
if (confirmation) {
return self.removeOverlay(overlay).then(function () {
$(windowSelf).dialog("close");
}).then(null, GuiConnector.alert);
}).catch(GuiConnector.alert);
}
});
}
......
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