aboutsummaryrefslogtreecommitdiff
path: root/radicale_infcloud/web/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'radicale_infcloud/web/main.js')
-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