°}²}²<\div style="text-align:center;">' + loading + '<\/div><\div class="icloading_img"><\/div><\/div>').load(url + ' ' + mod_iccalendar, function(){$('#mod_iccalendar_87').highlightToday();}); }); // Calendar Keyboard Accessibility (experimental, since 3.5.14) if (typeof first_mod === 'undefined') { $i = '1'; first_mod = modid; first_nb = $i; nb_mod = $i; } else { $i = (typeof $i === 'undefined') ? '2' : ++$i; nb_mod = $i; } $('#ic-calendar-'+modid).addClass('ic-'+nb_mod); $(document).keydown(function(e){ // ctrl+alt+C : focus on first Calendar module // REMOVE: Polish language conflict, alt+C Ć // if (e.ctrlKey && e.altKey && e.keyCode == 67) { // $('#ic-calendar-'+first_mod).focus(); // } // ctrl+alt+N : focus on Next calendar module if (e.ctrlKey && e.altKey && e.keyCode == 78) { if ($('#ic-calendar-'+modid).is(':focus')) { activ = $('#ic-calendar-'+modid).attr('class'); act = activ.split('-'); act = act[1]; next = ++act; } mod_class = $('#ic-calendar-'+modid).attr('class'); if ($('.ic-'+next).length == 0) next = 1; if (mod_class == 'ic-'+next) $('.ic-'+next).focus(); } // On focused calendar module if ($('#ic-calendar-'+modid).is(':focus')){ switch (e.keyCode) { case 37: // Left arrow pressed url = $('#ic-calendar-'+modid+' #ic-prev-month').attr('href'); break; case 38: // Top arrow pressed url = $('#ic-calendar-'+modid+' #ic-next-year').attr('href'); break; case 39: // Right arrow pressed url = $('#ic-calendar-'+modid+' #ic-next-month').attr('href'); break; case 40: // Top arrow pressed url = $('#ic-calendar-'+modid+' #ic-prev-year').attr('href'); break; } if ((!e.shiftKey && (e.keyCode == 37 || e.keyCode == 39)) || (e.shiftKey && (e.keyCode == 38 || e.keyCode == 40))) { $(modidid).html('<\div class="icloading_box"><\div style="text-align:center;">' + loading + '<\/div><\div class="icloading_img"><\/div><\/div>').load(url + ' ' + mod_iccalendar, function(){$('#mod_iccalendar_87').highlightToday();}); } // if ($(modidid+' '+icclasstip).is(':focus') && e.keyCode == 13){ // var icmouse = "click"; // } } }); if (tip_type=='2') {// $(document).on(icmouse, this, function(e){ // e.preventDefault(); // $(".iCaTip").tipTip({maxWidth: "400", defaultPosition: "top", edgeOffset: 1, activation:"hover", keepAlive: true}); // }); } if (tip_type=='1') { // Mobile phones do not support 'hover' or 'click' in the conventional way // if ($view_width < smallwidththreshold) { // icmouse = 'click touchend'; // } if (window.matchMedia('(pointer: coarse)').matches) { icmouse = 'click'; } $(document).on(icmouse, modidid+' '+icclasstip, function(e){ // e.stopImmediatePropagation(); $view_height=$(window).height(); $view_width=$(window).width(); e.preventDefault(); $('#ictip').remove(); $parent=$(this).parent(); var tip = $($parent).children(modidid+' .spanEv').html(); tip = tip.replace(//g,''+$tip+'<\/div>'); // Tooltip Keyboard Accessibility (experimental, since 3.5.14) $(document).keydown(function(e){ // Shift : focus on tooltip events if ($('.icevent a').is(':focus') && e.keyCode == 16){ $('.ictip-event a').focus(); } // esc : close tooltip if (($('.ictip-event a').is(':focus') || $('.icevent a').is(':focus')) && e.keyCode == 27){ e.preventDefault(); $('#ictip').remove(); } }); // Close Tooltip $(document).on('click touchend', '.close', function(e){ e.preventDefault(); $('#ictip').remove(); }); if (mouseout == '1') { $('#ictip') .mouseout(function() { // $( "div:first", this ).text( "mouse out" ); $('#ictip').stop(true).fadeOut(300); }) .mouseover(function() { // $( "div:first", this ).text( "mouse over" ); $('#ictip').stop(true).fadeIn(300); }); } }); } }) (jQuery);