mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-24 23:17:56 +01:00
dialog modal with focus and submit on enter
This commit is contained in:
parent
b3e2e37929
commit
3df00e9e0e
@ -164,7 +164,18 @@ jQuery.fn.dialogForm = function (options) {
|
|||||||
this.modal('hide');
|
this.modal('hide');
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
|
// Register enter input to submit...
|
||||||
|
$("input").keypress(function(event) {
|
||||||
|
if (event.which == 13) {
|
||||||
|
event.preventDefault();
|
||||||
|
acceptBtn.trigger('click');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Open the modal dialog ...
|
// Open the modal dialog ...
|
||||||
|
this.on('shown', function() {
|
||||||
|
$('#' + containerId + ' input:first').focus();
|
||||||
|
});
|
||||||
this.modal();
|
this.modal();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user