update remove button for editors

This commit is contained in:
Mariela Michalek 2014-09-14 18:32:18 -03:00
parent 0dc7ead2a9
commit b7e5500e96
3 changed files with 10 additions and 1 deletions

View File

@ -54,7 +54,6 @@ var BootstrapDialog = new Class({
this.removeButton = $('<button type="button" class="btn btn-secondary" id="removeBtn" data-dismiss="modal">'+ $msg('REMOVE') +'</button>');
footer.append(this.removeButton);
this.removeButton.on('click', this.options.onRemoveClickData, this.onRemoveClick);
this.removeButton.hide();
}
if (this.options.cancelButton) {
footer.append('<button type="button" class="btn btn-secondary" data-dismiss="modal">'+ $msg('CANCEL') +'</button>');

View File

@ -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();
}
});

View File

@ -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();
}
});