Skip to content

Commit

Permalink
#134 [JS] add: keyEvent for search and removefilter in timespent list
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Jan 31, 2023
1 parent 385da00 commit f65edeb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions js/dolisirh.js
Original file line number Diff line number Diff line change
Expand Up @@ -1202,15 +1202,21 @@ window.eoxiaJS.keyEvent.event = function() {
/**
* Action modal close & validation with key events
*
* @since 1.4.0
* @version 1.4.0
* @since 1.2.0
* @version 1.2.1
*
* @return {void}
*/
window.eoxiaJS.keyEvent.keyup = function( event ) {
if ( 'Escape' === event.key ) {
window.eoxiaJS.keyEvent.keyup = function(event) {
if ('Escape' === event.key) {
$(this).find('.modal-active .modal-close .fas.fa-times').first().click();
}
if ('Enter' === event.key) {
$(this).find('.button_search').click();
}
if (event.shiftKey && 'Enter' === event.key) {
$(this).find('.button_removefilter').click();
}
};

/**
Expand Down

0 comments on commit f65edeb

Please sign in to comment.