update remove button for editors
parent
c78ae247f4
commit
ac425c6f0d
|
@ -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>');
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue