1/** 2 * Hides or shows an item based on whether a checkbox is checked. 3 * 4 * @param field Name of the field which is a checkox 5 * @param div The layer to hide or show. 6 * @param delay The time JQuery should use to show or hide. 7 * @author HSD (TF) 8 **/ 9function displayOnChecked(field, div, delay) { 10 if ($(field).is(':checked')) { 11 //Use special function below to avoid IE Clear Typing issue 12 $(div).fadeIn(); 13 //$(div).show(delay); 14 } 15 else { 16 $(div).hide(delay); 17 } 18} 19/** 20* Hides or shows an item based on whether a checkbox is UNchecked. 21* 22* @param field Name of the field which is a checkox 23* @param div The layer to hide or show. 24* @param delay The time JQuery should use to show or hide. 25* @author HSD (TF) 26**/ 27function displayOnUnChecked(field, div, delay) { 28 if ($(field).is(':checked')) { 29 $(div).hide(delay); 30 } 31 else { 32 //Use special function below to avoid IE Clear Typing issue 33 $(div).fadeIn(); 34 //$(div).show(delay); 35 } 36} 37/** 38 * Checks all checkboxes within a div. 39 * 40 * @param id The div or element ID with all the checkboxes 41 * @param state The state of the checkboxes (true/false) 42 * @author HSD (TF) 43 **/ 44function checkboxesCheck(id, state) { 45 $(id).find("input[type='checkbox']").each(function() { 46 // Don't change the state if the checkbox is disabled 47 if (!this.disabled == true) { 48 this.checked = state; 49 } 50 }); 51} 52 53/** 54* Returns the value of a radio button thats selected (or undefined) 55* 56* @param field Name of the field which is a radiobutton 57* @author HSD (TF) 58**/ 59function getSelectedRadioButtonItem(field) { 60 return $('input[name=' + field + ']:checked').val(); 61} 62 63/** 64* Toggles PrintPreview status 65* 66* @author HSD (TF) 67**/ 68function togglePrintPreview() { 69 var currCSS = document.getElementById('printCSS'); 70 var currCSS2 = document.getElementById('printCSS2'); 71 if (currCSS.media == 'all') { 72 currCSS.media = 'print'; 73 currCSS2.media = 'print'; 74 $('#printPreview').hide(); 75 } 76 else { 77 currCSS.media = 'all'; 78 currCSS2.media = 'all'; 79 $('#printPreview').show(); 80 } 81} 82 83/** 84* Shows a print preview version of the current page by appending 85* the PrintPreview querystring to the end of the URL. 86* 87* @author HSD (TF) 88**/ 89function showPrintPreview() { 90 /* 91 var url = window.location.href; 92 var qs = window.location.search.substring(1); 93 if (qs == "") url += "?"; else url += "&"; 94 url += "printpreview=true"; 95 var pp = window.open(url, "printpreview"); 96 */ 97} 98 99jQuery.fn.fadeIn = function(speed, callback) { 100 return this.animate({ opacity: 'show' }, speed, function() { 101 if (jQuery.browser.msie) 102 this.style.removeAttribute('filter'); 103 if (jQuery.isFunction(callback)) 104 callback(); 105 }); 106}; 107 108jQuery.fn.fadeOut = function(speed, callback) { 109 return this.animate({ opacity: 'hide' }, speed, function() { 110 if (jQuery.browser.msie) 111 this.style.removeAttribute('filter'); 112 if (jQuery.isFunction(callback)) 113 callback(); 114 }); 115}; 116 117jQuery.fn.fadeTo = function(speed, to, callback) { 118 return this.animate({ opacity: to }, speed, function() { 119 if (to == 1 && jQuery.browser.msie) 120 this.style.removeAttribute('filter'); 121 if (jQuery.isFunction(callback)) 122 callback(); 123 }); 124};
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.