Només ens quedem amb lo que interessa
diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 5008ddf..0000000
--- a/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/README.md b/README.md
deleted file mode 100644
index 29685b1..0000000
--- a/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# App per la traçabilitat del COVID-19 a la FME
-De moment, les tasques bàsiques a realitzar (a part de fer l'app en sí):
-
-~~1.- Primer de tot, el que voldrem és "mapejar" les aules de la FME perquè sigui més fàcil indicar on està un assegut. Idees: per la forma de l'aula hi ha això: https://fme.upc.edu/ca/fme/edifici/plafo-fme-a4.pdf, pels llocs ho haurem de fer manual.~~ A la majoria d'aules hi ha número+lletra, és molt més fàcil introduïr això a l'app que geolocalitzar-te.
-
-2.- També, volem els horaris de les assignatures per endevinar què està cursant l'usuari cada hora. Idees: parsejar això https://fme.upc.edu/ca/arxius/curs-actual/horaris/20-21/horari-gm_fme2020-2021_q1_provisional-1.pdf
-
-3.- Per últim, volem les aules en les que es cursen les assignatures segons l'hora. Idees: fer scrapping d'això ~~https://fme.upc.edu/ca/la-facultat/edifici/ocupacio-despais~~ Aules Teoria: https://fme-intranet.upc.edu/appsext/mrbs/web/day.php?year=2020&month=9&day=17&area=2 Aules PC: https://fme-intranet.upc.edu/appsext/mrbs/web/day.php?year=2020&month=9&day=17&area=6
-
-Recordeu que estem intentant millorar això: https://docs.google.com/forms/d/e/1FAIpQLSfT9o287VqLyhwR8LPdloAQWhuqCgA3NfdhgP5vb9_sVQHL-g/viewform
-
-Vinga va.
diff --git a/css/autocomplete.css b/css/autocomplete.css
deleted file mode 100644
index d56e088..0000000
--- a/css/autocomplete.css
+++ /dev/null
@@ -1,50 +0,0 @@
-* { box-sizing: border-box; }
-body {
- font: 16px Arial;
-}
-.autocomplete {
- /*the container must be positioned relative:*/
- position: relative;
- display: inline-block;
-}
-input {
- border: 1px solid transparent;
- background-color: #f1f1f1;
- padding: 10px;
- font-size: 16px;
-}
-input[type=text] {
- background-color: #f1f1f1;
- width: 100%;
-}
-input[type=submit] {
- background-color: DodgerBlue;
- color: #fff;
-}
-.autocomplete-items {
- position: absolute;
- border: 1px solid #d4d4d4;
- border-bottom: none;
- border-top: none;
- z-index: 99;
- /*position the autocomplete items to be the same width as the container:*/
- top: 100%;
- left: 0;
- right: 0;
-}
-.autocomplete-items div {
- padding: 10px;
- cursor: pointer;
- background-color: #fff;
- border-bottom: 1px solid #d4d4d4;
-}
-.autocomplete-items div:hover {
- /*when hovering an item:*/
- background-color: #e9e9e9;
-}
-.autocomplete-active {
- /*when navigating through the items using the arrow keys:*/
- background-color: DodgerBlue !important;
- color: #ffffff;
-}
-
diff --git a/css/bulma-ajustments.css b/css/bulma-ajustments.css
new file mode 100644
index 0000000..8931934
--- /dev/null
+++ b/css/bulma-ajustments.css
@@ -0,0 +1,49 @@
+.buttons.grid {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+
+ justify-content: center;
+ align-items : center;
+}
+
+.buttons.grid .button {
+ flex: 1 0 20%;
+ margin: 10px;
+ padding: 40px 20px;
+ line-height: 0px;
+}
+
+.buttons.grid .complex-button {
+ flex: 1 0 34%;
+ margin: 15px 10px;
+}
+
+.section {
+ padding-top: 1rem;
+}
+
+#dev-mode {
+ background: #d23f31;
+ border: 1px solid #3e2723;
+ box-shadow: 0 0 4px rgba(0,0,0,.14), 0 2px 4px rgba(0,0,0,.28);
+ color: #fff;
+ font-size: 10px;
+ font-weight: 700;
+ right: 20px;
+ line-height: 18px;
+ margin: -9px -50px;
+ opacity: .87;
+ position: absolute;
+ text-align: center;
+ text-shadow: 1px 1px 0 #4e342e;
+ top: 20px;
+ transform: rotate(45deg);
+ width: 100px;
+ z-index: 99;
+ cursor: pointer;
+}
+
+#dev-mode.hidden {
+ display: none;
+}
\ No newline at end of file
diff --git a/css/generalStyle.css b/css/generalStyle.css
deleted file mode 100644
index 92b6654..0000000
--- a/css/generalStyle.css
+++ /dev/null
@@ -1,40 +0,0 @@
-.myButton {
- box-shadow:inset 0px 1px 0px 0px #6e9eb8;
- background:linear-gradient(to bottom, #1a5b8c 5%, #4b84a3 100%);
- background-color:#1a5b8c;
- border:1px solid #22536e;
- display:inline-block;
- cursor:pointer;
- color:#ffffff;
- font-family:Arial;
- font-size:13px;
- font-weight:bold;
- padding:6px 12px;
- text-decoration:none;
-}
-.myButton:hover {
- background:linear-gradient(to bottom, #4b84a3 5%, #1a5b8c 100%);
- background-color:#4b84a3;
-}
-.myButton:active {
- position:relative;
- top:1px;
-}
-.alert {
- position: fixed;
- top: 0;
- right: 0.5rem;
- border:1px solid rgba(0, 0, 0, 0.2);
- border-radius: 0.25rem;
- padding: 2rem;
- background: #fff;
- color: #f65656;
- box-shadow: 0 5px 10px -5px rgba(0, 0, 0, 0.5);
- transition: all 0.2s ease-in-out;
- opacity: 0;
-}
-
-.visible {
- opacity: 1;
- transform: translateY(1.25rem);
-}
\ No newline at end of file
diff --git a/horaris.json b/horaris.json
deleted file mode 100644
index 4a607ef..0000000
--- a/horaris.json
+++ /dev/null
@@ -1 +0,0 @@
-classes = '[{"nom" : "Càlcul", "hora" : ["08:00-9:00", "08:00-9:00", "08:00-9:00", "08:00-9:00", "08:00-9:00", "08:00-9:00", "08:00-9:00"], "aula" : "S02"}, {"nom" : "Àlgebra Lineal", "hora" : ["09:00-10:00", "09:00-10:00", "09:00-10:00", "09:00-10:00", "09:00-10:00", "09:00-10:00", "09:00-10:00"], "aula" : "S02"}, {"nom" : "Àlgebra Multilineal", "hora" : ["10:00-11:00", "10:00-11:00", "10:00-11:00", "10:00-11:00", "10:00-11:00", "10:00-11:00", "10:00-11:00"], "aula" : "S02"}, {"nom" : "Geometria", "hora" : ["11:00-12:00", "11:00-12:00", "11:00-12:00", "11:00-12:00", "11:00-12:00", "11:00-12:00", "11:00-12:00"], "aula" : "S02"}, {"nom" : "EDOS", "hora" : ["12:00-13:00", "12:00-13:00", "12:00-13:00", "12:00-13:00", "12:00-13:00", "12:00-13:00", "12:00-13:00"] , "aula" : "S02"}, {"nom" : "EDPS", "hora" : ["13:00-14:00", "13:00-14:00", "13:00-14:00", "13:00-14:00", "13:00-14:00", "13:00-14:00", "13:00-14:00"], "aula" : "S02"}, {"nom" : "Calcul Integral", "hora" : ["14:00-15:00", "14:00-15:00", "14:00-15:00", "14:00-15:00", "14:00-15:00", "14:00-15:00", "14:00-15:00"], "aula" : "S02"}, {"nom" : "Fonaments de les Matemàtiques", "hora" : ["15:00-16:00", "15:00-16:00", "15:00-16:00", "15:00-16:00", "15:00-16:00", "15:00-16:00", "15:00-16:00"], "aula" : "S02"}, {"nom" : "ÀLGEBRA MULTILINIAL9", "hora" : ["16:00-17:00", "16:00-17:00", "16:00-17:00", "16:00-17:00", "16:00-17:00", "16:00-17:00", "16:00-17:00"], "aula" : "S02"}, {"nom" : "ÀLGEBRA MULTILINIAL10", "hora" : ["17:00-18:00", "17:00-18:00", "17:00-18:00", "17:00-18:00", "17:00-18:00", "17:00-18:00", "17:00-18:00"], "aula" : "S02"}, {"nom" : "ÀLGEBRA MULTILINIAL11", "hora" : ["18:00-19:00", "18:00-19:00", "18:00-19:00", "18:00-19:00", "18:00-19:00", "18:00-19:00", "18:00-19:00"], "aula" : "S02"}, {"nom" : "ÀLGEBRA MULTILINIAL12", "hora" : ["19:00-20:00", "19:00-20:00", "19:00-20:00", "19:00-20:00", "19:00-20:00", "19:00-20:00", "19:00-20:00"], "aula" : "S02"}, {"nom" : "ÀLGEBRA MULTILINIAL13", "hora" : ["20:00-21:00", "20:00-21:00", "20:00-21:00", "20:00-21:00", "20:00-21:00", "20:00-21:00", "20:00-21:00"], "aula" : "S02"}, {"nom" : "ÀLGEBRA MULTILINIAL14", "hora" : ["21:00-22:00", "21:00-22:00", "21:00-22:00", "21:00-22:00", "21:00-22:00", "21:00-22:00", "21:00-22:00"], "aula" : "S02"}, {"nom" : "ÀLGEBRA MULTILINIAL15", "hora" : ["22:00-23:00", "22:00-23:00", "22:00-23:00", "22:00-23:00", "22:00-23:00", "22:00-23:00", "22:00-23:00"], "aula" : "S02"}, {"nom" : "ÀLGEBRA MULTILINIAL16", "hora" : ["23:00-00:00", "23:00-00:00", "23:00-00:00", "23:00-00:00", "23:00-00:00", "23:00-00:00", "23:00-00:00"], "aula" : "S02"}]';
\ No newline at end of file
diff --git a/index.html b/index.html
index 06095a4..37445d2 100644
--- a/index.html
+++ b/index.html
@@ -6,60 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.0/css/bulma.min.css">
+ <link rel="stylesheet" href="./css/bulma-adjustments.css">
</head>
<body>
- <style>
- .buttons.grid {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
-
- justify-content: center;
- align-items : center;
- }
-
- .buttons.grid .button {
- flex: 1 0 20%;
- margin: 10px;
- padding: 40px 20px;
- line-height: 0px;
- }
-
- .buttons.grid .complex-button {
- flex: 1 0 34%;
- margin: 15px 10px;
- }
-
- .section {
- padding-top: 1rem;
- }
-
- #dev-mode {
- background: #d23f31;
- border: 1px solid #3e2723;
- box-shadow: 0 0 4px rgba(0,0,0,.14), 0 2px 4px rgba(0,0,0,.28);
- color: #fff;
- font-size: 10px;
- font-weight: 700;
- right: 20px;
- line-height: 18px;
- margin: -9px -50px;
- opacity: .87;
- position: absolute;
- text-align: center;
- text-shadow: 1px 1px 0 #4e342e;
- top: 20px;
- transform: rotate(45deg);
- width: 100px;
- z-index: 99;
- cursor: pointer;
- }
-
- #dev-mode.hidden {
- display: none;
- }
- </style>
-
<script>
var elements = document.getElementsByClassName("button");
Array.from(elements).forEach(function(element) {
@@ -303,15 +252,15 @@
<button class="button is-link is-light" onclick="switchSection('section-3')">Torna enrere (Número)</button>
<br/><br/>
<span class="has-text-weight-bold">Assignatura:</span>
- <span id="subject-final">Àlgebra Lineal</span><br>
+ <span id="subject-final">ASSIGNATURA ESCOLLIDA</span><br>
<span class="has-text-weight-bold">Aula:</span>
- <span id="classroom-final">Dele</span><br>
+ <span id="classroom-final">AULA ESCOLLIDA</span><br>
<span class="has-text-weight-bold">Data:</span>
- <span id="date-final">14/3/1879</span><br>
+ <span id="date-final">DD/MM/YYYY</span><br>
<span class="has-text-weight-bold">Hora:</span>
- <span id="time-final">En <strong>algun moment</strong></span><br>
+ <span id="time-final">HH:MM - HH:MM</span><br>
<span class="has-text-weight-bold">Posició:</span>
- <span id="letter-final">P</span><span id="number-final">2</span><br><br>
+ <span id="letter-final">A</span><span id="number-final">1</span><br><br>
<button id="send-button" class="button is-link is-large">Omple el formulari</button><br><br>
diff --git a/js/autocomplete.js b/js/autocomplete.js
deleted file mode 100644
index 11c65cc..0000000
--- a/js/autocomplete.js
+++ /dev/null
@@ -1,96 +0,0 @@
-function autocomplete(inp, arr) {
- /*the autocomplete function takes two arguments,
- the text field element and an array of possible autocompleted values:*/
- var currentFocus;
- /*execute a function when someone writes in the text field:*/
- inp.addEventListener("input", function(e) {
- var a, b, i, val = this.value;
- /*close any already open lists of autocompleted values*/
- closeAllLists();
- if (!val) { return false;}
- currentFocus = -1;
- /*create a DIV element that will contain the items (values):*/
- a = document.createElement("DIV");
- a.setAttribute("id", this.id + "autocomplete-list");
- a.setAttribute("class", "autocomplete-items");
- /*append the DIV element as a child of the autocomplete container:*/
- this.parentNode.appendChild(a);
- /*for each item in the array...*/
- for (i = 0; i < arr.length; i++) {
- /*check if the item starts with the same letters as the text field value:*/
- if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
- /*create a DIV element for each matching element:*/
- b = document.createElement("DIV");
- /*make the matching letters bold:*/
- b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
- b.innerHTML += arr[i].substr(val.length);
- /*insert a input field that will hold the current array item's value:*/
- b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
- /*execute a function when someone clicks on the item value (DIV element):*/
- b.addEventListener("click", function(e) {
- /*insert the value for the autocomplete text field:*/
- inp.value = this.getElementsByTagName("input")[0].value;
- /*close the list of autocompleted values,
- (or any other open lists of autocompleted values:*/
- closeAllLists();
- });
- a.appendChild(b);
- }
- }
- });
- /*execute a function presses a key on the keyboard:*/
- inp.addEventListener("keydown", function(e) {
- var x = document.getElementById(this.id + "autocomplete-list");
- if (x) x = x.getElementsByTagName("div");
- if (e.keyCode == 40) {
- /*If the arrow DOWN key is pressed,
- increase the currentFocus variable:*/
- currentFocus++;
- /*and and make the current item more visible:*/
- addActive(x);
- } else if (e.keyCode == 38) { //up
- /*If the arrow UP key is pressed,
- decrease the currentFocus variable:*/
- currentFocus--;
- /*and and make the current item more visible:*/
- addActive(x);
- } else if (e.keyCode == 13) {
- /*If the ENTER key is pressed, prevent the form from being submitted,*/
- e.preventDefault();
- if (currentFocus > -1) {
- /*and simulate a click on the "active" item:*/
- if (x) x[currentFocus].click();
- }
- }
- });
- function addActive(x) {
- /*a function to classify an item as "active":*/
- if (!x) return false;
- /*start by removing the "active" class on all items:*/
- removeActive(x);
- if (currentFocus >= x.length) currentFocus = 0;
- if (currentFocus < 0) currentFocus = (x.length - 1);
- /*add class "autocomplete-active":*/
- x[currentFocus].classList.add("autocomplete-active");
- }
- function removeActive(x) {
- /*a function to remove the "active" class from all autocomplete items:*/
- for (var i = 0; i < x.length; i++) {
- x[i].classList.remove("autocomplete-active");
- }
- }
- function closeAllLists(elmnt) {
- /*close all autocomplete lists in the document,
- except the one passed as an argument:*/
- var x = document.getElementsByClassName("autocomplete-items");
- for (var i = 0; i < x.length; i++) {
- if (elmnt != x[i] && elmnt != inp) {
- x[i].parentNode.removeChild(x[i]);
- }
- }
-}
-/*execute a function when someone clicks in the document:*/
-document.addEventListener("click", function (e) {
- closeAllLists(e.target);
-});
-}
\ No newline at end of file
diff --git a/js/completeHTML.js b/js/completeHTML.js
deleted file mode 100644
index 7ea0067..0000000
--- a/js/completeHTML.js
+++ /dev/null
@@ -1,19 +0,0 @@
-
-function completaHTML() {
- document.getElementById("data").innerHTML = data;
- var trobat = false;
- for (i = 0; i < dataHorarisAlumne.length; i++) {
- var h = dataHorarisAlumne[i].hora[hora_actual.getDay()].split(":");
- var hAct = hora_actual.getHours() - 1;
- if(hAct < 10) hAct = "0" + hAct;
- if(h[0] == hAct) {
- trobat = true;
- document.getElementById("assignatura").innerHTML = dataHorarisAlumne[i].nom;
- document.getElementById("aula").innerHTML = "Aula " + dataHorarisAlumne[i].aula;
- }
- }
- if(!trobat) {
- document.getElementById("assignatura").innerHTML = "No tens cap assignatura ara mateix de les que curses";
- }
-
-}
\ No newline at end of file
diff --git a/js/completeLink.js b/js/completeLink.js
deleted file mode 100644
index 2536000..0000000
--- a/js/completeLink.js
+++ /dev/null
@@ -1,50 +0,0 @@
-
-function completaLink() {
- if(linkOutput == "") linkOutput = "https://docs.google.com/forms/d/e/1FAIpQLSfT9o287VqLyhwR8LPdloAQWhuqCgA3NfdhgP5vb9_sVQHL-g/viewform";
- for (i = 0; i < dataHorarisAlumne.length; i++) {
- var h = dataHorarisAlumne[i].hora[hora_actual.getDay()].split(":");
- console.log(h[0]);
- console.log((hora_actual.getHours()).toString());
- var hAct = hora_actual.getHours() - 1;
- if(hAct < 10) hAct = "0" + hAct;
- if(h[0] == hAct) {
- console.log("trobat");
- document.getElementById("assignatura").innerHTML = dataHorarisAlumne[i].nom;
- document.getElementById("aula").innerHTML = "Aula " + dataHorarisAlumne[i].aula;
-
- var datamap=[
- "entry.1063142948=" + dataHorarisAlumne[i].aula,
- "entry.1749141911=" + ((hora_actual.getHours() - 11).toString()) +":00",
- "entry.1827359679=" + ((hora_actual.getHours() - 10).toString()) +":00",
- "entry.2115504093=" + getYearFormat() + '-' + getMonthFormat() + '-' + getDayFormat(),
- "entry.1077148310=Columna+" + document.getElementById("seientInput").value
- ];
- window.location.href = linkOutput + "?"+ datamap[1] + "&" + datamap[2] + "&" + datamap[3] + "&" + datamap[0] + "&" + datamap[4] + "&entry." + codisFiles[document.getElementById("seientInput").value.toUpperCase().charCodeAt(0) - 65] + "=Columna+" + document.getElementById("seientInput").value.charAt(1) + "&entry.1600275159=[Autogenerat+per+delefme/covid-tracability]";
- }
- }
-}
-
-function completaLinkNoAnatClasse() {
- if(linkOutput == "") linkOutput = "https://docs.google.com/forms/d/e/1FAIpQLSfT9o287VqLyhwR8LPdloAQWhuqCgA3NfdhgP5vb9_sVQHL-g/viewform";
- for (i = 0; i < dataHorarisAlumne.length; i++) {
- var h = dataHorarisAlumne[i].hora[hora_actual.getDay()].split(":");
- console.log(h[0]);
- console.log((hora_actual.getHours()).toString());
- var hAct = hora_actual.getHours() - 1;
- if(hAct < 10) hAct = "0" + hAct;
- if(h[0] == hAct) {
- console.log("trobat");
- document.getElementById("assignatura").innerHTML = dataHorarisAlumne[i].nom;
- document.getElementById("aula").innerHTML = "Aula " + dataHorarisAlumne[i].aula;
-
- var datamap=[
- "entry.1063142948=" + dataHorarisAlumne[i].aula,
- "entry.1749141911=" + ((hora_actual.getHours() - 11).toString()) +":00",
- "entry.1827359679=" + ((hora_actual.getHours() - 10).toString()) +":00",
- "entry.2115504093=" + getYearFormat() + '-' + getMonthFormat() + '-' + getDayFormat(),
- "entry.1077148310=Columna+" + document.getElementById("seientInput").value
- ];
- window.location.href = linkOutput + "?"+ datamap[1] + "&" + datamap[2] + "&" + datamap[3] + "&" + datamap[0] + "&entry." + codisFiles[document.getElementById("seientInput").value.toUpperCase().charCodeAt(0) - 65] + "=Columna+" + document.getElementById("seientInput").value.charAt(1) + "&entry.1600275159=___No_he_assistit_a_aquesta_classe___[Autogenerat+per+delefme/covid-tracability]";
- }
- }
-}
\ No newline at end of file
diff --git a/js/completeSubjectListInHTML.js b/js/completeSubjectListInHTML.js
deleted file mode 100644
index 24ae8d9..0000000
--- a/js/completeSubjectListInHTML.js
+++ /dev/null
@@ -1,56 +0,0 @@
-
-function completeSubjectList() {
- var trobat = false;
- var jaEsta = false;
- for(var i = 0; i < totesLesClasses.length; i++) {
-
- if(document.getElementById("myInput").value == totesLesClasses[i].nom) {
- for(var j = 0; j < dataHorarisAlumne.length; j++) {
- if(totesLesClasses[i].nom == dataHorarisAlumne[j].nom) {
- jaEsta = true;
- break;
- }
- }
- if(!jaEsta) {
- dataHorarisAlumne.push({ "nom":totesLesClasses[i].nom, "hora":totesLesClasses[i].hora, "aula": totesLesClasses[i].aula })
- document.getElementById("subjectList").innerHTML += "<br>" + document.getElementById("myInput").value + " " + totesLesClasses[i].hora[hora_actual.getDay()];
- localStorage.dataHorarisAlumne = JSON.stringify(dataHorarisAlumne);
- trobat = true;
- completaHTML();
- }
- else {
- break;
- }
- }
- }
- if(!trobat && !jaEsta) {
- showAlert();
- }
- else if(jaEsta) {
-
- }
-}
-
-
-function returnAllSubjectArray() {
- for(var i = 0; i < totesLesClasses.length; i++) {
- subjects.push(totesLesClasses[i].nom);
- }
-}
-
-function writeSubjectList() {
- for(var i = 0; i < dataHorarisAlumne.length; i++) {
- document.getElementById("subjectList").innerHTML += "<br>" + dataHorarisAlumne[i].nom + " " + dataHorarisAlumne[i].hora[hora_actual.getDay()];
- }
-}
-
-function showAlert() {
- document.getElementById("alert").innerHTML = "Aquesta assignatura no esta dins de la llista"
- document.getElementById("alert").style.opacity = "1";
- setTimeout(()=> dissapearAlert() ,2000); // hide the alert after 2.5s
-}
-
-function dissapearAlert() {
- document.getElementById("alert").style.opacity = "0";
- document.getElementById("alert").innerHTML = "";
-}
\ No newline at end of file
diff --git a/js/getTimeAndDate.js b/js/getTimeAndDate.js
deleted file mode 100644
index ff827ef..0000000
--- a/js/getTimeAndDate.js
+++ /dev/null
@@ -1,35 +0,0 @@
-
-function getTimeAndDate() {
- // Hora d'inici
- hora_actual.setMinutes(0, 0, 0); // Arrodonir per baix els minuts
- minuts = hora_actual.getMinutes() < 10 ? hora_actual.getMinutes().toString() + '0' : hora_actual.getMinutes().toString();
- document.getElementById("inici").innerHTML = hora_actual.getHours().toString() + ":" + minuts;
-
- // Hora de fi
- hora_actual.setHours(hora_actual.getHours() + 1); // Sumar una hora
- minuts = hora_actual.getMinutes() < 10 ? hora_actual.getMinutes().toString() + '0' : hora_actual.getMinutes().toString();
- document.getElementById("fi").innerHTML = hora_actual.getHours().toString() + ":" + minuts;
-
- // Data
- dia = hora_actual.getDate();
- mes = hora_actual.getMonth() + 1;
- any = hora_actual.getFullYear();
- data = dia.toString() + '/' + mes.toString() + '/' + any.toString();
-}
-
-function getDayFormat() {
- dia = hora_actual.getDate();
- if(dia < 10) return "0" + dia;
- else return "" +dia;
-}
-
-function getMonthFormat() {
- mes = hora_actual.getMonth() + 1;
- if(mes < 10) return "0" + mes;
- else return "" + mes;
-}
-
-function getYearFormat() {
- any = hora_actual.getFullYear();
- return "" +any;
-}
\ No newline at end of file
diff --git a/js/table-parser.js b/js/table-parser.js
deleted file mode 100644
index 7ea7194..0000000
--- a/js/table-parser.js
+++ /dev/null
@@ -1,34 +0,0 @@
-
-const fs = require('fs');
-
-let hores = [], newhour;
-
-for (let h = 8; h < 22; ++h) {
- newhour = "";
- if (h < 10) newhour += "0";
- newhour += h.toString();
-
- hores.push(newhour + ":00");
- hores.push(newhour + ":30");
-}
-
-hores.forEach(hora => {
- let column = 1;
- let td = $("td:contains(" + hora + ")").next();
-
- while (td.text().indexOf(hora) == -1) {
-
- if (td.text().indexOf("CDATA") == -1) {
- let aula = $("#day_main th")[column].textContent.trim();
- let durada = parseInt(td.attr("rowspan"))*30;
-
- console.log(td.text()
- + ", " + hora
- + ", " + durada + "mins"
- + ", " + aula);
- }
-
- td = td.next();
- ++column;
- }
-});
diff --git a/main.html b/main.html
deleted file mode 100644
index 48e9d1a..0000000
--- a/main.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<!DOCTYPE html>
-<script type="text/javascript" src="./horaris.json"></script>
-<script type="text/javascript" src="./js/autocomplete.js"></script>
-<script type="text/javascript" src="./js/completeLink.js"></script>
-<script type="text/javascript" src="./js/completeSubjectListInHTML.js"></script>
-<script type="text/javascript" src="./js/getTimeAndDate.js"></script>
-<script type="text/javascript" src="./js/completeHTML.js"></script>
-<script type="text/css" src="./css/autocomplete.css"></script>
-<script type="text/css" src="./css/generalStyle.css"></script>
-<meta charset="utf-8">
-
-<html>
- <head>
- <style type="text/css">
- .myButton {
- box-shadow:inset 0px 1px 0px 0px #6e9eb8;
- background:linear-gradient(to bottom, #1a5b8c 5%, #4b84a3 100%);
- background-color:#1a5b8c;
- border:1px solid #22536e;
- display:inline-block;
- cursor:pointer;
- color:#ffffff;
- font-family:Arial;
- font-size:13px;
- font-weight:bold;
- padding:6px 12px;
- text-decoration:none;
- }
- .myButton:hover {
- background:linear-gradient(to bottom, #4b84a3 5%, #1a5b8c 100%);
- background-color:#4b84a3;
- }
- .myButton:active {
- position:relative;
- top:1px;
- }
- .myButton2 {
- box-shadow:inset 0px 1px 0px 0px #b30000;
- background:linear-gradient(to bottom, #ff1a1a 5%, #ff8080 100%);
- background-color:#ff6666;
- border:1px solid #990000;
- display:inline-block;
- cursor:pointer;
- color:#ffffff;
- font-family:Arial;
- font-size:13px;
- font-weight:bold;
- padding:6px 12px;
- text-decoration:none;
- }
- .myButton2:hover {
- background:linear-gradient(to bottom, #ff8080 5%, #ff1a1a 100%);
- background-color:#ff6666;
- }
- .myButton2:active {
- position:relative;
- top:1px;
- }
- </style>
- </head>
- <center>
- <link rel="stylesheet" href="autocomplete.css">
- <body>
- <h1>App de traçabilitat DAFME</h1>
- <h2 id = "assignatura"></h2>
- <h3 id = "aula"></h3>
-
- <h2 id="hora">
- <span id="inici"></span> -
- <span id="fi"></span>
- </h2>
- <h3 id="data"></h3>
-
- <form id="subjectListInput" autocomplete="off">
- <div class="autocomplete" id="input2" style="width:300px;">
- <input id="myInput" type="text" name="mySubject" placeholder="Subject">
- </div>
- </form>
-
- <a class="myButton" onclick="completeSubjectList()">Afegeix</a>
-
- <p id="alert" style="opacity: 0; color:red;">
-
- </p>
- <div id="subjectList"><b>Assignatures Cursades:</b></div>
-
- <form>
- <label for="seient" id="seient"></label><br>
- <input type="text" id="seientInput" placeholder="Seient" style="width:300px;"><br>
- </form>
-
- <form id = "link">
- <!--<form id = "link" action = https://docs.google.com/forms/d/e/1FAIpQLSfT9o287VqLyhwR8LPdloAQWhuqCgA3NfdhgP5vb9_sVQHL-g/viewform?entry.1063142948=S03&entry.2115504093=2020-09-14&entry.1749141911=9:00&entry.1827359679=10:00&entry.208184485=Columna+3&entry.1600275159=[Autogenerat+per+delefme/covid-tracability]>-->
-
- <h2>
- <a class="myButton" type="reset" onclick="completaLink()">Continua</a>
- <a class="myButton2" onclick="completaLinkNoAnatClasse()">No he assistit a classe</a>
- </h2>
- </form>
-
- <a class="myButton" href="https://docs.google.com/forms/d/e/1FAIpQLSfT9o287VqLyhwR8LPdloAQWhuqCgA3NfdhgP5vb9_sVQHL-g/viewform">Hi ha errors? Completa formulari manualment</a>
-
- <script>
- //localStorage.clear();
-
- var codisFiles = ["208184485", "1077148310", "642851281", "1686039024", "697835787", "1511799646", "809853432", "182597499", "1890539481", "529159478", "1615241874", "1334263875"];
- var subjects = [];
- var linkOutput = "";
- var totesLesClasses = JSON.parse(classes);
- var dataHorarisAlumne = [];
- var hora_actual = new Date();
- var minuts, dia, mes, any, data;
-
- if(localStorage.dataHorarisAlumne != null) dataHorarisAlumne = JSON.parse(localStorage.dataHorarisAlumne);
-
- //localStorage.clear();
- returnAllSubjectArray();
- autocomplete(document.getElementById("myInput"), subjects);
- getTimeAndDate();
- completaHTML();
- writeSubjectList();
-
- </script>
-
-
- </body>
- </center>
-</html>