aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-01-04 14:39:23 -0500
committerB. Stack <bgstack15@gmail.com>2023-01-04 14:39:23 -0500
commit6f7c7d63c7d24f026395880ba5d921b268d76e3c (patch)
treeb0e31bab1b147eab6753de52e38d94c4f82ef5ed
parentversion bump 0.13.5-1 (diff)
downloadradicaleinfcloud-6f7c7d63c7d24f026395880ba5d921b268d76e3c.tar.gz
radicaleinfcloud-6f7c7d63c7d24f026395880ba5d921b268d76e3c.tar.bz2
radicaleinfcloud-6f7c7d63c7d24f026395880ba5d921b268d76e3c.zip
add left-bracket to toggle left sidebar
-rw-r--r--radicale_infcloud/web/main.js29
1 files changed, 20 insertions, 9 deletions
diff --git a/radicale_infcloud/web/main.js b/radicale_infcloud/web/main.js
index b8b8ffe..2c62b00 100644
--- a/radicale_infcloud/web/main.js
+++ b/radicale_infcloud/web/main.js
@@ -739,10 +739,10 @@ function run()
return false;
}
- /* stackrpms,4 disable version check
+ /* stackrpms,4 disable version check
if(typeof globalNewVersionNotifyUsers=='undefined' || globalNewVersionNotifyUsers!=null)
netVersionCheck();
- */
+ */
document.title+=' ['+globalAccountSettings[0].userAuth.userName+']';
// Automatically detect crossDomain settings
@@ -1597,19 +1597,21 @@ function isEachResourceLoaded()
window.onload=globalMain;
+excluded_types = ['input','textarea'];
+
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 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');
+ 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'))
@@ -1619,6 +1621,15 @@ window.onkeydown=function(event)
if($('.sp-container').is(':visible'))
$('html').trigger('click');
break;
+ case 219:
+ /* left-bracket to close the sidebar thing */
+ /* if not in a input or textarea, */
+ if(excluded_types.indexOf(event.target.tagName.toLowerCase()) === -1) {
+ if($('#ResourceCalDAVToggle').is(':visible')){ $('#ResourceCalDAVToggle').trigger('click');};
+ if($('#ResourceCalDAVTODOToggle').is(':visible')){ $('#ResourceCalDAVTODOToggle').trigger('click');};
+ if($('#ResourceCardDAVToggle').is(':visible')){ $('#ResourceCardDAVToggle').trigger('click');};
+ }
+ break;
default:
break;
}
bgstack15