1function callNavigation(link, datatype) { 2 link += "&json=1"; 3 //link += "&XDEBUG_SESSION_START=netbeans-xdebug"; 4 var jSonRequest = jQuery.ajax({ 5 type: 'GET', 6 // use JSONP to allow cross-domain calling of this data! 7 dataType: (typeof datatype !== 'undefined') ? datatype : 'jsonp', 8 cache: false, 9 url: link, 10 contentType: "application/json; charset=utf-8", 11 scriptCharset: "utf-8" 12 }) 13 .done(function (json) { 14 if (!json || !json.data) { 15 if (typeof datatype == 'undefined') { 16 return callNavigation(link, "json"); 17 } 18 alert('could not get calendar'); 19 return; 20 } 21 if (json.script) { 22 //alert(json.script); 23 eval(json.script); 24 } 25 var myspan = document.getElementById("testspan" + json.modid); 26 var modbody = myspan.parentNode; 27 modbody.innerHTML = json.data; 28 // we may have tooltips to re-enable too! 29 try { 30 jQuery(modbody).find('.hasjevtip').popover({ 31 'animation': null, 32 'html': true, 33 'placement': 'top', 34 'selector': null, 35 'title': null, 36 'trigger': 'hover focus', 37 'content': null, 38 'delay': {'hide': 150}, 39 'container': modbody 40 }); 41 } 42 catch (e) { 43 } 44 45 // we may have popup links too 46 try { 47 setupEventPopups(); 48 } 49 catch (e) { 50 } 51 52 setupMiniCalTouchInteractions(); 53 }) 54 .fail(function (jqxhr, textStatus, error) { 55 alert(textStatus + ", " + error); 56 }); 57} 58 59// setup touch interaction 60jQuery(document).on('ready', function () { 61 setupMiniCalTouchInteractions(); 62}); 63 64var jevMiniTouchStartX = false; 65var jevMiniTouchStartY = false; 66 67function setupMiniCalTouchInteractions() { 68 if ('ontouchstart' in document.documentElement) { 69 jQuery(".mod_events_table").parent().on("touchend", function (evt) { 70 //jevlog("touchend/touchend."); 71 //jevlog('changed touches '+ evt.originalEvent.changedTouches.length); 72 var touchobj = evt.originalEvent.changedTouches[0]; 73 var vdist = touchobj.pageY - jevMiniTouchStartY; 74 if (Math.abs(vdist) > 50) { 75 evt.preventDefault(); 76 return; 77 } 78 var distX = touchobj.pageX - jevMiniTouchStartX; 79 if (distX > 10) { 80 if (linkprevious) callNavigation(linkprevious); 81 evt.preventDefault(); 82 } 83 else if (distX < -10) { 84 if (linknext) callNavigation(linknext); 85 evt.preventDefault(); 86 } 87 }); 88 jQuery(".mod_events_table").parent().on("touchstart", function (evt) { 89 //evt.preventDefault(); 90 var touchobj = evt.originalEvent.changedTouches[0]; 91 jevMiniTouchStartX = touchobj.pageX; 92 jevMiniTouchStartY = touchobj.pageY; 93 }); 94 jQuery(".mod_events_table").parent().on("touchmove", function (evt) { 95 // top stop scrolling etc. but only in the horizontal 96 var touchobj = evt.originalEvent.changedTouches[0]; 97 98 var distX = touchobj.pageX - jevMiniTouchStartX; 99 //jevlog(distX + " "+Math.abs(distX)); 100 if (Math.abs(distX) > 5) { 101 evt.preventDefault(); 102 103 } 104 /* 105 var vdist = touchobj.pageY - jevMiniTouchStartY ; 106 jevlog(vdist + " "+Math.abs(vdist)); 107 if (Math.abs(vdist)<20) { 108 evt.preventDefault(); 109 } 110 */ 111 }); 112 } 113} 114 115function jevlog(msg) { 116 try { 117 console.log(msg); 118 } 119 catch (e) { 120 121 } 122 123}
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.