[UPDT] BASE: Individual view of objects added with data-action for next and previous buttons
This commit is contained in:
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><clipPath id="a"><path d="M0 0h24v24H0z" fill="#000000" opacity="1" data-original="#000000" class=""></path></clipPath><g clip-path="url(#a)"><path fill="#939393" d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" opacity="1" data-original="#323232" class=""></path></g></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><clipPath id="a"><path d="M0 0h24v24H0z" fill="#000000" opacity="1" data-original="#000000" class=""></path></clipPath><g clip-path="url(#a)"><path fill="#939393" d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" opacity="1" data-original="#323232" class=""></path></g></g></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 755 B |
@@ -127,8 +127,28 @@ function attendanceDateChange(selectElement) {
|
||||
}
|
||||
|
||||
$(document).on('keydown', function (event) {
|
||||
// Check if the cursor is not focused on an input field
|
||||
var isInputFocused = $(document.activeElement).is('input, textarea, select');
|
||||
|
||||
if (event.keyCode === 46) {
|
||||
// Click the delete option from navbar of current page
|
||||
$('[data-action="delete"]').click();
|
||||
} else if (event.keyCode === 107) { // Key code for the + key on the numeric keypad
|
||||
if (!isInputFocused) {
|
||||
// Click the create option from navbar of current page
|
||||
$('[data-action="create"]').click();
|
||||
}
|
||||
}
|
||||
else if (event.keyCode === 39) { // Key code for the right arrow key
|
||||
if (!isInputFocused) {
|
||||
// Click on the next button in detail view modal
|
||||
$('[data-action="next"]').click();
|
||||
}
|
||||
}
|
||||
else if (event.keyCode === 37) { // Key code for the left arrow key
|
||||
if (!isInputFocused) {
|
||||
// Click on the previous button in detail view modal
|
||||
$('[data-action="previous"]').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user