1$(function(){ 2 $('.calendar_event_title').hover(function() { 3 $(this).find('.calendar_event_tooltip').show(); 4 },function(){ 5 $(this).find('.calendar_event_tooltip').hide(); 6 } 7 ); 8 9 $('.categoryid a').off('click.toggle-menu').on('click.toggle-menu', function(e) { 10 e.preventDefault(); 11 $(this).next('.category').toggle(); 12 }); 13 $(document).click(function(e) { 14 if(!$('.categoryid').find(e.target).length) { 15 $('.category').hide(); 16 } 17 }); 18 19 $('.categoryid_mc a').click(function(e){ 20 e.preventDefault(); 21 $(this).next('.calendar_center').toggle(); 22 }); 23 $(document).click(function(e) { 24 if ( !$('.categoryid_mc').find(e.target).length) { 25 $('.category_center').hide(); 26 } 27 }); 28 29}) 30 31function unshow_cat_array(cat_array,detail) { 32 var $scope = getCalendarContainer(detail); 33 34 if(cat_array.length == 0) { 35 /*no reasonable filters applied*/ 36 37 /*show everything*/ 38 $('.calendar_grid_event', $scope).show(); 39 $('.calendar_list_event', $scope).show(); 40 $('.calendar_list_day', $scope).show(); 41 }else{ 42 43 /*filters applied*/ 44 45 selected_cat = cat_array; 46 47 /*hide everything*/ 48 $('.calendar_grid_event', $scope).hide(); 49 $('.calendar_list_event', $scope).hide(); 50 51 /*loop through checkboxes and uncheck them appropriately*/ 52 53 var checkboxes = document.getElementsByName('cat_' + detail); 54 for(i=0; i<checkboxes.length; i++) { 55 box = checkboxes[i]; 56 57 if(cat_array.indexOf(box.value) >= 0) box.checked = false; 58 else box.checked = true; 59 } 60 cat_filter(detail); 61 } 62} 63 64function show_calendar_cat(id, detail) { 65 if(id != '0') { 66 /*specific id selected*/ 67 68 /*find and check the box associated with the link*/ 69 var checkboxes = document.getElementsByName('cat_' + detail); 70 for(i=0; i<checkboxes.length; i++) { 71 box = checkboxes[i]; 72 if(box.value == id) { 73 if(box.checked) box.checked = false; 74 else box.checked = true; 75 } 76 } 77 78 /*run the filter*/ 79 cat_filter(detail); 80 } else { 81 //all categories has been selected 82 var checkboxes = document.getElementsByName('cat_' + detail); 83 84 if(checkboxes.length > 0) { 85 86 var $scope = getCalendarContainer(detail); 87 88 if(checkboxes[1].checked == true) { 89 //if first checkbox is checked, uncheck everything 90 /*show all*/ 91 $('.calendar_grid_event', $scope).hide(); 92 $('.calendar_list_event', $scope).hide(); 93 $('.calendar_list_day', $scope).hide(); 94 /*check all boxes*/ 95 for(i=0; i<checkboxes.length; i++) { 96 box = checkboxes[i]; 97 box.checked = false; 98 } 99 } else { 100 //if first checkbox is unchecked, check everything 101 /*show all*/ 102 $('.calendar_grid_event', $scope).show(); 103 $('.calendar_list_event', $scope).show(); 104 $('.calendar_list_day', $scope).show(); 105 /*check all boxes*/ 106 for(i=0; i<checkboxes.length; i++) { 107 box = checkboxes[i]; 108 box.checked = true; 109 } 110 } 111 } 112 113 //if there are no checkboxes, then there are no categories, so no need to do anything 114 } 115} 116 117 118function cat_filter(detail) { 119 var $scope = getCalendarContainer(detail); 120 121 /*show all*/ 122 $('.calendar_grid_event', $scope).show(); 123 $('.calendar_list_event', $scope).show(); 124 125 /*hide unselected*/ 126 var checkboxes = document.getElementsByName('cat_' + detail); 127 for(i=0; i<checkboxes.length; i++) { 128 box = checkboxes[i]; 129 if(!box.checked) { 130 $('.calcat_' + box.value, $scope).hide(); 131 } 132 } 133 134 135 /*hide unselected list view date headers*/ 136 if(selected_view == "list_view") { 137 var dhead_array = $('.calendar_list_day', $scope); 138 var vis_count = 0; 139 for(i=0; i<dhead_array.length; i++) { 140 dhead = dhead_array[i]; 141 $(dhead).show(); 142 devent_array = dhead.children; 143 for(j=0; j<devent_array.length; j++) { 144 if($(devent_array[j]).is(":visible")) { 145 vis_count++; 146 } 147 } 148 149 if(vis_count <= 1) $(dhead).hide(); 150 else $(dhead).show(); 151 152 vis_count = 0; 153 } 154 } 155} 156 157function change_calendar_date(cfname,month,year,day,detail) { 158 159 var date_anchor = "#a_calendar" + detail; 160 if (selected_view == "list_view") date_anchor = "#date_" + year + month + day; 161 162 window.location.href = cfname + ".cfm?" + "view=" + selected_view + "&categoryid=" + get_unselected_cat(detail) + "&month=" + month + "&year=" + year + date_anchor; 163} 164 165function get_selected_cat(detail) { 166 var selected_cat = new Array(); 167 var checkboxes = document.getElementsByName('cat_' + detail); 168 for(i=0; i<checkboxes.length; i++) { 169 box = checkboxes[i];
170 if(box.checked) { 171 selected_cat.push(box.value); 172 } 173 } 174 return selected_cat.toString(); 175} 176 177function get_unselected_cat(detail) { 178 var selected_cat = new Array(); 179 var checkboxes = document.getElementsByName('cat_' + detail); 180 for(i=0; i<checkboxes.length; i++) { 181 box = checkboxes[i]; 182 if(!box.checked) { 183 selected_cat.push(box.value); 184 } 185 } 186 return selected_cat.toString(); 187} 188 189function change_cat(cfname,month,year,category,detail) { 190 window.location.href = cfname + ".cfm?" + "view=" + selected_view + "&categoryid=" + category + "&month=" + month + "&year=" + year + "#tool_" + detail; 191} 192 193function view_print(url_prefix,memberid,detail,month,year) { 194 window.location.href = url_prefix + "/pro/responsive/tools/includes/events/events_print.cfm?" + "view=" + selected_view + "&memberid=" + memberid + "&detailid=" + detail + "&categoryid=" + get_unselected_cat(detail) + "&month=" + month + "&year=" + year; 195}
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.