1jQuery(function ($) { 2 3 const handlePopover = () => { 4 5 const popovers = $('.event_month td .popover'); 6 7 popovers.each(function (popover) { 8 9 popover = $(this); 10 11 const td = $(this).closest('td'); 12 13 td.on('mouseenter', function () { 14 15 const controlExit = $(window).width() - td.offset().left - 180; 16 17 const top2 = (popover.height() - 5) * -1; 18 19 if (controlExit < 0) { 20 popover.addClass('exitPage'); 21 } 22 popover.addClass('show') 23 popover.css({display: 'block', top: top2}); 24 }); 25 26 td.on('mouseleave', function () { 27 28 29 popover.removeClass('show') 30 31 td.removeClass('exitPage'); 32 }); 33 34 }) 35 36 } 37 38 // $('body').on("hover", '.event_month td', function () { 39 // 40 // console.log('hover'); 41 // const td = $(this); 42 // 43 // popover = $('.popover', td); 44 // if (popover.length) { 45 // 46 // console.log(popover) 47 // controlExit = $(window).width() - td.offset().left - 180; 48 // 49 // top2 = (popover.height() - 5) * -1; 50 // if (controlExit < 0) { 51 // $('.popover', td).addClass('exitPage'); 52 // } 53 // popover.css({display: 'block', top: top2}); 54 // 55 // } 56 // }).on('mouseleave', '.event_month td', function () { 57 // 58 // td = $(this); 59 // 60 // $('.popover', td).css('display', 'none'); 61 // $('.popover', td).removeClass('exitPage'); 62 // }); 63 64 handlePopover() 65 66 $('body').on('click', '.eventChangeDate', function () { 67 68 var $div = $(this).closest('table').parent(); 69 70 //$( $div ).addClass('loading'); 71 72 var tempo = $(this).data('tempo'), 73 data = $(this).data('data'); 74 75 request = { 76 'option': 'com_ajax', 77 'module': 'eventij5', 78 'format': 'raw', 79 'tempo': tempo, 80 'data': data 81 }; 82 $.ajax({
83 type: 'POST', 84 data: request, 85 success: function (response) { 86 87 if (response) { 88 89 $('> table', $div).fadeOut("slow", function () { 90 $(this).replaceWith(response); 91 $('> table', $div).fadeIn("slow"); 92 handlePopover() 93 }); 94 $div.find(this).replaceWith(response); 95 $div.fadeIn("slow"); 96 97 } 98 //$( $div ).removeClass('loading'); 99 }, 100 error: function (response) { 101 102 } 103 }); 104 105 return false; 106 }); 107 108});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.