diff --git a/mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog.js b/mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog.js
index 4b9b1522..87676f52 100644
--- a/mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog.js
+++ b/mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog.js
@@ -54,7 +54,6 @@ var BootstrapDialog = new Class({
this.removeButton = $('');
footer.append(this.removeButton);
this.removeButton.on('click', this.options.onRemoveClickData, this.onRemoveClick);
- this.removeButton.hide();
}
if (this.options.cancelButton) {
footer.append('');
diff --git a/mindplot/src/main/javascript/widget/LinkEditor.js b/mindplot/src/main/javascript/widget/LinkEditor.js
index 8bc9d48d..fa71cfdb 100644
--- a/mindplot/src/main/javascript/widget/LinkEditor.js
+++ b/mindplot/src/main/javascript/widget/LinkEditor.js
@@ -116,6 +116,11 @@ mindplot.widget.LinkEditor = new Class({
onDialogShown: function() {
$(this).find('#inputUrl').focus();
+ },
+
+ onRemoveClick: function(event) {
+ event.data.model.setValue(null);
+ event.data.dialog.close();
}
});
diff --git a/mindplot/src/main/javascript/widget/NoteEditor.js b/mindplot/src/main/javascript/widget/NoteEditor.js
index 0a10b65e..a0cac2b8 100644
--- a/mindplot/src/main/javascript/widget/NoteEditor.js
+++ b/mindplot/src/main/javascript/widget/NoteEditor.js
@@ -82,6 +82,11 @@ mindplot.widget.NoteEditor = new Class({
onDialogShown: function() {
$(this).find('textarea').focus();
+ },
+
+ onRemoveClick: function(event) {
+ event.data.model.setValue(null);
+ event.data.dialog.close();
}
});