1$(document).ready(function () { 2 3 4 /*----------------------------------------------------------------------*/ 5 /* Parse the data from an data-attribute of DOM Elements 6 /*----------------------------------------------------------------------*/ 7 8 9 $.parseData = function (data, returnArray) { 10 if (/^\[(.*)\]$/.test(data)) { //array 11 data = data.substr(1, data.length - 2).split(','); 12 } 13 if (returnArray && !$.isArray(data) && data != null) { 14 data = Array(data); 15 } 16 return data; 17 }; 18 19 /*----------------------------------------------------------------------*/ 20 /* Image Preloader 21 /* http://engineeredweb.com/blog/09/12/preloading-images-jquery-and-javascript 22 /*----------------------------------------------------------------------*/ 23 24 25 26 // Arguments are image paths relative to the current page. 27 $.preload = function () { 28 var cache = [], 29 args_len = arguments.length; 30 for (var i = args_len; i--; ) { 31 var cacheImage = document.createElement('img'); 32 cacheImage.src = arguments[i]; 33 cache.push(cacheImage); 34 } 35 }; 36 37 38 /*----------------------------------------------------------------------*/ 39 /* fadeInSlide by revaxarts.com 40 /* Fades out a box and slide it up before it will get removed 41 /*----------------------------------------------------------------------*/ 42 43 44 $.fn.fadeInSlide = function (speed, callback) { 45 if ($.isFunction(speed)) callback = speed; 46 if (!speed) speed = 200; 47 if (!callback) callback = function () { }; 48 this.each(function () { 49 50 var $this = $(this); 51 $this.fadeTo(speed / 2, 1).slideDown(speed / 2, function () { 52 callback(); 53 }); 54 }); 55 return this; 56 }; 57 58 59 /*----------------------------------------------------------------------*/ 60 /* fadeOutSlide by revaxarts.com 61 /* Fades out a box and slide it up before it will get removed 62 /*----------------------------------------------------------------------*/ 63 64 65 $.fn.fadeOutSlide = function (speed, callback) { 66 if ($.isFunction(speed)) callback = speed; 67 if (!speed) speed = 200; 68 if (!callback) callback = function () { }; 69 this.each(function () { 70 71 var $this = $(this); 72 $this.fadeTo(speed / 2, 0).slideUp(speed / 2, function () { 73 $this.remove(); 74 callback(); 75 }); 76 }); 77 return this; 78 }; 79 80 /*----------------------------------------------------------------------*/ 81 /* textFadeOut by revaxarts.com 82 /* Fades out a box and slide it up before it will get removed 83 /*----------------------------------------------------------------------*/ 84 85 86 $.fn.textFadeOut = function (text, delay, callback) { 87 if (!text) return false; 88 if ($.isFunction(delay)) callback = delay; 89 if (!delay) delay = 2000; 90 if (!callback) callback = function () { }; 91 this.each(function () { 92 93 var $this = $(this); 94 $this.stop().text(text).show().delay(delay).fadeOut(1000, function () { 95 $this.text('').show(); 96 callback(); 97 }) 98 }); 99 return this; 100 }; 101 102 /*----------------------------------------------------------------------*/ 103 /* leadingZero by revaxarts.com 104 /* adds a leding zero if necessary 105 /*----------------------------------------------------------------------*/ 106 107 108 $.leadingZero = function (value) { 109 value = parseInt(value, 10); 110 if (!isNaN(value)) { 111 (value < 10) ? value = '0' + value : value; 112 } 113 return value; 114 }; 115 116}); 117 118 119function SelectAll(CheckBoxControl) { 120// if (CheckBoxControl.checked == true) { 121// var i; 122// for (i = 0; i < document.forms[0].elements.length; i++) { 123// if ((document.forms[0].elements[i].type == 'checkbox') && (document.forms[0].elements[i].name.indexOf('chkSelected') > -1)) { 124// $(document.forms[0].elements[i]).parent().addClass("checker"); 125// //document.forms[0].elements[i].checked = true; 126// } 127// } 128// } 129// else { 130// var i; 131// for (i = 0; i < document.forms[0].elements.length; i++) { 132// if ((document.forms[0].elements[i].type == 'checkbox') && (document.forms[0].elements[i].name.indexOf('chkSelected') > -1)) { 133// $(document.forms[0].elements[i]).parent().removeClass("checker"); 134// // document.forms[0].elements[i].checked = false;
135// } 136// } 137// } 138} 139 140function SelectEachCheck(CheckBoxControlId) { 141 142// var i; 143 144// var allselected = true; 145// for (i = 0; i < document.forms[0].elements.length; i++) 146// { 147// if ( 148// document.forms[0].elements[i].type == 'checkbox' && 149// document.forms[0].elements[i].name.indexOf('chkSelected') > -1 150// ) 151// { 152// allselected = false; 153// } 154//} 155 156// for (i = 0; i < document.forms[0].elements.length; i++) { 157// if ((document.forms[0].elements[i].type == 'checkbox') && (document.forms[0].elements[i].name.indexOf('chkAllSelected') > -1)) { 158// document.forms[0].elements[i].checked = allselected; 159// } 160// } 161 162} 163 164 165 166function countChar(txtBox,messageDiv) 167 { 168 try 169 { 170 count = txtBox.value.length; 171 if (count < 160) 172 { 173 charLeft = 160 - count; 174 txt = charLeft + " characters left...keep typing!!"; 175 messageDiv.innerHTML="<font color=green>" + txt + "</font>"; 176 } 177 else 178 { 179 messageDiv.innerHTML="<font color=red>Message is too long</font>"; 180 } 181 } 182 catch ( e ) 183 { 184 185 } 186 } 187 188 function Changed(textControl) { 189 alert(textControl.value); 190 }
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.