1$.fn.includeForm = function(url, callback) { 2 var obj = null; 3 var u = ''; 4 if (url.split('?').length == 2) u = url + '&rnd=' + new Date().getTime(); 5 else u = url + '?rnd=' + new Date().getTime(); 6 7 if (window.URLSearchParams && new URLSearchParams(document.location.search).get('screengrabber') === '1') { 8 u += '&screengrabber=1'; 9 } 10 11 var e = function() { 12 var form = obj.find('form'); 13 form.submit(function() { 14 $.post(u, form.serialize(), v); 15 return false; 16 }); 17 18 try{ 19 // Init form calendars 20 obj.find('.init-calendar').each(function(i){ 21 new tcal({ 22 'controlname':this.id, 23 'place':this.parentNode, 24 'lang':'ru' 25 }); 26 27 }); 28 29 // Init form calendar intervals 30 obj.find('.init-calendar-interval').each(function(i){ 31 for(var j=0; j<2; ++j){ 32 var e = f_getElement(this.id + '['+j+']'); 33 new tcal({ 34 'controlname':e.id, 35 'place':e.parentNode, 36 'lang':'ru', 37 'intervalpair':[ 38 this.id + '[0]', 39 this.id + '[1]' 40 ], 41 'intervalupdatecont' : this.id 42 }); 43 } 44 }); 45 }catch(ex){} 46 47 try { 48 Onicon.core.liveFormsApply(); 49 } catch (e) {} 50 51 }; 52 var v = function(text, status, xhr) { 53 if (status == 'success'){ 54 text = text.split('<!--includeForm-->'); 55 if (text.length == 3) { 56 obj.html(text[1].replace(/[\r\n]/g, '').replace(/<script[^>]*>.*?<\/script>/g, '')); 57 e(); 58 if (callback && typeof callback == "function") 59 callback(obj); 60 } 61 } 62 } 63 64 obj = $(this); 65 $.get(u, null, v); 66} 67// vim: noet ts=4 sts=4 sw=4
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.