mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 19:29:58 +03:00
fixes #2286 trigger the click action on pressing enter
...and if the value of applyAction is not equal to -1
This commit is contained in:
parent
9e9fb327f0
commit
5182e69dcd
1 changed files with 8 additions and 0 deletions
|
@ -224,6 +224,14 @@ function selectDelDerivNone() {
|
||||||
$('#action_delete_derivatives input[name="del_derivatives_type[]"]').prop("checked", false).trigger("change");
|
$('#action_delete_derivatives input[name="del_derivatives_type[]"]').prop("checked", false).trigger("change");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trigger action click on pressing enter and if the value of applyAction is not equal to -1
|
||||||
|
$(window).on('keypress', function(e) {
|
||||||
|
if (e.key === "Enter" && $("select[name='selectAction']").val() != -1) {
|
||||||
|
e.preventDefault();
|
||||||
|
$('#applyAction').trigger('click');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/* sync metadatas or delete photos by blocks, with progress bar */
|
/* sync metadatas or delete photos by blocks, with progress bar */
|
||||||
jQuery('#applyAction').click(function(e) {
|
jQuery('#applyAction').click(function(e) {
|
||||||
if (typeof(elements) != "undefined") {
|
if (typeof(elements) != "undefined") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue