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({'animation':null,'html':true,'placement':'top','selector':null,'title':null,'trigger':'hover focus','content':null,'delay':{'hide':150},'container':modbody}); 31 } 32 catch (e) { 33 } 34 35 // we may have popup links too 36 try { 37 setupEventPopups(); 38 } 39 catch (e) { 40 } 41 42 setupMiniCalTouchInteractions(); 43 }) 44 .fail( function( jqxhr, textStatus, error){ 45 alert(textStatus + ", " + error); 46 }); 47} 48 49// setup touch interaction 50jQuery(document).on('ready', function() { 51 setupMiniCalTouchInteractions(); 52}); 53 54var jevMiniTouchStartX = false; 55var jevMiniTouchStartY = false; 56function setupMiniCalTouchInteractions() { 57 if ('ontouchstart' in document.documentElement) { 58 jQuery(".mod_events_table").parent().on("touchend", function (evt) { 59 //jevlog("touchend/touchend."); 60 //jevlog('changed touches '+ evt.originalEvent.changedTouches.length); 61 var touchobj = evt.originalEvent.changedTouches[0] 62 var vdist = touchobj.pageY - jevMiniTouchStartY ; 63 if (Math.abs(vdist)>50) { 64 evt.preventDefault(); 65 return; 66 } 67 var distX = touchobj.pageX - jevMiniTouchStartX ; 68 if (distX > 10) 69 { 70 if (linkprevious) callNavigation(linkprevious); 71 evt.preventDefault(); 72 } 73 else if (distX < -10) 74 { 75 if (linknext) callNavigation(linknext); 76 evt.preventDefault(); 77 } 78 }); 79 jQuery(".mod_events_table").parent().on("touchstart", function (evt) { 80 //evt.preventDefault(); 81 var touchobj = evt.originalEvent.changedTouches[0] 82 jevMiniTouchStartX = touchobj.pageX; 83 jevMiniTouchStartY = touchobj.pageY; 84 }); 85 jQuery(".mod_events_table").parent().on("touchmove", function (evt) { 86 // top stop scrolling etc. but only in the horizontal 87 var touchobj = evt.originalEvent.changedTouches[0] 88 89 var distX = touchobj.pageX - jevMiniTouchStartX ; 90 //jevlog(distX + " "+Math.abs(distX)); 91 if (Math.abs(distX) > 5) 92 { 93 evt.preventDefault(); 94 return; 95 } 96 /* 97 var vdist = touchobj.pageY - jevMiniTouchStartY ; 98 jevlog(vdist + " "+Math.abs(vdist)); 99 if (Math.abs(vdist)<20) { 100 evt.preventDefault(); 101 } 102 */ 103 }); 104 } 105} 106 107function jevlog(msg) { 108 try { 109 console.log(msg); 110 } 111 catch (e) { 112 113 } 114 115}
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.