diff options
author | B. Stack <bgstack15@gmail.com> | 2023-01-03 11:46:41 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-01-03 11:46:41 -0500 |
commit | 47afa98ed9669e77e88d176ef33117ff8cceaf95 (patch) | |
tree | 7c998291adb7d48103e6aed22d37b1e313db2abb | |
parent | Merge branch 'login-improvements' into 'stackrpms' (diff) | |
download | radicaleinfcloud-47afa98ed9669e77e88d176ef33117ff8cceaf95.tar.gz radicaleinfcloud-47afa98ed9669e77e88d176ef33117ff8cceaf95.tar.bz2 radicaleinfcloud-47afa98ed9669e77e88d176ef33117ff8cceaf95.zip |
make ctrl+enter press button save on dialog edit
-rw-r--r-- | radicale_infcloud/web/main.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/radicale_infcloud/web/main.js b/radicale_infcloud/web/main.js index 84b42dd..bd8a584 100644 --- a/radicale_infcloud/web/main.js +++ b/radicale_infcloud/web/main.js @@ -1600,9 +1600,16 @@ window.onload=globalMain; window.onkeydown=function(event) { switch(event.which) { + case 10: + /* case 10 is for Mac or possibly Chrome compatibility. https://stackoverflow.com/a/9343095 */ + if(globalActiveApp=='CalDavZAP' && $('#event_details_template').is(':visible') && $('#saveButton').is(':visible') && event.ctrlKey) + $('#saveButton').trigger('click'); + break; case 13: if(!isUserLogged) $('#Login').find('[data-type="system_login"]').trigger('click'); + if(globalActiveApp=='CalDavZAP' && $('#event_details_template').is(':visible') && $('#saveButton').is(':visible') && event.ctrlKey) + $('#saveButton').trigger('click'); break; case 27: if(globalActiveApp=='CalDavZAP' && $('#CAEvent').is(':visible') && $('#EventDisabler').is(':hidden')) |