Adapt user insertion and logic to Física UB
Change-Id: Iece1abb1e2611c7fc77f379dca89ce3aead1a2d7
diff --git a/js/autocomplete.js b/js/autocomplete.js
index 3b27deb..d3885d9 100644
--- a/js/autocomplete.js
+++ b/js/autocomplete.js
@@ -1,16 +1,3 @@
-function nomcurs(curs) {
- if (curs == 1) return "1er";
- if (curs == 2) return "2on";
- if (curs == 3) return "3er";
- if (curs == 4) return "4rt";
-}
-
-function nomgrau(grau) {
- if (grau == 0) return "MAT";
- if (grau == 1) return "EST";
- if (grau == 2) return "MAMME";
-}
-
function autocomplete(inp, obj, act) {
/*the autocomplete function takes two arguments,
the text field element and an objay of possible autocompleted values:*/
@@ -43,7 +30,7 @@
b.innerHTML += nomNode.substr(parts[0].length, val.length);
b.innerHTML += "<span style='font-weight: bold; position:relative; z-index:120;'>" + nomNode.substr(parts[0].length + val.length) + "</span>";
- b.innerHTML += " <span class='autocomplete-year'>(" + nomcurs(obj[node].curs) + " - " + nomgrau(obj[node].grau) + ")</span>";
+ b.innerHTML += " <span class='autocomplete-year'>(" + obj[node].pista + ")</span>";
/*include node id to keep track of which is it*/
b.dataset.id = node;