mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-25 04:33:50 +01:00
update remove button for editors
This commit is contained in:
parent
0dc7ead2a9
commit
b7e5500e96
@ -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>');
|
this.removeButton = $('<button type="button" class="btn btn-secondary" id="removeBtn" data-dismiss="modal">'+ $msg('REMOVE') +'</button>');
|
||||||
footer.append(this.removeButton);
|
footer.append(this.removeButton);
|
||||||
this.removeButton.on('click', this.options.onRemoveClickData, this.onRemoveClick);
|
this.removeButton.on('click', this.options.onRemoveClickData, this.onRemoveClick);
|
||||||
this.removeButton.hide();
|
|
||||||
}
|
}
|
||||||
if (this.options.cancelButton) {
|
if (this.options.cancelButton) {
|
||||||
footer.append('<button type="button" class="btn btn-secondary" data-dismiss="modal">'+ $msg('CANCEL') +'</button>');
|
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() {
|
onDialogShown: function() {
|
||||||
$(this).find('#inputUrl').focus();
|
$(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() {
|
onDialogShown: function() {
|
||||||
$(this).find('textarea').focus();
|
$(this).find('textarea').focus();
|
||||||
|
},
|
||||||
|
|
||||||
|
onRemoveClick: function(event) {
|
||||||
|
event.data.model.setValue(null);
|
||||||
|
event.data.dialog.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user