1(function() { 2 window.Clips = (function() { 3 function Clips() {} 4 5 Clips.getClips = function(id) { 6 7 //AJAX CALL ERRORS OUT (500) WHEN CALLED FROM WITHIN CLIPS function definition 8 9 /* var param = {'param':'getClips', 'folderId':id}; 10 $.ajax({ 11 type: "POST", 12 url: "/_layouts/15/CardNavigationWebService/GranicusEvent.asmx/GetEvents", 13 data: JSON.stringify(param), 14 timeout: 10000, 15 contentType: "applicaton/json", 16 dataType: "json", 17 success: function (res) { 18 //alert(res); 19 var audioLink, i, rsDate, _i, _len, _ref, _results; 20 _ref = $.parseJSON(res.d); 21 _results = []; 22 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 23 i = _ref[_i]; 24 audioLink = i.FileName.replace("mp4", "mp3"); 25 rsDate = new Date(0); 26 rsDate.setUTCSeconds(i.Date.replace("/Date(", "").replace(")/", "") / 1000); 27 $("#folder" + id).append("<div><dd><div><p>" + i.Name.replace("/", " ") + " " + i.Description + ("</p><a target='_blank' href='https://alachua.granicus.com/MediaPlayer.php?view_id=8&clip_id=" + i.ID + "'> Video </a><a href='https://media-12.granicus.com:443/OnDemand/alachua/" + audioLink + "'> Audio </a></div></dd></div>")); 28 $("#folder" + id + " i").hide(); 29 _results.push($("#folderanchor" + id).show()); 30 } 31 return _results; 32 }, 33 failure: function (r) { 34 alert(r.responseText); 35 }, 36 37 }) 38 */ 39 }; 40 41 Clips.clearDiv = function(id) { 42 $("#folder" + id).html(""); 43 return id; 44 }; 45 46 Clips.showLoader = function(id) { 47 $("#folder" + id).html("<div class='row collapse'><div class='small-1 columns small-centered'><i class='icon-spin5 animate-spin' id='ajaxLoader'></i></div></div>"); 48 return id; 49 }; 50 51 return Clips; 52 53 })(); 54 55 $("#vidtab").click(function() { 56 var rsGranicus, rsSP; 57 58 /* console.log("Test:: fetch video data from secure.alachua instead of cardnavwebservice") 59 60 $("#livenotplaying").hide(); 61 $('.post_item:first').hide(); 62 63 $("#contentpart3").html("<ul id='acc-items' class='accordion no-bullet' data-accordion>"+ 64 "<p> We apologize for the inconvenience, but this widget is currently experiencing technical difficulties.</p>"+ 65 "<p> <a href='https://alachua.granicus.com/viewpublisher.php?view_id=8' target='_blank'> Please click here to view all Alachua County Meetings. </a> </p></ul>"); 66*/ 67 68 $("#contentpart3").html("<ul id='acc-items' class='accordion no-bullet' data-accordion><img id='evtLoad' src='/_catalogs/masterpage/alachuaCounty/images/gears.gif' style='width: 80px' /></ul>"); 69 var param = {'param':'events', 'folderId':'none'} 70 $.ajax({
71 type: "POST", 72 //url: "/_layouts/15/CardNavigationWebService/GranicusEvent.asmx/GetEvents", 73 url: "https://secure.alachuacounty.us/KioskWebApi/api/Granicus?param=events&folderId=none", 74 data: JSON.stringify(param), 75 contentType: "application/json", 76 dataType: "json", 77 timeout: 10000, 78 success: function (res) { 79 // alert(res); 80 81 var i, rsDate, _i, _ref, _results; 82 83 //_ref = $.parseJSON(res.d); 84 _ref = $.parseJSON(res); 85 86 // _ref = $.parseJSON(res.GetEventsResult); 87 //alert(res.GetEventsResult); 88 _results = []; 89 for (_i = _ref.length - 1; _i >= 0; _i += -1) { 90 i = _ref[_i]; 91 if (!(i !== null)) { 92 continue; 93 } 94 $("#evtLoad").hide("slow"); 95 rsDate = new Date(0); 96 rsDate.setUTCSeconds(i.StartTime.replace("/Date(", "").replace(")/", "") / 1000); 97 if (i.Status === "Running") { 98 $("#liveplayinglinktitle").html(i.Name.replace("/", " ") + " " + rsDate.toLocaleString().replace(/:\d{2}\s/, ' ')); 99 $("#liveplayinglinkbutton").attr("href", "https://alachua.granicus.com/MediaPlayer.php?view_id=8&event_id=" + i.ID); 100 $("#livenotplaying").hide(); 101 _results.push($("#liveplaying").show()); 102 } else { 103 _results.push($("#acc-items").append("<li>" + i.Name.replace("/", " ") + " " + rsDate.toLocaleString().replace(/:\d{2}\s/, ' ') + "</li>")); 104 } 105 } 106 return _results; 107 }, // error: function (r) { alert(r.responseText); }, 108 failure: function (r) { 109 alert(r.responseText); 110 } 111 }); 112 113 114 $("#contentpart2").html(""); 115 rsSP = $().SPServices({ 116 operation: "GetListItems", 117 async: true, 118 webURL: "" + location.protocol + "//" + location.host + "/", 119 listName: "ArchiveFolders", 120 CAMLViewFields: "<ViewFields><FieldRef Name='Title'/><FieldRef Name='FolderId'/><FieldRef Name='Anchor'/></ViewFields>", 121 completefunc: function(xData, Status) { 122 return $(xData.responseXML).SPFilterNode("z:row").each(function() { 123 return $("#contentpart2").append("<dl id='Eventslist' style='font-size:.875rem;margin-bottom:0.5rem;'><dd style='background:transparent'><a class='arclink' style='background:#efefef;color: #222222;padding:0.5rem;font-size:0.875rem' href='#folder" + $(this).attr('ows_FolderId') + "'>" + $(this).attr('ows_Title') + "</a><div class='content' style='padding:0.5rem;background: white;'id='folder" + $(this).attr('ows_FolderId') + "'></div></dd></dl><div style='display:none' id='folderanchor" + $(this).attr('ows_FolderId') + "' class='viewallcontainer'><a href='https://alachua.granicus.com/ViewPublisher.php?view_id=8#" + $(this).attr('ows_Anchor') + "' class='view-all-link button round tiny' style='font-size:0.875rem;padding:0.5rem;'>View All Items</a></div>"); 124 }); 125 } 126 }); 127 return $("#contentpart2 a.arclink").click(function() { 128 $(this).toggleClass("current"); 129 if ($(this).hasClass("current")) { 130
131 var id = Clips.showLoader(Clips.clearDiv($(this).attr("href").replace("#folder", ""))); 132 //alert(id); 133 134 var param = {'param':'getClips', 'folderId':id} 135 $.ajax({ 136 type: "POST", 137 //url: "/_layouts/15/CardNavigationWebService/GranicusEvent.asmx/GetEvents", 138 url:"https://secure.alachuacounty.us/KioskWebApi/api/Granicus?param=getClips&folderId="+id, 139 data: JSON.stringify(param), 140 contentType: "application/json", 141 dataType: "json", 142 timeout: 10000, 143 success: function (res) { 144 //console.log(res.d); 145 var audioLink, i, rsDate, _i, _len, _ref, _results; 146 //_ref = $.parseJSON(res.d); 147 _ref = $.parseJSON(res); 148 _results = []; 149 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 150 i = _ref[_i]; 151 audioLink = i.FileName.replace("mp4", "mp3"); 152 rsDate = new Date(0); 153 rsDate.setUTCSeconds(i.Date.replace("/Date(", "").replace(")/", "") / 1000); 154 //$("#folder" + id).append("<div><dd><div style='border-bottom: 1px solid #dedede !important;'><p style='font-size:0.875rem;margin-bottom:0px'>" + i.Name.replace("/", " ") + " " + i.Description + ("</p><a target='_blank' href='https://alachua.granicus.com/MediaPlayer.php?view_id=8&clip_id=" + i.ID + "'> Video </a><a href='https://media-12.granicus.com:443/OnDemand/alachua/" + audioLink + "'> Audio </a></div></dd></div>")); 155 $("#folder" + id).append("<div><dd><div style='border-bottom: 1px solid #dedede !important;'><p style='font-size:0.875rem;margin-bottom:0px'>" + i.Name.replace("/", " ") + " " + i.Description + ("</p><a target='_blank' href='https://alachua.granicus.com/MediaPlayer.php?view_id=8&clip_id=" + i.ID + "'> Video </a><a href=' https://archive-video.granicus.com/alachua/" + audioLink + "'> Audio </a></div></dd></div>")); 156 157 $("#folder" + id + " i").hide(); 158 _results.push($("#folderanchor" + id).show()); 159 } 160 return _results; 161 }, 162 failure: function (r) { 163 alert(r.responseText); 164 }, 165 166 }) 167 168
169 //return Clips.getClips(Clips.showLoader(Clips.clearDiv($(this).attr("href").replace("#folder", "")))); 170 } else { 171 return $("#" + $(this).attr("href").replace("#", "")).html(""); 172 } 173 }); 174 }); 175 176}).call(this);
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.