{"id":3497,"date":"2024-05-13T09:55:26","date_gmt":"2024-05-13T09:55:26","guid":{"rendered":"https:\/\/iscram2024.ercis.org\/?page_id=3497"},"modified":"2024-05-13T10:39:40","modified_gmt":"2024-05-13T10:39:40","slug":"my-personal-schedule","status":"publish","type":"page","link":"https:\/\/iscram2024.ercis.org\/index.php\/conference-program\/my-personal-schedule\/","title":{"rendered":"MY PERSONAL SCHEDULE"},"content":{"rendered":"<hr\/>\n<p>Create your own schedule by selecting papers from the <a href=\"https:\/\/iscram2024.ercis.org\/index.php\/conference-program\/conference-program-overview\/#tsfinder\"><i class=\"fas fa-magnifying-glass\"><\/i> <strong>Paper Search Tool<\/strong><\/a>. Your entries will be saved to the local storage of this browser, so they won&#8217;t synchronize across other browsers or devices.<\/p>\n<div id=\"overlay\" style=\"display: none;\"><\/div>\n<div id=\"notification\" style=\"display: none;\">\n<div id=\"notificationText\"><\/div>\n<p>        <button class=\"notification-button\" onclick=\"closeNotification()\">Close<\/button>\n    <\/div>\n<p><button id=\"todo-remove-all\" onclick=\"removeAllPaper()\">Remove all papers<\/button><\/p>\n<h5>My Personal Schedule<\/h5>\n<ul id=\"todo-item\" class=\"presentation-list\"><\/ul>\n<script>function filterSinglePresentation(presentation, addButton) {\r\n\r\n  const li = document.createElement('li');\r\n\r\n  const paperContainer = document.createElement('div');\r\n  \r\n  switch(presentation.room){\r\n    case \"C1\":\r\n      paperContainer.className = 'paper-container room-c1';\r\n      break;\r\n    case \"C4\":\r\n      paperContainer.className = 'paper-container room-c4';\r\n      break;\r\n    case \"C215\":\r\n      paperContainer.className = 'paper-container room-c215';\r\n      break;\r\n    case \"C204\":\r\n      paperContainer.className = 'paper-container room-c204';\r\n      break;\r\n    case \"C205\":\r\n      paperContainer.className = 'paper-container room-c205';\r\n      break;\r\n    default:\r\n      paperContainer.className = 'paper-container';\r\n  }\r\n\r\n  paperContainer.setAttribute('data-title', presentation.title);\r\n  paperContainer.setAttribute('data-type', presentation.type);\r\n  paperContainer.setAttribute('data-authors', presentation.authors);\r\n  paperContainer.setAttribute('data-day', presentation.day);\r\n  paperContainer.setAttribute('data-timeslot', presentation.timeslot);\r\n  paperContainer.setAttribute('data-room', presentation.room);\r\n\r\n  const detailsDiv = document.createElement('details');\r\n  detailsDiv.className = 'paper-details'\r\n\r\n  const infoDiv = document.createElement('summary');\r\n  infoDiv.className = 'paper-info'\r\n\r\n  const titleDiv = document.createElement('div');\r\n  titleDiv.className = 'presentation-title';\r\n  titleDiv.textContent = presentation.title;\r\n\r\n  const typeDiv = document.createElement('div');\r\n  typeDiv.className = 'presentation-type';\r\n  typeDiv.textContent = presentation.type;\r\n\r\n  const authorsDiv = document.createElement('div');\r\n  authorsDiv.className = 'presentation-authors';\r\n  authorsDiv.textContent = presentation.authors;\r\n\r\n  const trackTimeRoomDiv = document.createElement('div');\r\n  trackTimeRoomDiv.className = 'paper-tracktimeroom'\r\n\r\n  const trackDiv = document.createElement('div');\r\n  trackDiv.className = 'presentation-track';\r\n  trackDiv.textContent = presentation.track;\r\n\r\n  const timeDiv = document.createElement('div');\r\n  timeDiv.className = 'presentation-time';\r\n  timeDiv.textContent = `${presentation.day} from ${presentation.timeslot}`;\r\n\r\n  const roomDiv = document.createElement('div');\r\n  \r\n  switch(presentation.room){\r\n    case \"C1\":\r\n      roomDiv.className = 'presentation-room room-c1';\r\n      break;\r\n    case \"C4\":\r\n      roomDiv.className = 'presentation-room room-c4';\r\n      break;\r\n    case \"C215\":\r\n      roomDiv.className = 'presentation-room room-c215';\r\n      break;\r\n    case \"C204\":\r\n      roomDiv.className = 'presentation-room room-c204';\r\n      break;\r\n    case \"C205\":\r\n      roomDiv.className = 'presentation-room room-c205';\r\n      break;\r\n    default:\r\n      roomDiv.className = 'presentation-room';\r\n  }\r\n\r\n  roomDiv.textContent = `${presentation.room}`;\r\n\r\n  const abstractDiv = document.createElement('div');\r\n  abstractDiv.className = 'presentation-abstract';\r\n  abstractDiv.textContent = `${presentation.abstract}`;\r\n\r\n  infoDiv.appendChild(titleDiv);\r\n  infoDiv.appendChild(typeDiv);\r\n  infoDiv.appendChild(authorsDiv);\r\n  trackTimeRoomDiv.appendChild(trackDiv);\r\n  trackTimeRoomDiv.appendChild(timeDiv);\r\n  trackTimeRoomDiv.appendChild(roomDiv);\r\n  infoDiv.appendChild(trackTimeRoomDiv);\r\n  detailsDiv.appendChild(abstractDiv);\r\n  detailsDiv.appendChild(infoDiv);\r\n  paperContainer.appendChild(detailsDiv);\r\n  paperContainer.appendChild(addButton);\r\n  li.appendChild(paperContainer);\r\n\r\n  return li;\r\n}\r\n\r\nfunction createRemoveButton(p) {\r\nvar addButton = document.createElement(\"button\");\r\naddButton.className = \"custom-schedule-remove\";\r\naddButton.textContent = \"Remove presentation from my schedule\";\r\naddButton.onclick = function() {\r\n  removeData(p);\r\n};\r\nreturn addButton;\r\n}\r\n\r\n\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\nlistTodo();\r\n});\r\n\r\nlet listTodo = () => {\r\nconst list = document.getElementById('todo-item');\r\nlist.innerHTML = ''; \r\nlet data = getData();\r\ndata.sort((a,b) => a.timeslot.localeCompare(b.timeslot));\r\ndata.sort((a,b) => a.day.localeCompare(b.day));\r\nif(data){\r\n  data.forEach((value,item\r\n  ) => {\r\n      var removeButton = createRemoveButton(value); \r\n      var li = filterSinglePresentation(value, removeButton)\r\n      list.append(li);\r\n  });\r\n}\r\n}\r\n\r\n\/* handler for get todo  *\/\r\nlet getData = (item = null) => {\r\n\r\nlet data = JSON.parse(localStorage.getItem('myschedule')); \r\nif(data){\r\n\r\n  if(item) {\r\n      if(data.findIndex(i => i.id == item.id) != -1){\r\n          return data[item];\r\n      }\r\n      else{\r\n          return false;\r\n      }\r\n  }\r\n  return data;\r\n}\r\nreturn false;\r\n}\r\n\r\n\/* handler for remove item from localstorage *\/\r\nlet removeData = (item) => {\r\n  let data = getData();\r\n  if(data){\r\n      let newData = data.filter((v,i) => { return v.id != item.id });\r\n      newData = JSON.stringify(newData);\r\n      localStorage.setItem('myschedule',newData);\r\n      notifyAboutAction(`The paper has been removed from your schedule.`)\r\n      listTodo();\r\n  }\r\n  else{\r\n      alert(\"No data found\");\r\n  }\r\n\r\n} \r\n\r\nfunction removeAllPaper() {\r\nvar confirmed = confirm(\"Do you want to delete your current custom schedule?\");\r\nif(confirmed){\r\nlocalStorage.removeItem('myschedule')\r\nlistTodo();\r\n}\r\n}\r\n\r\nfunction notifyAboutAction(text) {\r\nvar notification = document.getElementById('notification');\r\nvar notificationText = document.getElementById('notificationText');\r\nnotificationText.innerText = text;\r\nnotification.style.display = 'block';\r\n}\r\n\r\nfunction closeNotification() {\r\nvar notification = document.getElementById('notification');\r\nnotification.style.display = 'none';\r\n}\r\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Create your own schedule by selecting papers from the Paper Search Tool. Your entries will be saved to the local storage of this browser, so they won&#8217;t synchronize across other browsers or devices. Close Remove all papers My Personal Schedule<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2930,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3497","page","type-page","status-publish","hentry","nodate","item-wrap"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/iscram2024.ercis.org\/index.php\/wp-json\/wp\/v2\/pages\/3497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iscram2024.ercis.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/iscram2024.ercis.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/iscram2024.ercis.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iscram2024.ercis.org\/index.php\/wp-json\/wp\/v2\/comments?post=3497"}],"version-history":[{"count":8,"href":"https:\/\/iscram2024.ercis.org\/index.php\/wp-json\/wp\/v2\/pages\/3497\/revisions"}],"predecessor-version":[{"id":3518,"href":"https:\/\/iscram2024.ercis.org\/index.php\/wp-json\/wp\/v2\/pages\/3497\/revisions\/3518"}],"up":[{"embeddable":true,"href":"https:\/\/iscram2024.ercis.org\/index.php\/wp-json\/wp\/v2\/pages\/2930"}],"wp:attachment":[{"href":"https:\/\/iscram2024.ercis.org\/index.php\/wp-json\/wp\/v2\/media?parent=3497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}