{"id":29,"date":"2017-01-31T15:23:42","date_gmt":"2017-01-31T21:23:42","guid":{"rendered":"http:\/\/aisd.net\/elementary-campus\/?page_id=29"},"modified":"2024-10-09T13:59:25","modified_gmt":"2024-10-09T18:59:25","slug":"school-schedules","status":"publish","type":"page","link":"https:\/\/www.aisd.net\/ellis-elementary\/about\/school-schedules\/","title":{"rendered":"School Schedules"},"content":{"rendered":"\n\n\t<h2>2024-2025 Ellis Elementary School Schedule<\/h2>\n<table class=\"google-sheet-integration responsive\" id=\"table-abf65f86ea7\">\n\t\t<thead id=\"thead-abf65f86ea7\"><tr><th><span class=\"screen-reader-text\"><\/span><\/th><\/tr><\/thead>\n    <tbody id=\"tbody-abf65f86ea7\"><tr><td><span class=\"screen-reader-text\">Loading...<\/span><\/td><\/tr><\/tbody>\n  <\/table>\n\t<div class=\"responsive scroll-more\">Scroll for more >><\/div>\n<script>\n(function getSpreadsheet(delay){\n\n\t\/\/ delay = delay || 1000;\n\nvar url = \"https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1B1JMRIZSdXVKpNc0Ey3ldCjOcB7xXbA50tJfjvPvDMY\/values\/Sheet1\/?majorDimension=ROWS&key=AIzaSyAQeVAwmeL1ghHzI2hQ5w803pjJYkSTDJ8&valueRenderOption=FORMATTED_VALUE\";\n\n\t\/\/ console.log(url);\n\nvar promise = jQuery.getJSON( url, function( data, status, jqXHR){\n\t\t\tconsole.log(\"Server Code: \", jqXHR.status, \" getJSON request for abf65f86ea7 successful!\");\n\t\t});\npromise.done(function( data ){\n\n\tconsole.log(data);\n\n\tconst rows = data.values\n\n\t\/\/ Print Header Row\n\n\tconst headerRow = Object.values(rows[0]);\n\n\tlet thead = document.getElementById(\"thead-abf65f86ea7\");\n\tthead.innerHTML = \"\";\n\tlet th = \"<tr>\";\n\n\tfor (i = 0; i < headerRow.length; i++) {\n\t\tconst headerValue = headerRow[i].toString();\n\t\tth += \"<th>\" + headerValue + \"<\/th>\";\n\t}\n\tth += \"<\/tr>\";\n\tthead.innerHTML += th;\n\n\t\/\/ Print Body Rows\n\n\tlet tbody = document.getElementById(\"tbody-abf65f86ea7\");\n\ttbody.innerHTML = \"\";\n\n\tfor (const row of rows.slice(1)) {\n\t\t\tconst individualRow = Object.values(row)\n\n\t\t\tlet tr = \"<tr class=\\\"ws-dd-gs-table-row\\\" id=\\\"trow-abf65f86ea7-\\\">\";\n\n\t\t\tfor (i = 0; i < individualRow.length; i++) { \/\/ Loop through Cells and Print\n\n\t\t\t\tvar bodyValue = individualRow[i].toString();\n\t\t\t\tconst websiteRegex = new RegExp(\"http\");\n\t\t\t\tconst emailRegex = new RegExp(\"@aisd.net\");\n\t\t\t\tconst phoneRegex = \/^\\(?([0-9]{3})\\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$\/;\n\t\t\t\tvar headerColumnCondition = \"no\";\n\n\t\t\t\t\tif (i == 0 && headerColumnCondition == \"yes\") { \/\/ Conditional Header Column based on Shortcode Attributes\n\t\t\t\t\t\tbodyValue = bodyValue.replace(\/(\\r\\n|\\r|\\n)\/g, \"<br>\");\n\t\t\t\t\t\ttr += \"<th>\" + bodyValue + \"<\/th>\";\n\t\t\t\t\t} else { \/\/ Conditional Email REGEX\n\t\t\t\t\t\tif (emailRegex.test(bodyValue) && \"\" != \"proclamation\" ) {\n\t\t\t\t\t\t\ttr += \"<td><a href=\\\"mailto:\" + bodyValue + \"\\\" style=\\\"white-space: nowrap\\\">\" + bodyValue + \"<\/a><\/td>\";\n\t\t\t\t\t} else if (websiteRegex.test(bodyValue) && \"\" != \"proclamation\" ) { \/\/ Conditional Website REGEX\n\t\t\t\t\t\ttr += \"<td><a href=\\\"\" + bodyValue + \"\\\" target=\\\"_blank\\\">View Site<\/a><\/td>\";\n\t\t\t\t\t} else if (phoneRegex.test(bodyValue)) {\n\t\t\t\t\t\ttr += \"<td style=\\\"white-space: nowrap\\\">\" + bodyValue + \"<\/td>\";\n\t\t\t\t\t} else { \/\/ All Other Cells\n\t\t\t\t\tbodyValue = bodyValue.replace(\/(\\r\\n|\\r|\\n)\/g, \"<br>\");\n\t\t\t\t\ttr += \"<td>\" + bodyValue + \"<\/td>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (individualRow.length != headerRow.length) { \/\/ Print Empty Cells Based on # of Columns\n\t\t\t\tlet lengthDifference = headerRow.length - individualRow.length;\n\t\t\t\t\tfor (j = 0; j < lengthDifference; j++) {\n\t\t\t\t\ttr += \"<td class=\\\"empty-cell\\\"><\/td>\";\n\t\t\t\t\t}\n\t\t\t}\n\t\t\ttr += \"<\/tr>\";\n\t\ttbody.innerHTML += tr;\n\t}\n}).then( \n\t\/\/ Conditionally Load DataTables JS based on Shortcode Attributes\n\tjQuery(document).ready( function () {\n\t\tif (\"no\" == \"yes\") {\n\t\t\tjQuery(\"#table-abf65f86ea7\").DataTable( {\n\t\t\t\tpaging: false,\n\t\t\t\tinfo: false,\n\t\t\t\tsearching: true,\n\t\t\t \tordering: true,\n\t\t\t \torder: []\n\t\t \t});\n\t\t\tjQuery('#resetsort').click( function() {\n\t\t\t\tvar table = jQuery(\"#table-abf65f86ea7\").DataTable();\n\t\t\t\ttable.order.neutral().draw();\n\t\t\t});\n \t\t}\n\t\/\/ Remove certain columns not applicable based on Shortcode Attributes Usecase\t\n\t\tif (\"\" == \"staff-directory\") {\n\t\t\tjQuery(\"#table-abf65f86ea7 tr\").each(function() {\n\t\t\t\tjQuery(this).children(\"td:eq(2)\").remove();\n\t\t\t\tjQuery(this).children(\"th:eq(2)\").remove();\n\t\t\t\tjQuery(this).children(\"td:eq(4)\").remove();\n\t\t\t\tjQuery(this).children(\"th:eq(4)\").remove();\n\t\t\t});\n\t\t} \n\t} )\n).fail( \/\/ Failure Reporting and Retries based on XHR Code\n\tfunction(jqXHR, textStatus, errorThrown) {\n\tconsole.log(\"Server Code: \", jqXHR.status, \"getJSON request failed! Retrying AJAX Query for abf65f86ea7\");\n\tvar placeholder = document.getElementById(\"tbody-abf65f86ea7\");\n\tvar loadingPlaceholder = \"<tr><td><div style=\\\"font-size: 200%\\\">Retrieving Information. Please Wait...<\/div><\/td><\/tr>\";\n\tif (jqXHR.status == 429) {\n\t\tsetTimeout(() => {\n\t\t\tgetSpreadsheet()}, delay = function getRandomInt(min, max) { \/\/ Delay the refetching of JSON after failure by a random amount of seconds\n\t\t\t\t\t  min = Math.ceil(5000);\n\t\t\t\t\t  max = Math.floor(10000);\n\t\t\t\t\t  return Math.floor(Math.random() * (max - min) + min); \/\/The maximum is exclusive and the minimum is inclusive\n\t\t});\n\t}\n\tif (jqXHR.status == 400) {\n\t\tvar loadingPlaceholder = \"<tr><td><div><i>Something went wrong with retrieving this information! If you continue to see this issue, please email webservices@aisd.net and include this page's URL.<\/i><\/div><\/td><\/tr>\";\n\t}\t\t\n\tplaceholder.innerHTML = loadingPlaceholder;\n})\n})(3000);\n<\/script>\n<p>****Recess is a 15 minutue schedule time.****<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>2024-2025 Ellis Elementary School Schedule ****Recess is a 15 minutue schedule time.****<\/p>\n","protected":false},"author":10400,"featured_media":0,"parent":5554,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-29","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.aisd.net\/ellis-elementary\/wp-json\/wp\/v2\/pages\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aisd.net\/ellis-elementary\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.aisd.net\/ellis-elementary\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.aisd.net\/ellis-elementary\/wp-json\/wp\/v2\/users\/10400"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aisd.net\/ellis-elementary\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":"3","href":"https:\/\/www.aisd.net\/ellis-elementary\/wp-json\/wp\/v2\/pages\/29\/revisions"}],"predecessor-version":[{"id":5958,"href":"https:\/\/www.aisd.net\/ellis-elementary\/wp-json\/wp\/v2\/pages\/29\/revisions\/5958"}],"up":[{"embeddable":true,"href":"https:\/\/www.aisd.net\/ellis-elementary\/wp-json\/wp\/v2\/pages\/5554"}],"wp:attachment":[{"href":"https:\/\/www.aisd.net\/ellis-elementary\/wp-json\/wp\/v2\/media?parent=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}