Skip to content

Commit 790da11

Browse files
committed
change quick-save from shift+s to alt+s (fix #85)
1 parent fa1cae8 commit 790da11

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/source/usage/4_config.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
4 - Config
77
==========
88

9-
**Tip**: You can use the key-combination :code:`SHIFT + S` to quick-safe your changes.
9+
**Tip**: You can use the key-combination :code:`ALT + S` to quick-safe your changes.
1010

1111
WebUI
1212
*****

src/ansibleguy-webui/aw/static/js/aw.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ function capitalizeFirstLetter(string) {
238238
return string.charAt(0).toUpperCase() + string.slice(1);
239239
}
240240

241-
pressed_shift = false;
242-
function shift_s_handler() {
241+
pressed_alt = false;
242+
function alt_s_handler() {
243243
for (let f of document.getElementsByTagName('form')) {
244244
if (f.action.includes('/api')) {
245245
// NOTE: form.submit is not working as we want to catch it later on
@@ -549,16 +549,16 @@ $( document ).ready(function() {
549549
apiFsExists(jQuery(this));
550550
});
551551
$(document).on("keyup", function(e){
552-
if (e.keyCode == 16) {
553-
pressed_shift = false;
552+
if (e.keyCode == 18) {
553+
pressed_alt = false;
554554
}
555555
});
556556
$(document).on("keydown", function(e){
557-
if (e.keyCode == 16) {
558-
pressed_shift = true;
557+
if (e.keyCode == 18) {
558+
pressed_alt = true;
559559
}
560-
if (pressed_shift === true && e.keyCode == 83) {
561-
shift_s_handler();
560+
if (pressed_alt === true && e.keyCode == 83) {
561+
alt_s_handler();
562562
}
563563
});
564564
});

0 commit comments

Comments
 (0)