1 2function toggle_bookmark(bookmark_id, event_id, bookmark_event_number, alt_bookmark_element_id) { 3 let outer_span; 4 console.log(`Toggle Bookmark for event id: ${event_id} # ${bookmark_event_number}`); 5 if (alt_bookmark_element_id) { 6 outer_span = $("#" + alt_bookmark_element_id); 7 } else { 8 outer_span = $("#" + bookmark_id); 9 } 10 11 if (outer_span.hasClass("bookmark-set")) { 12 outer_span.removeClass("bookmark-set"); 13 outer_span.find(".solid-bookmark").hide(); 14 outer_span.find(".regular-bookmark").show(); 15 $.ajax({ 16 type: "DELETE", 17 url: `/api/miniconf/bookmarks/lookup_and_delete?event=${event_id}&number=${bookmark_event_number}`, 18 processData: false, 19 contentType: 'application/json', 20 data: null, 21 success: function (req) { 22 console.log("Successfully removed bookmark"); 23 }, 24 error: function (req, err) { 25 alert("Error removing bookmark, please refresh page"); 26 console.log("Error processing bookmark DELETE " + err); 27 } 28 }); 29 } else { 30 outer_span.addClass("bookmark-set"); 31 outer_span.find(".solid-bookmark").show(); 32 outer_span.find(".regular-bookmark").hide(); 33 $.ajax({ 34 type: "POST", 35 url: "/api/miniconf/bookmarks", 36 processData: false, 37 contentType: 'application/json', 38 data: JSON.stringify({event: event_id, number: bookmark_event_number}), 39 success: function (req) { 40 console.log("Successfully added bookmark"); 41 }, 42 error: function (req, err) { 43 alert("Error adding bookmark, please refresh page"); 44 console.log("Error processing bookmark POST " + err); 45 } 46 }); 47 } 48} 49 50var touchup = function(){ 51 /*Get all events with the class of touch-up-date and add the correct date using the user's timezone'*/ 52 var cards = $(".touchup-date"); 53 var eventids = []; 54 for (const card of cards) { 55 eventid = parseInt(card.id.split("event-")[1]) 56 if (!(isNaN(eventid))) { 57 eventids.push(eventid); 58 } 59 } 60 61 /*Send these eventids to get timing information.*/ 62 63 var call = $.ajax({ 64 url:"/virtual/touchup", 65 type:"POST", 66 data:{ 67 action:"touchup-dates", 68 csrfmiddlewaretoken: csrftoken, 69 eventids: eventids, 70 }, 71 error: function(jqXHR, textStatus, errorThrown){ 72 console.log(errorThrown); 73 }, 74 success: function(data, textStatus, xqXHR){ 75 for (let k in data) { 76 let datediv = $("#touchup-date-event-" + k); 77 /*console.log(`touched up the date on event ${k}`);*/ 78 datediv.html(data[k]) 79 } 80 }, 81 82 }) 83} 84 85document.cookie = `browser_timezone=${Intl.DateTimeFormat().resolvedOptions().timeZone}`;
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.