summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--assets/css/styles.css17
-rw-r--r--assets/js/app.js.bvr4
-rw-r--r--assets/js/gradings.js318
-rw-r--r--assets/js/lang/bundle.js8
-rw-r--r--assets/js/meals.js712
-rw-r--r--assets/pages-src/changelog.bvr305
-rw-r--r--assets/pages-src/gradings.bvr143
-rw-r--r--assets/pages-src/meals.bvr262
-rw-r--r--assets/pages-src/misc/matomo.bvr79
-rw-r--r--assets/root/manifest.json11
-rwxr-xr-xdist/cache_name.txt2
-rwxr-xr-xdist/css/styles.css17
-rwxr-xr-xdist/js/app.js87
-rwxr-xr-xdist/js/lang/bundle.js2
-rwxr-xr-xdist/js/meals.js25
-rwxr-xr-xdist/manifest.json11
-rwxr-xr-xdist/pages/about.html4
-rwxr-xr-xdist/pages/changelog.html305
-rwxr-xr-xdist/pages/gradings.html163
-rwxr-xr-xdist/pages/meals.html262
-rwxr-xr-xdist/sw.js4
-rw-r--r--global.bvr2
23 files changed, 1541 insertions, 1206 deletions
diff --git a/Makefile b/Makefile
index 611336b..90fe3e1 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ default:
@echo " make prepare installs dependencies, uses \`sudo apt\`."
@echo " make generate installs BežiApp to dist/"
@echo "notes and hacks:"
- @echo " \`cp /bin/cp bin/bvr-jsmin\` if you don't want jsmin (before generate)"
+ @echo " \`env jsminpath=/bin/cp make generate\` to prevent js minification"
@echo "no target specified, exiting ..."
prepare:
@@ -29,6 +29,6 @@ generate:
mkdir -p dist/js
# js ne znam te magije
-find assets/js/ -name "*.bvr" -printf "%f\n" | xargs -I % bash -c "FILE='%'; FILE_DST="dist/js/\$${FILE/.bvr/}"; ./bin/bvr-compose-single \"assets/js/\$$FILE\" \"\$$FILE_DST\""
- -find assets/js/ -name "*.js" -printf "%P\n" | xargs -I % bash -c "FILE='%'; FILE_DST="dist/js/\$${FILE/.bvr/}"; ./bin/bvr-jsmin assets/js/\"\$$FILE\" \"\$$FILE_DST\""
+ -find assets/js/ -name "*.js" -printf "%P\n" | xargs -I % bash -c "test -z "\$${jsminpath}" && jsminpath=./bin/bvr-jsmin; FILE='%'; FILE_DST="dist/js/\$${FILE/.bvr/}"; \$$jsminpath assets/js/\"\$$FILE\" \"\$$FILE_DST\""
cp -r assets/root/.well-known dist/
chmod 0775 dist -R
diff --git a/assets/css/styles.css b/assets/css/styles.css
index 0e11125..06da571 100644
--- a/assets/css/styles.css
+++ b/assets/css/styles.css
@@ -134,9 +134,8 @@ a.collection-item {
}
.fc-unthemed td.fc-today {
- background: var(--color-primary-transparent);
+ background: var(--color-primary-transparent) !important;
}
-
.fc-icon {
color: var(--color-text);
}
@@ -428,4 +427,16 @@ h1, h2, h3, h4, h5, h6 {
ol {
color: var(--color-text) !important;
-} \ No newline at end of file
+}
+
+/* meals: */
+
+.selected-meal {
+ color: green !important;
+ font-weight: bold !important;
+}
+
+.to-be-selected-meal {
+ color: brown !important;
+ font-weight: italic !important;
+}
diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr
index 3d4cc6b..5441c59 100644
--- a/assets/js/app.js.bvr
+++ b/assets/js/app.js.bvr
@@ -121,4 +121,6 @@ document.addEventListener("DOMContentLoaded", () => {
try_app_update();
}, 1000 * BEZIAPP_UPDATE_INTERVAL);
-}); \ No newline at end of file
+});
+
+<@?i matomo@>
diff --git a/assets/js/gradings.js b/assets/js/gradings.js
index 4730248..92e696d 100644
--- a/assets/js/gradings.js
+++ b/assets/js/gradings.js
@@ -2,197 +2,197 @@
var calendar_obj = null;
var gradings;
async function checkLogin() {
- localforage.getItem("logged_in").then((value) => {
- // This code runs once the value has been loaded
- // from the offline store.
- if (value !== true) {
- window.location.replace("/index.html");
- }
- }).catch((err) => {
- // This code runs if there were any errors
- console.log(err);
- });
+ localforage.getItem("logged_in").then((value) => {
+ // This code runs once the value has been loaded
+ // from the offline store.
+ if (value !== true) {
+ window.location.replace("/index.html");
+ }
+ }).catch((err) => {
+ // This code runs if there were any errors
+ console.log(err);
+ });
}
// Set loading bar visibility
function setLoading(state) {
- if (state) {
- $("#loading-bar").removeClass("hidden");
- } else {
- $("#loading-bar").addClass("hidden");
- }
+ if (state) {
+ $("#loading-bar").removeClass("hidden");
+ } else {
+ $("#loading-bar").addClass("hidden");
+ }
}
// GET COLOR FROM STRING
function hashCode(str) { // java String#hashCode
- var hash = 0;
- for (var i = 0; i < str.length; i++) {
- hash = str.charCodeAt(i) + ((hash << 5) - hash);
- }
- return hash;
+ var hash = 0;
+ for (var i = 0; i < str.length; i++) {
+ hash = str.charCodeAt(i) + ((hash << 5) - hash);
+ }
+ return hash;
}
function intToRGB(i) {
- var c = (i & 0x00FFFFFF)
- .toString(16)
- .toUpperCase();
+ var c = (i & 0x00FFFFFF)
+ .toString(16)
+ .toUpperCase();
- return "00000".substring(0, 6 - c.length) + c;
+ return "00000".substring(0, 6 - c.length) + c;
}
// http://www.w3.org/TR/AERT#color-contrast
function getForegroundFromBackground(background_color) {
- let color_hex = background_color.replace("#", "");
- let rgb = [
- parseInt(color_hex.substring(0, 2), 16),
- parseInt(color_hex.substring(2, 4), 16),
- parseInt(color_hex.substring(4, 6), 16)
- ];
- let o = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) / 1000);
- if (o > 180) {
- return "#000000";
- } else {
- return "#ffffff";
- }
+ let color_hex = background_color.replace("#", "");
+ let rgb = [
+ parseInt(color_hex.substring(0, 2), 16),
+ parseInt(color_hex.substring(2, 4), 16),
+ parseInt(color_hex.substring(4, 6), 16)
+ ];
+ let o = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) / 1000);
+ if (o > 180) {
+ return "#000000";
+ } else {
+ return "#ffffff";
+ }
}
function getHexColorFromString(str) {
- return "#" + intToRGB(hashCode(str));
+ return "#" + intToRGB(hashCode(str));
}
// --------------------------------------------------
function getDateString() {
- let date = new Date();
+ let date = new Date();
- let year_str = date.getFullYear();
- let month_str = date.getMonth() + 1
- month_str = month_str.toString().padStart(2, "0");
- let day_str = date.getDate();
- day_str = day_str.toString().padStart(2, "0");
+ let year_str = date.getFullYear();
+ let month_str = date.getMonth() + 1
+ month_str = month_str.toString().padStart(2, "0");
+ let day_str = date.getDate();
+ day_str = day_str.toString().padStart(2, "0");
- let date_string = year_str + "-" + month_str + "-" + day_str;
- return date_string;
+ let date_string = year_str + "-" + month_str + "-" + day_str;
+ return date_string;
}
async function loadGradings(force_refresh = false) {
- setLoading(true);
- let promises_to_run = [
- localforage.getItem("username").then((value) => {
- username = value;
- }),
- localforage.getItem("password").then((value) => {
- password = value;
- }),
- localforage.getItem("gradings").then((value) => {
- gradings = value;
- })
- ];
- await Promise.all(promises_to_run);
- if (gradings == null || gradings == [] || gradings == -1 || force_refresh) {
- try {
- let gsecInstance = new gsec();
- await gsecInstance.login(username, password);
- gsecInstance.fetchGradings().then( (value) => {
- gradings = value;
- localforage.setItem("gradings", value).then(() => {
- displayData();
- setLoading(false);
- });
- setLoading(false);
- }).catch( (err) => {
- gsecErrorHandlerUI(err);
- setLoading(false);
- });
- } catch (err) {
- gsecErrorHandlerUI(err);
- setLoading(false);
- }
- } else {
- displayData();
- setLoading(false);
- }
+ setLoading(true);
+ let promises_to_run = [
+ localforage.getItem("username").then((value) => {
+ username = value;
+ }),
+ localforage.getItem("password").then((value) => {
+ password = value;
+ }),
+ localforage.getItem("gradings").then((value) => {
+ gradings = value;
+ })
+ ];
+ await Promise.all(promises_to_run);
+ if (gradings == null || gradings == [] || gradings == -1 || force_refresh) {
+ try {
+ let gsecInstance = new gsec();
+ await gsecInstance.login(username, password);
+ gsecInstance.fetchGradings().then((value) => {
+ gradings = value;
+ localforage.setItem("gradings", value).then(() => {
+ displayData();
+ setLoading(false);
+ });
+ setLoading(false);
+ }).catch((err) => {
+ gsecErrorHandlerUI(err);
+ setLoading(false);
+ });
+ } catch (err) {
+ gsecErrorHandlerUI(err);
+ setLoading(false);
+ }
+ } else {
+ displayData();
+ setLoading(false);
+ }
}
function displayData() {
- let transformed_gradings = [];
- gradings.forEach((element, index) => {
- let bg_color = getHexColorFromString(element["acronym"]);
- let fg_color = getForegroundFromBackground(bg_color);
- let grading_object = {
- start: element["date"].toISOString().substring(0, 10), // če se da direktno date object, se doda še 1a zraven (prefixa tajtlu) (verjetno 1am ura)
- title: element["acronym"],
- id: index.toString(),
- backgroundColor: bg_color,
- textColor: fg_color
- };
- transformed_gradings.push(grading_object);
- });
- calendar_obj.removeAllEvents();
- calendar_obj.addEventSource(transformed_gradings);
+ let transformed_gradings = [];
+ gradings.forEach((element, index) => {
+ let bg_color = getHexColorFromString(element["acronym"]);
+ let fg_color = getForegroundFromBackground(bg_color);
+ let grading_object = {
+ start: element["date"].toISOString().substring(0, 10), // če se da direktno date object, se doda še 1a zraven (prefixa tajtlu) (verjetno 1am ura)
+ title: element["acronym"],
+ id: index.toString(),
+ backgroundColor: bg_color,
+ textColor: fg_color
+ };
+ transformed_gradings.push(grading_object);
+ });
+ calendar_obj.removeAllEvents();
+ calendar_obj.addEventSource(transformed_gradings);
}
async function validateInputs() {
- if ($("#input-grading-name").val() != null && $("#input-grading-name").val().length > 0) {
- $("#btn-add-grading").removeAttr("disabled");
- $("#input-grading-name").addClass("valid");
- $("#input-grading-name").removeClass("invalid");
- } else {
- $("#btn-add-grading").attr("disabled", "disabled");
- $("#input-grading-name").addClass("invalid");
- $("#input-grading-name").removeClass("valid");
- }
+ if ($("#input-grading-name").val() != null && $("#input-grading-name").val().length > 0) {
+ $("#btn-add-grading").removeAttr("disabled");
+ $("#input-grading-name").addClass("valid");
+ $("#input-grading-name").removeClass("invalid");
+ } else {
+ $("#btn-add-grading").attr("disabled", "disabled");
+ $("#input-grading-name").addClass("invalid");
+ $("#input-grading-name").removeClass("valid");
+ }
}
function gradingClickHandler(eventClickInfo) {
- let grading_id = parseInt(eventClickInfo.event.id);
- let grading_subject = gradings[grading_id]["subject"];
- let grading_date_obj = gradings[grading_id]["date"];
- let grading_date = dateString.longFormatted(grading_date_obj);
- let grading_description = gradings[grading_id]["description"];
- $("#grading-subject").text(grading_subject);
- $("#grading-date").text(grading_date);
- $("#grading-description").text(grading_description);
- const modal = document.querySelectorAll(".side-modal")[0];
- M.Sidenav.getInstance(modal).open();
+ let grading_id = parseInt(eventClickInfo.event.id);
+ let grading_subject = gradings[grading_id]["subject"];
+ let grading_date_obj = gradings[grading_id]["date"];
+ let grading_date = dateString.longFormatted(grading_date_obj);
+ let grading_description = gradings[grading_id]["description"];
+ $("#grading-subject").text(grading_subject);
+ $("#grading-date").text(grading_date);
+ $("#grading-description").text(grading_description);
+ const modal = document.querySelectorAll(".side-modal")[0];
+ M.Sidenav.getInstance(modal).open();
}
function setupPickers() {
- // Setup pickers, todo (adding an event), to be stored in messages
- var date_object = new Date();
- let elems = document.querySelectorAll('#datepicker-add');
- let options = {
- autoClose: true,
- format: "dd.mm.yyyy",
- defaultDate: date_object,
- setDefaultDate: true,
- firstDay: 1
- }
- instances = M.Datepicker.init(elems, options);
+ // Setup pickers, todo (adding an event), to be stored in messages
+ var date_object = new Date();
+ let elems = document.querySelectorAll('#datepicker-add');
+ let options = {
+ autoClose: true,
+ format: "dd.mm.yyyy",
+ defaultDate: date_object,
+ setDefaultDate: true,
+ firstDay: 1
+ }
+ instances = M.Datepicker.init(elems, options);
}
document.addEventListener("DOMContentLoaded", () => {
- checkLogin();
- // Calendar setup
- var calendarEl = document.getElementById("calendar");
- calendar_obj = new FullCalendar.Calendar(calendarEl, {
- firstDay: 1,
- plugins: ["dayGrid"],
- defaultDate: getDateString(),
- navLinks: false,
- editable: false,
- events: [],
- eventClick: gradingClickHandler,
- height: "parent"
- });
- calendar_obj.render();
-
- // Modal for adding gradings
-
- // setupPickers(); // todo (adding an event), to be stored in messages
- // // Setup modals
+ checkLogin();
+ // Calendar setup
+ var calendarEl = document.getElementById("calendar");
+ calendar_obj = new FullCalendar.Calendar(calendarEl, {
+ firstDay: 1,
+ plugins: ["dayGrid"],
+ defaultDate: getDateString(),
+ navLinks: false,
+ editable: false,
+ events: [],
+ eventClick: gradingClickHandler,
+ height: "parent"
+ });
+ calendar_obj.render();
+
+ // Modal for adding gradings
+
+ // setupPickers(); // todo (adding an event), to be stored in messages
+ // // Setup modals
// const modal_elems = document.querySelectorAll('.modal');
// const modal_options = {
// onOpenStart: () => { $("#fab-new").hide() },
@@ -202,15 +202,21 @@ document.addEventListener("DOMContentLoaded", () => {
// M.Modal.init(modal_elems, modal_options);
- loadGradings(true);
- // Setup refresh handler
- $("#refresh-icon").click(() => {
- loadGradings(true);
- });
- // Setup side menu
- const menus = document.querySelectorAll(".side-menu");
- M.Sidenav.init(menus, { edge: "right", draggable: true });
- // Setup side modal
- const modals = document.querySelectorAll('.side-modal');
- M.Sidenav.init(modals, { edge: 'left', draggable: false });
+ loadGradings(true);
+ // Setup refresh handler
+ $("#refresh-icon").click(() => {
+ loadGradings(true);
+ });
+ // Setup side menu
+ const menus = document.querySelectorAll(".side-menu");
+ M.Sidenav.init(menus, {
+ edge: "right",
+ draggable: true
+ });
+ // Setup side modal
+ const modals = document.querySelectorAll('.side-modal');
+ M.Sidenav.init(modals, {
+ edge: 'left',
+ draggable: false
+ });
});
diff --git a/assets/js/lang/bundle.js b/assets/js/lang/bundle.js
index 10cfd20..4e15832 100644
--- a/assets/js/lang/bundle.js
+++ b/assets/js/lang/bundle.js
@@ -241,7 +241,7 @@ var langstrings = {
usage: "usage",
mealsUsageNote: "click on a date to open the collapsible menu with choices and click on a specific meal to select it. Reload the meals when you're done and check the entries.",
lunchesNote: "app was not tested with lunches in mind. Meals probably won't work with lunches and having a lunch subscription may even break its functionality.",
- mealNotShownNote: "if a meal is not present in the meals collapsible field, this does not necessarily mean it does not exist. Meals that haven't been altered by you and are unchangable (read-only) are not shown for clarity.",
+ mealNotShownNote: "editable meals are highlighted in gold, read-only meals are highlighted in grey and cannot be changed. Meals that provide no options for menus are not shown for clarity, same applies for days where there are no meals",
mealsContributeNote: "you are welcome to contribute to the LopolisAPI project and add features, such as checkouts.",
authenticationError: "authentication error",
lopolisAPIConnectionError: "LopolisAPI server connection error",
@@ -252,6 +252,7 @@ var langstrings = {
errorSettingMeals: "error setting meals",
mealSet: "meal set! Reload meals to be sure",
selected: "selected",
+ meal: "meal",
// about
version: "version",
authors: "authors",
@@ -439,7 +440,7 @@ var langstrings = {
recipientNotInDirectory: "izbrane osebe ni v imeniku",
chatExternalInfo: "dobili ste kratko sporočilo v standardu, ki ga GimSIS ne podpira. Pri odgovarjanju spremenite zadevo. Vsebina sporočila: ",
// meals
- loginError: "napaka pri prijavi",
+ loginError: "napaka pri prijavi",
loginToLopolis: "prijava v Lopolis",
loginToLopolisNote: "izgleda, da niste prijavljeni v eRestavracijo, zato se vam je prikazal prijavni obrazec. Za uporavljanje s prehrano se uporablja druga kombinacija uporabniškega imena in gesla, zato se prijavite s svojimi Lopolis prijavnimi podatki za nadaljevanje.",
logInToLopolis: "prijava v Lopolis",
@@ -448,7 +449,7 @@ var langstrings = {
usage: "uporaba",
mealsUsageNote: "kliknite na datum za prikaz menijev, nato pa si enega izberite s klikom na ime menija. Po nastavitvi menijev ponovno naložite menije in se prepričajte o pravilnih nastavitvah.",
lunchesNote: "aplikacija ni testirana za naročanje na kosila, zato verjetno to ne deluje. Če ste naročeni na kosila lahko naročanje na menije sploh ne deluje ali pa deluje narobe.",
- mealNotShownNote: "če nek dan manjka med meniji, to verjetno pomeni, da ni več spremenljiv in zanj niste ročno spremenili menija",
+ mealNotShownNote: "obroki, označeni z zlato so nastavljivi, tisti, označeni s sivo, niso, če pa pri kakšnem dnevu obroka ni, pa pomeni, da ga ni moč nastaviti ali pa da ne obrok ne obstaja",
mealsContributeNote: "vabimo vas k urejanju LopolisAPI programa za upravljanje z meniji.",
authenticationError: "napaka avtentikacije",
lopolisAPIConnectionError: "napaka povezave na LopolisAPI strežnik",
@@ -459,6 +460,7 @@ var langstrings = {
errorSettingMeals: "napaka pri nastavljanju menijev",
mealSet: "obrok nastavljen! osvežite obroke in se prepričajte sami",
selected: "izbrano",
+ meal: "obrok",
// about
version: "različica",
authors: "avtorji",
diff --git a/assets/js/meals.js b/assets/js/meals.js
index 891feae..15accdb 100644
--- a/assets/js/meals.js
+++ b/assets/js/meals.js
@@ -1,394 +1,412 @@
const API_ENDPOINT = "https://lopolis-api.gimb.tk/";
+var meals_calendar_obj = null;
+var meals_data_global = {};
+
+function getDateString() { // ne mene gledat, ne vem, kaj je to.
+ let date = new Date();
+
+ let year_str = date.getFullYear();
+ let month_str = date.getMonth() + 1
+ month_str = month_str.toString().padStart(2, "0");
+ let day_str = date.getDate();
+ day_str = day_str.toString().padStart(2, "0");
+
+ let date_string = year_str + "-" + month_str + "-" + day_str;
+ return date_string;
+}
+
async function checkLogin() {
- localforage.getItem("logged_in_lopolis").then((value) => {
- if (value != true) {
- $("#meals-container").hide();
- $("#meals-login-container").show();
- } else {
- $("#meals-container").show();
- $("#meals-login-container").hide();
- loadMeals();
- }
- }).catch((err) => {
- console.log(err);
- });
+ localforage.getItem("logged_in_lopolis").then((value) => {
+ if (value != true) {
+ $("#meals-container").hide();
+ $("#meals-login-container").show();
+ } else {
+ $("#meals-container").show();
+ $("#meals-login-container").hide();
+ loadMeals();
+ }
+ }).catch((err) => {
+ console.log(err);
+ });
}
function setLoading(state) {
- if (state) {
- $("#loading-bar").removeClass("hidden");
- } else {
- $("#loading-bar").addClass("hidden");
- }
+ if (state) {
+ $("#loading-bar").removeClass("hidden");
+ } else {
+ $("#loading-bar").addClass("hidden");
+ }
}
async function getToken(callback, callbackparams = []) {
- setLoading(true);
- let promises_to_run = [
- localforage.getItem("lopolis_username").then((value) => {
- username = value;
- }),
- localforage.getItem("lopolis_password").then((value) => {
- password = value;
- })
- ];
- await Promise.all(promises_to_run);
-
- $.ajax({
- url: API_ENDPOINT + "gettoken",
- crossDomain: true,
- contentType: "application/json",
- data: JSON.stringify({
- "username": username,
- "password": password
- }),
-
- dataType: "json",
- cache: false,
- type: "POST",
-
- success: (dataauth) => {
- if(dataauth == null || dataauth.error == true) {
- UIAlert(D("authenticationError"), "getToken(): response error or null");
- localforage.setItem("logged_in_lopolis", false).then( function(){
- checkLogin();
- });
- } else if (dataauth.error == false) {
- let empty = {};
- empty.token = dataauth.data;
- let argumentsToCallback = [empty].concat(callbackparams);
- callback(...argumentsToCallback); // poslje token v {token: xxx}
- } else {
- UIAlert( D("authenticationError"), "getToken(): invalid response, no condition met");
- }
- setLoading(false);
- },
- error: () => {
- UIAlert( D("lopolisAPIConnectionError"), "getToken(): AJAX error");
- setLoading(false);
- }
- });
+ setLoading(true);
+ let promises_to_run = [
+ localforage.getItem("lopolis_username").then((value) => {
+ username = value;
+ }),
+ localforage.getItem("lopolis_password").then((value) => {
+ password = value;
+ })
+ ];
+ await Promise.all(promises_to_run);
+
+ $.ajax({
+ url: API_ENDPOINT + "gettoken",
+ crossDomain: true,
+ contentType: "application/json",
+ data: JSON.stringify({
+ "username": username,
+ "password": password
+ }),
+
+ dataType: "json",
+ cache: false,
+ type: "POST",
+
+ success: (dataauth) => {
+ if (dataauth == null || dataauth.error == true) {
+ UIAlert(D("authenticationError"), "getToken(): response error or null");
+ localforage.setItem("logged_in_lopolis", false).then(function() {
+ checkLogin();
+ });
+ } else if (dataauth.error == false) {
+ let empty = {};
+ empty.token = dataauth.data;
+ let argumentsToCallback = [empty].concat(callbackparams);
+ callback(...argumentsToCallback); // poslje token v {token: xxx}
+ } else {
+ UIAlert(D("authenticationError"), "getToken(): invalid response, no condition met");
+ }
+ setLoading(false);
+ },
+ error: () => {
+ UIAlert(D("lopolisAPIConnectionError"), "getToken(): AJAX error");
+ setLoading(false);
+ }
+ });
}
async function getMenus(dataauth, callback, callbackparams = []) {
- setLoading(true);
- let current_date = new Date();
- // naloži za dva meseca vnaprej (če so zadnji dnevi v mesecu)
- let mealsgathered = {};
- let promises_to_wait_for = [];
- for (let iteration = 1; iteration <= 2; iteration++) {
-
- promises_to_wait_for[iteration] = $.ajax({
- url: API_ENDPOINT+"getmenus",
- crossDomain: true,
- contentType: "application/json",
- data: JSON.stringify({
- "month": current_date.getMonth() + iteration,
- "year": current_date.getFullYear()
- }),
-
- headers: {
- "Authorization": `Bearer ${dataauth.token}`
- },
-
- dataType: "json",
- cache: false,
- type: "POST",
-
- success: (meals) => {
- if(meals == null || meals.error == true) {
- UIAlert( D("errorGettingMenus"), "getMenus(): response error or null");
- setLoading(false);
- localforage.setItem("logged_in_lopolis", false).then( () => {
- checkLogin();
- });
- } else if (meals.error == false) {
- setLoading(false);
- mealsgathered[iteration] = meals;
- } else {
- setLoading(false);
- UIAlert( D("errorUnexpectedResponse") , "getMenus(): invalid response, no condition met");
- }
- },
-
- error: () => {
- setLoading(false);
- UIAlert( D("lopolisAPIConnectionError"), "getMenus(): AJAX error");
- }
- });
- }
-
- await Promise.all(promises_to_wait_for); // javascript is ducking amazing
-
- let allmeals = {};
- let passtocallback = {};
-
- for (const [index, monthmeals] of Object.entries(mealsgathered)) { // although this is not very javascripty
- allmeals = mergeDeep(allmeals, monthmeals.data);
- }
-
- passtocallback.data = allmeals;
- passtocallback.token = dataauth.token;
- let toBePassed = [passtocallback].concat(callbackparams);
- callback(...toBePassed);
+ setLoading(true);
+ let current_date = new Date();
+ // naloži za dva meseca vnaprej (če so zadnji dnevi v mesecu)
+ let mealsgathered = {};
+ let promises_to_wait_for = [];
+ for (let iteration = 1; iteration <= 2; iteration++) {
+
+ promises_to_wait_for[iteration] = $.ajax({
+ url: API_ENDPOINT + "getmenus",
+ crossDomain: true,
+ contentType: "application/json",
+ data: JSON.stringify({
+ "month": current_date.getMonth() + iteration,
+ "year": current_date.getFullYear()
+ }),
+
+ headers: {
+ "Authorization": `Bearer ${dataauth.token}`
+ },
+
+ dataType: "json",
+ cache: false,
+ type: "POST",
+
+ success: (meals) => {
+ if (meals == null || meals.error == true) {
+ UIAlert(D("errorGettingMenus"), "getMenus(): response error or null");
+ setLoading(false);
+ localforage.setItem("logged_in_lopolis", false).then(() => {
+ checkLogin();
+ });
+ } else if (meals.error == false) {
+ setLoading(false);
+ mealsgathered[iteration] = meals;
+ } else {
+ setLoading(false);
+ UIAlert(D("errorUnexpectedResponse"), "getMenus(): invalid response, no condition met");
+ }
+ },
+
+ error: () => {
+ setLoading(false);
+ UIAlert(D("lopolisAPIConnectionError"), "getMenus(): AJAX error");
+ }
+ });
+ }
+
+ await Promise.all(promises_to_wait_for); // javascript is ducking amazing
+
+ let allmeals = {};
+ let passtocallback = {};
+
+ for (const [index, monthmeals] of Object.entries(mealsgathered)) { // although this is not very javascripty
+ allmeals = mergeDeep(allmeals, monthmeals.data);
+ }
+
+ passtocallback.data = allmeals;
+ passtocallback.token = dataauth.token;
+ let toBePassed = [passtocallback].concat(callbackparams);
+ callback(...toBePassed);
}
async function loadMeals() {
- getToken(getMenus, [displayMeals, []]);
+ getToken(getMenus, [displayMeals, []]);
}
function displayMeals(meals) {
- // console.log(JSON.stringify(meals)); // debug // dela!
-
- let root_element = document.getElementById("meals-collapsible");
- for (const [date, mealzz] of Object.entries(meals.data)) {
- let unabletochoosequestionmark = "";
- let readonly = mealzz.readonly;
- var datum = new Date(date);
-
- // Create root element for a date entry
- let subject_entry = document.createElement("li");
-
- // Create subject collapsible header
- let subject_header = document.createElement("div");
- subject_header.classList.add("collapsible-header");
- subject_header.classList.add("collapsible-header-root");
-
- // Create header text element
- let subject_header_text = document.createElement("span");
-
- if(mealzz.readonly) {
- unabletochoosequestionmark = `*${S("readOnly")}*`;
- }
-
- // Use ES6 templates
- subject_header_text = `${dateString.day(datum.getDay())}, ${datum.getDate()}. ${dateString.month(datum.getMonth())} ${datum.getFullYear()} (${mealzz.meal} @ ${mealzz.location}) ${unabletochoosequestionmark}`;
-
- // Create collection for displaying individuals meals
- let subject_body = document.createElement("div");
- subject_body.className = "collapsible-body";
- let subject_body_root = document.createElement("ul");
- subject_body_root.className = "collection";
-
- for(const [dindex, dmil] of Object.entries(mealzz.menu_options)) {
- // Create element for individual meal
- let meal_node = document.createElement("li");
- meal_node.className = "collection-item";
- meal_node.classList.add("collection-item")
- meal_node.classList.add("meal-node");
- meal_node.dataset["index"] = dindex;
-
- if (!readonly) {
- meal_node.onclick = () => {
- setMenu(date, dmil.value);
- }
- }
-
- let meal_node_div = document.createElement("div");
- // Node for left text
- let meal_lefttext = document.createElement("span");
- // Node for the right text
- let meal_righttext = document.createElement("div");
- meal_righttext.className = "secondary-content";
- // Apply different style, if the meal is selected
- if (dmil.selected) {
- // Text
- meal_lefttext.innerHTML = `<i>${dmil.text}</i>`;
- // Number
- meal_righttext.innerText = S("selected");
- } else {
- // Text
- meal_lefttext.innerText = dmil.text;
- // Number
- meal_righttext.innerText = "";
- }
- meal_node_div.appendChild(meal_lefttext);
- meal_node_div.appendChild(meal_righttext);
- meal_node.appendChild(meal_node_div);
- subject_body_root.appendChild(meal_node);
- }
- var subject_header_text_span = document.createElement("span");
- subject_header_text_span.innerText = subject_header_text;
- subject_header.appendChild(subject_header_text_span);
- subject_body.append(subject_body_root);
- subject_entry.append(subject_header);
- subject_entry.append(subject_body);
- root_element.append(subject_entry);
- }
- $("#meals-collapsible").append(root_element);
- // refreshClickHandlers();
+ // console.log(JSON.stringify(meals)); // debug // dela!
+ meals_data_global = meals.data;
+ let transformed_meals = [];
+ for (const [date, mealzz] of Object.entries(meals.data)) {
+ let bg_color = "#877F02"; let fg_color = "#FFFFFF";
+ if (mealzz.readonly) bg_color = "#8d9288";
+ let meal_date = new Date(date+"+00:00"); // idk u figure it out. timezones
+ let meal_object = {
+ start: meal_date.toISOString().substring(0,10), // zakaj? poglej gradings.js - NUJNO! poglej, če so timezoni v redu! da slučajno ne preskakuje na naslednji dan!
+ title: S("meal"),
+ id: date,
+ allDay: true,
+ backgroundColor: bg_color,
+ textColor: fg_color
+ }
+ transformed_meals.push(meal_object);
+ }
+ meals_calendar_obj.removeAllEvents();
+ meals_calendar_obj.addEventSource(transformed_meals);
+ return;
}
function clearMeals() {
- const table = document.getElementById("meals-collapsible");
- while (table.firstChild) {
- table.removeChild(table.firstChild);
- }
+ meals_calendar_obj.removeAllEvents();
}
function refreshMeals() {
- clearMeals();
- loadMeals();
+ clearMeals();
+ loadMeals();
}
function lopolisLogout() {
- localforage.setItem("logged_in_lopolis", false);
- $("#meals-collapsible").html("");
- checkLogin();
+ localforage.setItem("logged_in_lopolis", false);
+ $("#meals-collapsible").html("");
+ checkLogin();
}
async function lopolisLogin() {
- setLoading(true);
- var usernameEl = $("#meals-username");
- var passwordEl = $("#meals-password");
- $.ajax({
- url: API_ENDPOINT+"gettoken",
- crossDomain: true,
- contentType: "application/json",
- data: JSON.stringify({
- "username": usernameEl.val(),
- "password": passwordEl.val()
- }),
-
- dataType: "json",
- cache: false,
- type: "POST",
-
- success: async function(data) {
- if(data == null) {
- UIAlert( S("requestForAuthenticationFailed"), "lopolisLogin(): date is is null");
- setLoading(false);
- usernameEl.val("");
- passwordEl.val("");
- } else if(data.error == true) {
- UIAlert( S("loginFailed"), "lopolisLogin(): login failed. data.error is true");
- usernameEl.val("");
- passwordEl.val("");
- setLoading(false);
- } else {
- let promises_to_run = [
- localforage.setItem("logged_in_lopolis", true),
- localforage.setItem("lopolis_username", usernameEl.val()),
- localforage.setItem("lopolis_password", passwordEl.val())
- ];
- await Promise.all(promises_to_run);
- checkLogin();
- UIAlert("Credential match!");
- }
- },
-
- error: () => {
- UIAlert( D("loginError"), "lopolisLogin(): ajax.error");
- setLoading(false);
- }
- });
+ setLoading(true);
+ var usernameEl = $("#meals-username");
+ var passwordEl = $("#meals-password");
+ $.ajax({
+ url: API_ENDPOINT + "gettoken",
+ crossDomain: true,
+ contentType: "application/json",
+ data: JSON.stringify({
+ "username": usernameEl.val(),
+ "password": passwordEl.val()
+ }),
+
+ dataType: "json",
+ cache: false,
+ type: "POST",
+
+ success: async function(data) {
+ if (data == null) {
+ UIAlert(S("requestForAuthenticationFailed"), "lopolisLogin(): date is is null");
+ setLoading(false);
+ usernameEl.val("");
+ passwordEl.val("");
+ } else if (data.error == true) {
+ UIAlert(S("loginFailed"), "lopolisLogin(): login failed. data.error is true");
+ usernameEl.val("");
+ passwordEl.val("");
+ setLoading(false);
+ } else {
+ let promises_to_run = [
+ localforage.setItem("logged_in_lopolis", true),
+ localforage.setItem("lopolis_username", usernameEl.val()),
+ localforage.setItem("lopolis_password", passwordEl.val())
+ ];
+ await Promise.all(promises_to_run);
+ checkLogin();
+ UIAlert("Credential match!");
+ }
+ },
+
+ error: () => {
+ UIAlert(D("loginError"), "lopolisLogin(): ajax.error");
+ setLoading(false);
+ }
+ });
}
async function setMenus(currentmeals = 69, toBeSentChoices) { // currentmeals je getMenus response in vsebuje tudi token.
- if (currentmeals === 69) {
- getToken(getMenus, [setMenus, toBeSentChoices]);
- return;
- }
-
- for(const [mealzzdate, mealzz] of Object.entries(currentmeals.data)) {
- if (mealzzdate in toBeSentChoices === false) {
- for (const [mealid, mealdata] of Object.entries(mealzz.menu_options)) {
- console.log(mealdata);
- if(mealdata.selected == true || mealzz.readonly == true) {
- toBeSentChoices[mealzzdate] = mealdata.value;
- break;
- }
- }
- }
- }
-
- setLoading(true);
-
- $.ajax({
- url: API_ENDPOINT + "setmenus",
- crossDomain: true,
- contentType: "application/json",
- data: JSON.stringify( { "choices": toBeSentChoices } ),
- headers: {
- "Authorization": "Bearer " + currentmeals.token
- },
- dataType: "json",
- cache: false,
- type: "POST",
-
- success: (response) => {
- if(response === null || response.error == true) {
- UIAlert( D("errorSettingMeals"), "setMenus(): response error or null");
- } else if (response.error == false) {
- UIAlert( D("mealSet"), "setMenus(): meni nastavljen");
- } else {
- UIAlert( D("errorUnexpectedResponse"), "setMenus(): invalid response, no condition met");
- }
- setLoading(false);
- },
-
- error: () => {
- setLoading(false);
- UIAlert( D("lopolisAPIConnectionError"), "setMenus(): AJAX error");
- }
- });
+ if (currentmeals === 69) {
+ getToken(getMenus, [setMenus, toBeSentChoices]);
+ return;
+ }
+
+ for (const [mealzzdate, mealzz] of Object.entries(currentmeals.data)) {
+ if (mealzzdate in toBeSentChoices === false) {
+ for (const [mealid, mealdata] of Object.entries(mealzz.menu_options)) {
+ // console.log(mealdata);
+ if (mealdata.selected == true || mealzz.readonly == true) {
+ toBeSentChoices[mealzzdate] = mealdata.value;
+ break;
+ }
+ }
+ }
+ }
+
+ setLoading(true);
+
+ $.ajax({
+ url: API_ENDPOINT + "setmenus",
+ crossDomain: true,
+ contentType: "application/json",
+ data: JSON.stringify({
+ "choices": toBeSentChoices
+ }),
+ headers: {
+ "Authorization": "Bearer " + currentmeals.token
+ },
+ dataType: "json",
+ cache: false,
+ type: "POST",
+
+ success: (response) => {
+ if (response === null || response.error == true) {
+ UIAlert(D("errorSettingMeals"), "setMenus(): response error or null");
+ } else if (response.error == false) {
+ UIAlert(D("mealSet"), "setMenus(): meni nastavljen");
+ } else {
+ UIAlert(D("errorUnexpectedResponse"), "setMenus(): invalid response, no condition met");
+ }
+ setLoading(false);
+ },
+
+ error: () => {
+ setLoading(false);
+ UIAlert(D("lopolisAPIConnectionError"), "setMenus(): AJAX error");
+ }
+ });
}
async function setMenu(date, menu) {
- let choice = {};
- choice[date] = menu;
- getToken(getMenus, [setMenus, choice]);
+ let choice = {};
+ choice[date] = menu;
+ getToken(getMenus, [setMenus, choice]);
}
function setupEventListeners() {
- $("#meals-login").click(() => {
- lopolisLogin();
- });
+ $("#meals-login").click(() => {
+ lopolisLogin();
+ });
+
+ $("#meals-logout").click(() => {
+ lopolisLogout();
+ });
+}
- $("#meals-logout").click(() => {
- lopolisLogout();
- });
+var mealClickHandler = (eventClickInfo) => {
+ // console.log("meal clicked!"); // debug
+ let meal_date = eventClickInfo.event.id;
+ let meal_object = meals_data_global[meal_date];
+ $("#meal-type").text(meal_object.meal);
+ let meal_date_obj = new Date(meal_date);
+ $("#meal-date").text(dateString.longFormatted(meal_date_obj));
+ if(!(meal_object.readonly)) { // če je beljiv
+ document.getElementById("meal-readonly").style.display="none";
+ } else {
+ document.getElementById("meal-readonly").style.display="block";
+ }
+ document.getElementById("meal-options").innerHTML = "";
+ for(const [option_index, option_object] of Object.entries(meal_object.menu_options)) {
+ let menu_option_li_el = document.createElement("li");
+ let menu_option_a_el = document.createElement("button");
+ menu_option_a_el.innerText = option_object.text;
+ // console.log(JSON.stringify(meal_object)); // debug
+ let classlist = "";
+ if (option_object.selected != null) {
+ if(option_object.selected) {
+ // console.log("selected"); // debug
+ //
+ classlist = "color: green; font-weight: bold";
+ }
+ }
+ menu_option_a_el.classList = "waves-effect waves-light btn-large";
+ menu_option_a_el.style = "color: var(--color-text); background-color: rgba(0,0,0,0); line-height: 1.2; height:auto; "+classlist+" !important";
+ menu_option_a_el.id = "menu_index_"+option_index;
+ if(!(meal_object.readonly)) {
+ menu_option_a_el.onclick = () => {
+ setMenu(meal_date, option_object.value);
+ menu_option_a_el.className = "to-be-selected-meal";
+ let sidenav_element = document.getElementById("meal-info");
+ let sidenav_instance = M.Sidenav.getInstance(sidenav_element);
+ sidenav_instance.close();
+ };
+ }
+ menu_option_li_el.appendChild(menu_option_a_el);
+ document.getElementById("meal-options").appendChild(menu_option_li_el);
+ }
+ let sidenav_element = document.getElementById("meal-info");
+ let sidenav_instance = M.Sidenav.getInstance(sidenav_element);
+ sidenav_instance.open();
}
// Initialization code
document.addEventListener("DOMContentLoaded", async () => {
- checkLogin();
-
- setupEventListeners();
-
- let coll_elem = document.querySelectorAll('.collapsible');
- M.Collapsible.init(coll_elem, {});
-
- // Setup refresh handler
- $("#refresh-icon").click(function () {
- refreshMeals();
- });
-
- let elems = document.querySelectorAll('.modal');
- M.Modal.init(elems, {});
- // Setup side menu
- const menus = document.querySelectorAll('.side-menu');
- M.Sidenav.init(menus, { edge: 'right', draggable: true });
-
- // Setup side modal
- const modals = document.querySelectorAll('.side-modal');
- M.Sidenav.init(modals, { edge: 'left', draggable: false });
-
- var elemsx = document.querySelectorAll('select');
- M.FormSelect.init(elemsx);
-
- var datepickerelems = document.querySelectorAll('.datepicker');
- var today = new Date();
- M.Datepicker.init(datepickerelems, {
- firstDay: 1,
- minDate: today,
- showDaysInNextAndPreviousMonths: true,
- showClearBtn: true,
- format: "dddd, dd. mmmm yyyy"
- });
-
- refreshMeals();
+ checkLogin();
+
+ var calendarEl = document.getElementById("meals-calendar");
+ meals_calendar_obj = new FullCalendar.Calendar(calendarEl, {
+ firstDay: 1,
+ plugins: ["dayGrid"],
+ defaultDate: getDateString(),
+ navLinks: false,
+ editable: false,
+ events: [],
+ eventClick: mealClickHandler,
+ height: "parent"
+ });
+ meals_calendar_obj.render();
+
+
+ setupEventListeners();
+
+ // Setup refresh handler
+ $("#refresh-icon").click(function() {
+ refreshMeals();
+ });
+
+ // Setup side menu
+ const menus = document.querySelectorAll('.side-menu');
+ M.Sidenav.init(menus, {
+ edge: 'right',
+ draggable: true
+ });
+
+ // Setup side modal
+ const modals = document.querySelectorAll('.side-modal');
+ M.Sidenav.init(modals, {
+ edge: 'left',
+ draggable: false
+ });
+ document.getElementsByClassName("fc-today-button")[0].style = "display:none !important"; // počasi bomo rabili nestane important stavke
+ // ne vem, kaj je to spodaj ˇˇˇ
+ var elemsx = document.querySelectorAll('select');
+ M.FormSelect.init(elemsx);
+
+ var datepickerelems = document.querySelectorAll('.datepicker');
+ var today = new Date();
+ M.Datepicker.init(datepickerelems, {
+ firstDay: 1,
+ minDate: today,
+ showDaysInNextAndPreviousMonths: true,
+ showClearBtn: true,
+ format: "dddd, dd. mmmm yyyy"
+ });
+
+ refreshMeals();
});
diff --git a/assets/pages-src/changelog.bvr b/assets/pages-src/changelog.bvr
index 870b446..56b883c 100644
--- a/assets/pages-src/changelog.bvr
+++ b/assets/pages-src/changelog.bvr
@@ -1,148 +1,159 @@
<@?i global@>
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <meta name="google" content="notranslate">
- <title>Changelog &laquo; BežiApp</title>
-
- <!-- Materialize -->
- <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
- <link href="/css/materialicons.css" rel="stylesheet">
- <link href="/css/fontawesome.min.css" rel="stylesheet">
- <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
-
- <script src="/js/lib/jquery.min.js"></script>
- <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
-
- <link type="text/css" href="/css/styles.css" rel="stylesheet">
- <script type="text/javascript" src="/js/changelog.js"></script>
-
- <link rel="manifest" href="/manifest.json">
- <script src="/js/app.js"></script>
- <script src="/js/lib/themes.js"></script>
- <script src="/js/lang/bundle.js"></script>
- <link rel="shortcut icon" type="image/png" href="/favicon.png" />
-
- <!-- iOS support -->
- <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
- <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
- <meta name="apple-mobile-web-app-status-bar" content="#004d32">
-</head>
-
-<body>
- <nav class="z-depth-0" id="navigation-main">
- <div class="nav-wrapper container">
- <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>changelog</x-su>
- <span class="right white-text" id="nav-back-button">
- <i class="material-icons">arrow_back</i>
- </span>
- </div>
- <div id="loading-bar" class="progress hidden">
- <div class="indeterminate"></div>
- </div>
- </nav>
-
- <div class="container">
- <div class="row">
- <h3 class="general-text"><x-su>changelog</x-su></h3>
- <ul class="collapsible">
- <li>
- <div class="collapsible-header">Version 1.0.14-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added themes (dark, light, night, defaulting to light)</li>
- <li class="collection-item">"Additional options" (before anyone gets triggered, their order <i>is</i> random)</li>
- <li class="collection-item">New messaging look</li>
- <li class="collection-item">Messaging has been overhauled, now better then ever. Powered by GimSIS™</li>
- <li class="collection-item">Added videoconferencing (via video.gimb)</li>
- <li class="collection-item">More network requests go directly to GimSISExt (with gsec.js)</li>
- <li class="collection-item">Many bug fixes</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.13-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Various bug fixes</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.12-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Now update does not clear whole database => you stay logged in</li>
- <li class="collection-item">Added multilanguage support</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.11-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added end-to-end encrypton support to messaging</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.10-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added meals</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.9-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added image sending support to messaging</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.8-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added messaging</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.7-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Enter key now triggers login in the login form</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.6-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Fixed a typo (related to #5)</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.5-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Fixed default view on startup</li>
- <li class="collection-item">Changed promise handling in gradings (#5)</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.4-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Introduced the changelog</li>
- <li class="collection-item">Fixed date picker color</li>
- <li class="collection-item">Changed weekly timetable accent color</li>
- <li class="collection-item">Option for including/excluding temporary grades in average
- calculation (credit: Tinkara)</li>
- </ul>
- </div>
- </li>
- </ul>
- </div>
- </div>
-
-</body>
-
-</html>
+ <!DOCTYPE html>
+ <html>
+
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <meta name="google" content="notranslate">
+ <title>Changelog &laquo; BežiApp</title>
+
+ <!-- Materialize -->
+ <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
+ <link href="/css/materialicons.css" rel="stylesheet">
+ <link href="/css/fontawesome.min.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
+
+ <script src="/js/lib/jquery.min.js"></script>
+ <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
+
+ <link type="text/css" href="/css/styles.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/changelog.js"></script>
+
+ <link rel="manifest" href="/manifest.json">
+ <script src="/js/app.js"></script>
+ <script src="/js/lib/themes.js"></script>
+ <script src="/js/lang/bundle.js"></script>
+ <link rel="shortcut icon" type="image/png" href="/favicon.png" />
+
+ <!-- iOS support -->
+ <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
+ <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
+ <meta name="apple-mobile-web-app-status-bar" content="#004d32">
+ </head>
+
+ <body>
+ <nav class="z-depth-0" id="navigation-main">
+ <div class="nav-wrapper container">
+ <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>changelog</x-su>
+ <span class="right white-text" id="nav-back-button">
+ <i class="material-icons">arrow_back</i>
+ </span>
+ </div>
+ <div id="loading-bar" class="progress hidden">
+ <div class="indeterminate"></div>
+ </div>
+ </nav>
+
+ <div class="container">
+ <div class="row">
+ <h3 class="general-text">
+ <x-su>changelog</x-su>
+ </h3>
+ <ul class="collapsible">
+ <li>
+ <div class="collapsible-header">Version 1.0.15-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Changed meals layout</li>
+ </ul>
+ </div>
+
+
+ <div class="collapsible-header">Version 1.0.14-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added themes (dark, light, night, defaulting to light)</li>
+ <li class="collection-item">"Additional options" (before anyone gets triggered, their order <i>is</i> random)</li>
+ <li class="collection-item">New messaging look</li>
+ <li class="collection-item">Messaging has been overhauled, now better then ever. Powered by GimSIS™</li>
+ <li class="collection-item">Added videoconferencing (via video.gimb)</li>
+ <li class="collection-item">More network requests go directly to GimSISExt (with gsec.js)</li>
+ <li class="collection-item">Many bug fixes</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.13-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Various bug fixes</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.12-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Now update does not clear whole database => you stay logged in</li>
+ <li class="collection-item">Added multilanguage support</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.11-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added end-to-end encrypton support to messaging</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.10-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added meals</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.9-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added image sending support to messaging</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.8-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added messaging</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.7-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Enter key now triggers login in the login form</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.6-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Fixed a typo (related to #5)</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.5-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Fixed default view on startup</li>
+ <li class="collection-item">Changed promise handling in gradings (#5)</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.4-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Introduced the changelog</li>
+ <li class="collection-item">Fixed date picker color</li>
+ <li class="collection-item">Changed weekly timetable accent color</li>
+ <li class="collection-item">Option for including/excluding temporary grades in average
+ calculation (credit: Tinkara)</li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+
+ </body>
+
+ </html>
diff --git a/assets/pages-src/gradings.bvr b/assets/pages-src/gradings.bvr
index 20a2d39..9a18dae 100644
--- a/assets/pages-src/gradings.bvr
+++ b/assets/pages-src/gradings.bvr
@@ -1,89 +1,90 @@
<@?i global@>
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <meta name="google" content="notranslate">
- <title>Gradings &laquo; BežiApp</title>
+ <!DOCTYPE html>
+ <html>
- <!-- Materialize -->
- <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
- <link href="/css/materialicons.css" rel="stylesheet">
- <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <meta name="google" content="notranslate">
+ <title>Gradings &laquo; BežiApp</title>
- <script src="/js/lib/jquery.min.js"></script>
- <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
+ <!-- Materialize -->
+ <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
+ <link href="/css/materialicons.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
- <!-- FullCalendar -->
- <link href="/css/fullcalendar/core/main.min.css" rel="stylesheet" />
- <link href="/css/fullcalendar/daygrid/main.min.css" rel="stylesheet" />
- <link href="/css/fullcalendar/custom.css" rel="stylesheet" />
- <script src="/js/lib/fullcalendar/core/main.min.js"></script>
- <script src="/js/lib/fullcalendar/daygrid/main.min.js"></script>
+ <script src="/js/lib/jquery.min.js"></script>
+ <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
- <link type="text/css" href="/css/styles.css" rel="stylesheet">
- <script type="text/javascript" src="/js/gsec.js"></script> <!-- gimsisextclient -->
- <script type="text/javascript" src="/js/gradings.js"></script>
+ <!-- FullCalendar -->
+ <link href="/css/fullcalendar/core/main.min.css" rel="stylesheet" />
+ <link href="/css/fullcalendar/daygrid/main.min.css" rel="stylesheet" />
+ <link href="/css/fullcalendar/custom.css" rel="stylesheet" />
+ <script src="/js/lib/fullcalendar/core/main.min.js"></script>
+ <script src="/js/lib/fullcalendar/daygrid/main.min.js"></script>
- <link rel="manifest" href="/manifest.json">
- <script src="/js/app.js"></script>
- <script src="/js/lib/themes.js"></script>
- <script src="/js/lang/bundle.js"></script>
- <link rel="shortcut icon" type="image/png" href="/favicon.png" />
+ <link type="text/css" href="/css/styles.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/gsec.js"></script> <!-- gimsisextclient -->
+ <script type="text/javascript" src="/js/gradings.js"></script>
- <!-- iOS support -->
- <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
- <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
- <meta name="apple-mobile-web-app-status-bar" content="#004d32">
-</head>
+ <link rel="manifest" href="/manifest.json">
+ <script src="/js/app.js"></script>
+ <script src="/js/lib/themes.js"></script>
+ <script src="/js/lang/bundle.js"></script>
+ <link rel="shortcut icon" type="image/png" href="/favicon.png" />
-<body>
- <nav class="z-depth-0" id="navigation-main">
- <div class="nav-wrapper container">
- <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>gradings</x-su>
- <span class="right white-text">
- <i class="material-icons sidenav-trigger" data-target="side-menu">menu</i>
- </span>
- <span class="right white-text" id="refresh-icon">
- <a href="#"><i class="material-icons">refresh</i></a>
- </span>
- </div>
- <div id="loading-bar" class="progress hidden">
- <div class="indeterminate"></div>
- </div>
- </nav>
+ <!-- iOS support -->
+ <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
+ <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
+ <meta name="apple-mobile-web-app-status-bar" content="#004d32">
+ </head>
+
+ <body>
+ <nav class="z-depth-0" id="navigation-main">
+ <div class="nav-wrapper container">
+ <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>gradings</x-su>
+ <span class="right white-text">
+ <i class="material-icons sidenav-trigger" data-target="side-menu">menu</i>
+ </span>
+ <span class="right white-text" id="refresh-icon">
+ <a href="#"><i class="material-icons">refresh</i></a>
+ </span>
+ </div>
+ <div id="loading-bar" class="progress hidden">
+ <div class="indeterminate"></div>
+ </div>
+ </nav>
<@?i navigation@>
- <ul id="grading-info" class="sidenav side-modal">
- <br>
- <li><a class="header">
- <h5 id="grading-subject"></h5>
- </a></li>
- <li>
- <a class="subheader">
- <h6 id="grading-date"></h6>
- </a>
- </li>
- <div class="divider"></div>
- </li>
- <li><a class="waves-effect" id="grading-description"></a></li>
- </ul>
+ <ul id="grading-info" class="sidenav side-modal">
+ <br>
+ <li><a class="header">
+ <h5 id="grading-subject"></h5>
+ </a></li>
+ <li>
+ <a class="subheader">
+ <h6 id="grading-date"></h6>
+ </a>
+ </li>
+ <div class="divider"></div>
+ </li>
+ <li><a class="waves-effect" id="grading-description"></a></li>
+ </ul>
- <div class="container">
- <br>
- <div id="calendar"></div>
- </div>
+ <div class="container">
+ <br>
+ <div id="calendar"></div>
+ </div>
- <!-- FAB -->
- <!-- <div class="fixed-action-btn" id="fab-new">
+ <!-- FAB -->
+ <!-- <div class="fixed-action-btn" id="fab-new">
<a class="btn-floating btn-large fab-new-message modal-trigger" href="#beziapp-add-grading">
<i class="large material-icons">add</i>
</a>
</div> -->
- <@?i grading-add-modal@>
+ <@?i grading-add-modal@>
-</body>
+ </body>
-</html>
+ </html> \ No newline at end of file
diff --git a/assets/pages-src/meals.bvr b/assets/pages-src/meals.bvr
index 0621766..c0d655b 100644
--- a/assets/pages-src/meals.bvr
+++ b/assets/pages-src/meals.bvr
@@ -1,116 +1,158 @@
<@?i global@>
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <meta name="google" content="notranslate">
- <title>Meals &laquo; BežiApp</title>
+ <!DOCTYPE html>
+ <html>
- <!-- Materialize -->
- <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
- <link href="/css/materialicons.css" rel="stylesheet">
- <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <meta name="google" content="notranslate">
+ <title>Meals &laquo; BežiApp</title>
- <script src="/js/lib/jquery.min.js"></script>
- <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
- <script type="text/javascript" src="/js/lib/mergedeep.js"></script>
+ <!-- Materialize -->
+ <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
+ <link href="/css/materialicons.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
+ <!-- jQuery -->
+ <script src="/js/lib/jquery.min.js"></script>
+ <!-- localForage -->
+ <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
+ <!-- mergedeep.js -->
+ <script type="text/javascript" src="/js/lib/mergedeep.js"></script>
+ <!-- stylesheet for custom styles -->
+ <link type="text/css" href="/css/styles.css" rel="stylesheet">
+ <!-- page-specific javascript code -->
+ <script type="text/javascript" src="/js/meals.js"></script>
+ <!-- PWA manifest -->
+ <link rel="manifest" href="/manifest.json">
+ <!-- app global code -->
+ <script src="/js/app.js"></script>
+ <!-- code for custom theme switcher -->
+ <script src="/js/lib/themes.js"></script>
+ <!-- i18n bundle -->
+ <script src="/js/lang/bundle.js"></script>
+ <!-- favicon -->
+ <link rel="shortcut icon" type="image/png" href="/favicon.png" />
+ <!-- iOS support -->
+ <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
+ <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
+ <meta name="apple-mobile-web-app-status-bar" content="#004d32">
+ <!-- fullCalendar -->
+ <link href="/css/fullcalendar/core/main.min.css" rel="stylesheet" />
+ <link href="/css/fullcalendar/daygrid/main.min.css" rel="stylesheet" />
+ <link href="/css/fullcalendar/custom.css" rel="stylesheet" />
+ <script src="/js/lib/fullcalendar/core/main.min.js"></script>
+ <script src="/js/lib/fullcalendar/daygrid/main.min.js"></script>
+ </head>
- <link type="text/css" href="/css/styles.css" rel="stylesheet">
- <script type="text/javascript" src="/js/meals.js"></script>
-
- <link rel="manifest" href="/manifest.json">
- <script src="/js/app.js"></script>
- <script src="/js/lib/themes.js"></script>
- <script src="/js/lang/bundle.js"></script>
- <link rel="shortcut icon" type="image/png" href="/favicon.png" />
-
- <!-- iOS support -->
- <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
- <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
- <meta name="apple-mobile-web-app-status-bar" content="#004d32">
-</head>
-
-<body>
- <nav class="z-depth-0" id="navigation-main">
- <div class="nav-wrapper container">
- <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>meals</x-su>
- <span class="right white-text">
- <i class="material-icons sidenav-trigger" data-target="side-menu">menu</i>
- </span>
- <span class="right white-text" id="refresh-icon">
- <a href="#"><i class="material-icons">refresh</i></a>
- </span>
- </div>
- <div id="loading-bar" class="progress hidden">
- <div class="indeterminate"></div>
- </div>
- </nav>
+ <body>
+ <nav class="z-depth-0" id="navigation-main">
+ <div class="nav-wrapper container">
+ <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>meals</x-su>
+ <span class="right white-text">
+ <i class="material-icons sidenav-trigger" data-target="side-menu">menu</i>
+ </span>
+ <span class="right white-text" id="refresh-icon">
+ <a href="#"><i class="material-icons">refresh</i></a>
+ </span>
+ </div>
+ <div id="loading-bar" class="progress hidden">
+ <div class="indeterminate"></div>
+ </div>
+ </nav>
<@?i navigation@>
- <br>
- <div class="container login" hidden="hidden" id="meals-login-container">
- <h4 class="general-text"><x-su>loginToLopolis</x-su></h4>
- <p class="general-text">
- <x-du>loginToLopolisNote</x-du>
- </p>
- <div class="row">
- <div class="col s12">
- <div class="row">
- <div class="input-field col s12">
- <input id="meals-username" type="text" value="" required="required" name="meals_password" class="validate">
- <label for="meals-username">Lopolis <x-su>username</x-su></label>
- </div>
- </div>
- <div class="row">
- <div class="input-field col s12">
- <input autocomplete="new-password" id="meals-password" type="password" value="" required="required" name="meals_password" class="validate">
- <label for="meals-password">Lopolis <x-su>password</x-su></label>
- </div>
- </div>
- <div class="row">
- <div class="input-field col s12">
- <button id="meals-login" type="button" class="waves-effect waves-light btn">
- <x-su>loginToLopolis</x-su>
- <i class="material-icons right">arrow_right_alt</i>
- </button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="meals-container container" hidden="hidden" id="meals-container">
- <h4>Meals
- <button id="meals-logout" type="button" class="waves-effect waves-light btn" style="float: right">
- <x-su>logOutFromLopolis</x-su>
- <i class="material-icons right">exit_to_app</i>
- </button>
- </h4>
- <ul id="meals-collapsible" class="collapsible"></ul>
- <p>
- <small>
- <b>
- <x-su>usage</x-su>:
- </b>
- <x-du>mealsUsageNote</x-du>
- <br>
- <b>
- <x-su>note</x-su>:
- </b>
- <x-du>lunchesNote</x-du>
- <br>
- <b>
- <x-su>note</x-su>:
- </b>
- <x-du>mealNotShownNote</x-du>
- <br>
- <b>
- Note:
- </b>
- <x-du>mealsContributeNote</x-du>
- </small>
- </p>
- </div>
-</body>
+ <ul id=meal-info class="sidenav side-modal">
+ <br>
+ <li>
+ <a class=header>
+ <h5 id=meal-type>
+ </h5>
+ </a>
+ </li>
+ <li>
+ <a class=subheader>
+ <h6 id=meal-date>
+ </h6>
+ </a>
+ </li>
+ <li>
+ <li>
+ <a class="subheader" style="color:red" id="meal-readonly">
+ <x-du>readOnly</x-du>
+ </a>
+ </li>
+ <div class=divider></div>
+ <li id=meal-options>
+
+ </li>
+ </ul>
+ <br>
+ <div class="container login" hidden="hidden" id="meals-login-container">
+ <h4 class="general-text">
+ <x-su>loginToLopolis</x-su>
+ </h4>
+ <p class="general-text">
+ <x-du>loginToLopolisNote</x-du>
+ </p>
+ <div class="row">
+ <div class="col s12">
+ <div class="row">
+ <div class="input-field col s12">
+ <input id="meals-username" type="text" value="" required="required" name="meals_password" class="validate">
+ <label for="meals-username">Lopolis <x-su>username</x-su></label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="input-field col s12">
+ <input autocomplete="new-password" id="meals-password" type="password" value="" required="required" name="meals_password" class="validate">
+ <label for="meals-password">Lopolis <x-su>password</x-su></label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="input-field col s12">
+ <button id="meals-login" type="button" class="waves-effect waves-light btn">
+ <x-su>loginToLopolis</x-su>
+ <i class="material-icons right">arrow_right_alt</i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="meals-container container" hidden="hidden" id="meals-container">
+ <h4><x-su>meals</x-su>
+ <button id="meals-logout" type="button" class="waves-effect waves-light btn" style="float: right">
+ <x-su>logOutFromLopolis</x-su>
+ <i class="material-icons right">exit_to_app</i>
+ </button>
+ </h4>
+ <div id=meals-calendar></div>
+ <!-- <ul id="meals-collapsible" class="collapsible"></ul> -->
+ <!-- deprecated meals UI -->
+ <p>
+ <small>
+ <b>
+ <x-su>usage</x-su>:
+ </b>
+ <x-du>mealsUsageNote</x-du>
+ <br>
+ <b>
+ <x-su>note</x-su>:
+ </b>
+ <x-du>lunchesNote</x-du>
+ <br>
+ <b>
+ <x-su>note</x-su>:
+ </b>
+ <x-du>mealNotShownNote</x-du>
+ <br>
+ <b>
+ Note:
+ </b>
+ <x-du>mealsContributeNote</x-du>
+ </small>
+ </p>
+ </div>
+ </body>
-</html>
+ </html>
diff --git a/assets/pages-src/misc/matomo.bvr b/assets/pages-src/misc/matomo.bvr
new file mode 100644
index 0000000..d57beb0
--- /dev/null
+++ b/assets/pages-src/misc/matomo.bvr
@@ -0,0 +1,79 @@
+// @begin=js@
+
+var BEZIAPP_USERNAME, BEZIAPP_PASSWORD, BEZIAPP_LOPOLIS_USERNAME, BEZIAPP_LOPOLIS_PASSWORD, BEZIAPP_LANGUAGE, BEZIAPP_THEME, BEZIAPP_ERRORREPORTING;
+
+let promises_to_run_app = [
+ localforage.getItem("username").then((value) => {
+ BEZIAPP_USERNAME = value;
+ }),
+ localforage.getItem("password").then((value) => {
+ BEZIAPP_PASSWORD = value;
+ }),
+ localforage.getItem("lopolis_username").then((value) => {
+ BEZIAPP_LOPOLIS_USERNAME = value;
+ }),
+ localforage.getItem("lopolis_password").then((value) => {
+ BEZIAPP_LOPOLIS_PASSWORD = value;
+ }),
+ localforage.getItem("chosenLang").then((value) => {
+ BEZIAPP_LANGUAGE = value;
+ }),
+ localforage.getItem("theme").then((value) => {
+ BEZIAPP_THEME = value;
+ }),
+ localforage.getItem("errorReporting").then((value) => {
+ BEZIAPP_ERRORREPORTING = value;
+ })
+];
+
+Promise.all(promises_to_run_app).then(() => {
+
+if (BEZIAPP_USERNAME == null || BEZIAPP_USERNAME == "") {
+ var username_report = "neprijavljen.uporabnik";
+} else {
+ var username_report = BEZIAPP_USERNAME;
+}
+if (BEZIAPP_LOPOLIS_USERNAME == null || BEZIAPP_LOPOLIS_USERNAME == "") {
+ var lopolis_username_report = "NEPRIJAVLJENUPORABNIK";
+} else {
+ var lopolis_username_report = BEZIAPP_LOPOLIS_USERNAME;
+}
+if (BEZIAPP_LANGUAGE == null || BEZIAPP_LANGUAGE == "") {
+ var language_report = "unspecified_language";
+} else {
+ var language_report = BEZIAPP_LANGUAGE
+}
+if (BEZIAPP_THEME == null || BEZIAPP_THEME == "") {
+ var theme_report = "unspecified_theme";
+} else {
+ var theme_report = BEZIAPP_THEME;
+}
+if (BEZIAPP_ERRORREPORTING == null || BEZIAPP_ERRORREPORTING == "") {
+ var errorreporting_report = "unspecified-errorreporting";
+} else {
+ var errorreporting_report = BEZIAPP_ERRORREPORTING;
+}
+
+var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(['setUserId', username_report]);
+ _paq.push(['enableHeartBeatTimer', 30]);
+ _paq.push(['setCustomVariable', 1, 'lopolis-username', lopolis_username_report, 'visit']);
+ _paq.push(['setCustomVariable', 2, 'language', language_report, 'visit']);
+ _paq.push(['setCustomVariable', 3, 'theme', theme_report, 'visit']);
+ _paq.push(['setCustomVariable', 4, 'errorreporting', errorreporting_report, 'visit']);
+ _paq.push(['setCustomVariable', 5, 'domain', window.location.host, 'visit']);
+ _paq.push(['trackPageView']);
+ _paq.push(['trackAllContentImpressions']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="//matomo.gimb.tk/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '1']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+
+});
diff --git a/assets/root/manifest.json b/assets/root/manifest.json
index b8bf5da..99fd18d 100644
--- a/assets/root/manifest.json
+++ b/assets/root/manifest.json
@@ -55,5 +55,12 @@
"education",
"productivity",
"utilities"
- ]
-} \ No newline at end of file
+ ],
+ "prefer_related_applications": true,
+ "related_applications": [
+ {
+ "platform": "play",
+ "id": "tk.gimb.app"
+ }
+ ]
+}
diff --git a/dist/cache_name.txt b/dist/cache_name.txt
index f5d6d52..0d968c3 100755
--- a/dist/cache_name.txt
+++ b/dist/cache_name.txt
@@ -2,4 +2,4 @@
-///site-static-1.0.14.5-beta-47006bd|||
+///site-static-1.0.15.0-beta-a0a53be|||
diff --git a/dist/css/styles.css b/dist/css/styles.css
index 0e11125..06da571 100755
--- a/dist/css/styles.css
+++ b/dist/css/styles.css
@@ -134,9 +134,8 @@ a.collection-item {
}
.fc-unthemed td.fc-today {
- background: var(--color-primary-transparent);
+ background: var(--color-primary-transparent) !important;
}
-
.fc-icon {
color: var(--color-text);
}
@@ -428,4 +427,16 @@ h1, h2, h3, h4, h5, h6 {
ol {
color: var(--color-text) !important;
-} \ No newline at end of file
+}
+
+/* meals: */
+
+.selected-meal {
+ color: green !important;
+ font-weight: bold !important;
+}
+
+.to-be-selected-meal {
+ color: brown !important;
+ font-weight: italic !important;
+}
diff --git a/dist/js/app.js b/dist/js/app.js
index 53dfae0..783361e 100755
--- a/dist/js/app.js
+++ b/dist/js/app.js
@@ -2,8 +2,8 @@
-const app_version = "1.0.14.5-beta";
-const previous_commit = "47006bdae8d53e0bb33110f149730962e5591f4d";
+const app_version = "1.0.15.0-beta";
+const previous_commit = "a0a53bec5f61439dece140798235114a0164e26d";
const BEZIAPP_UPDATE_INTERVAL = 300; // update vsakih 300 sekund
if ("serviceWorker" in navigator) {
@@ -124,4 +124,85 @@ document.addEventListener("DOMContentLoaded", () => {
try_app_update();
}, 1000 * BEZIAPP_UPDATE_INTERVAL);
-})
+});
+
+// @begin=js@
+
+var BEZIAPP_USERNAME, BEZIAPP_PASSWORD, BEZIAPP_LOPOLIS_USERNAME, BEZIAPP_LOPOLIS_PASSWORD, BEZIAPP_LANGUAGE, BEZIAPP_THEME, BEZIAPP_ERRORREPORTING;
+
+let promises_to_run_app = [
+ localforage.getItem("username").then((value) => {
+ BEZIAPP_USERNAME = value;
+ }),
+ localforage.getItem("password").then((value) => {
+ BEZIAPP_PASSWORD = value;
+ }),
+ localforage.getItem("lopolis_username").then((value) => {
+ BEZIAPP_LOPOLIS_USERNAME = value;
+ }),
+ localforage.getItem("lopolis_password").then((value) => {
+ BEZIAPP_LOPOLIS_PASSWORD = value;
+ }),
+ localforage.getItem("chosenLang").then((value) => {
+ BEZIAPP_LANGUAGE = value;
+ }),
+ localforage.getItem("theme").then((value) => {
+ BEZIAPP_THEME = value;
+ }),
+ localforage.getItem("errorReporting").then((value) => {
+ BEZIAPP_ERRORREPORTING = value;
+ })
+];
+
+Promise.all(promises_to_run_app).then(() => {
+
+if (BEZIAPP_USERNAME == null || BEZIAPP_USERNAME == "") {
+ var username_report = "neprijavljen.uporabnik";
+} else {
+ var username_report = BEZIAPP_USERNAME;
+}
+if (BEZIAPP_LOPOLIS_USERNAME == null || BEZIAPP_LOPOLIS_USERNAME == "") {
+ var lopolis_username_report = "NEPRIJAVLJENUPORABNIK";
+} else {
+ var lopolis_username_report = BEZIAPP_LOPOLIS_USERNAME;
+}
+if (BEZIAPP_LANGUAGE == null || BEZIAPP_LANGUAGE == "") {
+ var language_report = "unspecified_language";
+} else {
+ var language_report = BEZIAPP_LANGUAGE
+}
+if (BEZIAPP_THEME == null || BEZIAPP_THEME == "") {
+ var theme_report = "unspecified_theme";
+} else {
+ var theme_report = BEZIAPP_THEME;
+}
+if (BEZIAPP_ERRORREPORTING == null || BEZIAPP_ERRORREPORTING == "") {
+ var errorreporting_report = "unspecified-errorreporting";
+} else {
+ var errorreporting_report = BEZIAPP_ERRORREPORTING;
+}
+
+var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
+ _paq.push(["setDoNotTrack", true]);
+ _paq.push(['setUserId', username_report]);
+ _paq.push(['enableHeartBeatTimer', 30]);
+ _paq.push(['setCustomVariable', 1, 'lopolis-username', lopolis_username_report, 'visit']);
+ _paq.push(['setCustomVariable', 2, 'language', language_report, 'visit']);
+ _paq.push(['setCustomVariable', 3, 'theme', theme_report, 'visit']);
+ _paq.push(['setCustomVariable', 4, 'errorreporting', errorreporting_report, 'visit']);
+ _paq.push(['setCustomVariable', 5, 'domain', window.location.host, 'visit']);
+ _paq.push(['trackPageView']);
+ _paq.push(['trackAllContentImpressions']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="//matomo.gimb.tk/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '1']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+
+});
+
diff --git a/dist/js/lang/bundle.js b/dist/js/lang/bundle.js
index d945e00..7c0a4af 100755
--- a/dist/js/lang/bundle.js
+++ b/dist/js/lang/bundle.js
@@ -7,4 +7,4 @@ async function setLangConfigAndReload(){let promises_to_run=[localforage.setItem
window.addEventListener("DOMContentLoaded",()=>{localforage.getItem("chosenLang").then((value)=>{if(value==null){setLangConfigAndReload();}else{chosenLang=value;}});refreshLangDOM();});const capitalize=(s)=>{if(typeof s!=='string')return''
return s.charAt(0).toUpperCase()+s.slice(1)}
var s=function(whatString){return getLang.s(whatString);};var d=function(whatString){return getLang.d(whatString);};var S=function(whatString){return getLang.S(whatString);};var D=function(whatString){return getLang.D(whatString);};var getLang={s:function(whatString){return langstrings[chosenLang][whatString];},S:function(whatString){return capitalize(langstrings[chosenLang][whatString]);},d:function(whatString){if(langstrings[chosenLang][whatString].slice(-1)!="."){return langstrings[chosenLang][whatString]+".";}else{return langstrings[chosenLang][whatString];}},D:function(whatString){if(langstrings[chosenLang][whatString].slice(-1)!="."){return capitalize(langstrings[chosenLang][whatString]+".");}else{return capitalize(langstrings[chosenLang][whatString]);}},}
-var langstrings={en:{miscTranslationLanguage:"English",miscTranslationAuthors:"Rok Štular","":"",monday:"monday",tuesday:"tuesday",wednesday:"wednesday",thursday:"thursday",friday:"friday",saturday:"saturday",sunday:"sunday",am:"am",pm:"pm",january:"january",february:"february",march:"march",april:"april",may:"may",june:"june",july:"july",august:"august",september:"september",october:"october",november:"november",december:"december",username:"username",password:"password",signIn:"sign in",bySigningInYouAgreeTo:"by signing in, you agree to",theToS:"the terms and conditions",and:"and",thePrivacyPolicy:"the privacy policy",loginFailed:"login failed",browserNotSupported:"bežiapp won't work on your device, unless you update your Internet browser",timetable:"timetable",gradings:"gradings",grades:"grades",teachers:"teachers",absences:"absences",messaging:"messaging",meals:"meals",about:"about",logout:"logout",settings:"settings",noPeriods:"no periods in selected week",date:"date",description:"description",add:"add",requestFailed:"request failed",addGrading:"add grading",noInternetConnection:"no internet connection",temporary:"temporary",useOnlyPermanentGrades:"use only permanent grades",useOnlyPermanentGradesNote1:"if checked, only permanent grades will be used in the average grade calculation",useOnlyPermanentGradesNote2:"if left unchecked, the calculation will include every available grade",type:"type",term:"term",teacher:"teacher",zakljucneGradess:"grades in red are final grades that appear on your end-of-year certificate and are decided by your teacher. They are not averages like grades in black. Should you have any questions or complaints about them, contact your teacher",name:"name",schoolSubject:"subject",tpMeetings:"TP meetings",from:"from",to:"to",cancel:"cancel",ok:"ok",noAbsences:"no absences in the chosen time period",lesson:"lesson",notProcessed:"not processed",authorizedAbsence:"authorized",unauthorizedAbsence:"unauthorized",doesNotCount:"does not count",loadingMessages:"Loading messages...",sendAMessage:"send a message",send:"send",recipient:"recipient",messageSubject:"subject",messageBody:"message body",removeImages:"remove images",note:"note",largeImagesNote:"GimB servers don't like large messages, so only very small images may be attached or your message will not be delivered",attachedImages:"attached images",encryptMessage:"Encrypt message",passwordForE2EE:"password for encrypting the message",messages:"messages",received:"received",sent:"sent",deleted:"deleted",messageStorageUsed:"message storage used in this folder",maxMessagesNote:"you can only have 120 messages per message folder, older messages will not be shown. Remember to delete read and sent messages regulary to avoid any issues.",loadMessageBody:"load message body",thisMessageWasEncrypted:"this message was encrypted",enterPassword:"enter password",decrypt:"decrypt",nameDirectoryNotSet:"name directory not set, sending unavailable",errorFetchingMessages:"error fetching messages",unableToReceiveTheMessage:"unable to receive the message",unableToDeleteTheMessage:"unable to delete the message",messageWasProbablySent:"message was probably sent, check the Sent folder to be sure",errorSendingMessage:"error sending message",imageAddedAsAnAttachment:"image added as an attachment",unableToReadDirectory:"unable to read directory of people",messageCouldNotBeSent:"message could to be sent",incorrectPassword:"incorrect password",chat:"chat",chattingWith:"chatting with",noMessages:"no messages",stillLoading:"loading is still in progress",directory:"directory",select:"select",mustSelectRecipient:"you have to select a recipient before chatting. Open directory on the left side by clicking on the top left addressbook button and select a recipient in order to start chatting with them",recipientNotInDirectory:"recipient is not in directory.",chatExternalInfo:"you have just received a chat. Chats are not supported by GimSIS, so you must reply by changing the subject to something else. Chat body: ",loginError:"login error",loginToLopolis:"login to Lopolis",loginToLopolisNote:"it seems like you're not currently logged in to eRestavracija, so this form has been presented to you. You have a different username and password combination used for applying and opting out of of menus. In order to use this feature, you have to log in with your Lopolis account.",logInToLopolis:"log in to Lopolis",logOutFromLopolis:"log out from Lopolis",readOnly:"read only",usage:"usage",mealsUsageNote:"click on a date to open the collapsible menu with choices and click on a specific meal to select it. Reload the meals when you're done and check the entries.",lunchesNote:"app was not tested with lunches in mind. Meals probably won't work with lunches and having a lunch subscription may even break its functionality.",mealNotShownNote:"if a meal is not present in the meals collapsible field, this does not necessarily mean it does not exist. Meals that haven't been altered by you and are unchangable (read-only) are not shown for clarity.",mealsContributeNote:"you are welcome to contribute to the LopolisAPI project and add features, such as checkouts.",authenticationError:"authentication error",lopolisAPIConnectionError:"LopolisAPI server connection error",errorGettingMenus:"error getting menus",errorUnexpectedResponse:"error: unexpected response",requestForAuthenticationFailed:"request for authentication failed",credentialsMatch:"credentials match",errorSettingMeals:"error setting meals",mealSet:"meal set! Reload meals to be sure",selected:"selected",version:"version",authors:"authors",translatorsForThisLanguage:"translators for this language",whatIsNew:"what's new",whatsNew:"what's new",reportABug:"report a bug",sendASuggestion:"send a suggestion",instagram:"instagram",changelog:"changelog",termsOfUse:"terms of use",termsOfUseDescription:"as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App",termsOfUseHarass:"to abuse, harass, threaten, impersonate or intimidate any person",termsOfUsePost:"to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person",termsOfUseCommunicate:"to communicate with the App developers or other users in abusive or offensive manner",termsOfUsePurpose:"for any purpose that is not permitted under the laws of the jurisdiction where you use the App",termsOfUseExploit:"to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user",termsOfUseSpam:"to create or transmit unwanted “spam” to any person or any URL",termsOfUseModify:"you may also not reverse engineer, modify or redistribute the app without written consent from the developers",terminationOfServices:"termination of services",terminationOfServicesDescriptions:"the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons",terminationOfServicesBreaching:"breaching the Terms of Service",terminationOfServicesRequest:"receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App",limitationOfLiability:"limitation of Liability",limitationOfLiabilityContent:"the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.",tosAreEffectiveAsOf:"the Terms of Service are effective as of",privacyImportant:"your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.",privacyOnlyAskedWhen:"we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.",privacyDataCollection:"we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.",privacySharingData:"we don’t share any personally identifying information publicly or with third-parties, except when required to by law",privacyExternalSites:"our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.",privacyRefuse:"you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.",privacyAcceptWithUse:"your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.",privacyEffectiveAsOf:"this policy is effective as of",language:"language",selectLanguage:"select desired language",languageSet:"language set, open another page for the changes to take effect",theme:"theme",themeLight:"light theme (default)",themeDark:"dark theme",themeNight:"night theme",selectTheme:"select a theme",triggerWarning:"the following switch enables additional settings, which some people may: disagree with, find annoying, be offended by them. By enabling the switch, you agree that you won't be triggered by any of the additional options and will not asociate any of the authors and/or their personal beliefs and opinions with additional options.",triggerAgreement:"i agree with terms and conditions stated above",triggerWarningSet:"additional settings toggled",additionalOptions:"additional settings",themeSet:"theme set, open another page for the changes to take effect",errorReportingSet:"error reporting preference set",errorReporting:"error reporting",on:"on",off:"off",selectErrorReporting:"should error reports be submitted to the developers?",gsecErrNet:"GimSIS connection error",gsecErrLogin:"GimSIS login error (bad password?), try logging out",gsecErrOther:"GimSIS unknown error, try logging out",videoconferences:"GimB meet"},sl:{miscTranslationLanguage:"slovenščina",miscTranslationAuthors:"Anton Luka Šijanec","":"",monday:"ponedeljek",tuesday:"torek",wednesday:"sreda",thursday:"četrtek",friday:"petek",saturday:"sobota",sunday:"nedelja",am:"dop.",pm:"pop.",january:"januar",february:"februar",march:"marec",april:"april",may:"maj",june:"junij",july:"julij",august:"avgust",september:"september",october:"oktober",november:"november",december:"december",username:"uporabniško ime",password:"geslo",signIn:"prijava",bySigningInYouAgreeTo:"s prijavo se strinjate s",theToS:"pogoji uporabe (v angleščini)",and:"in",thePrivacyPolicy:"politika zasebnosti (v angleščini)",loginFailed:"prijava je spodletela",browserNotSupported:"BežiApp ne bo deloval na vaši napravi, če ne posodobite vašega Internetnega brskalnika",noPeriods:"ni ur v izbranem tednu",timetable:"urnik",gradings:"ocenjevanja",grades:"ocene",teachers:"profesorji",absences:"izostanki",messaging:"sporočanje",meals:"obroki",about:"o",logout:"odjava",settings:"nastavitve",date:"datum",description:"opis",add:"dodaj",requestFailed:"zahteva spodletela",addGrading:"dodaj ocenjevanje",noInternetConnection:"ni povezave s spletom",temporary:"začasno",useOnlyPermanentGrades:"uporabi le stalne ocene",useOnlyPermanentGradesNote1:"če je označeno, bodo za izračun povprečja uporabljene le stalne ocene",useOnlyPermanentGradesNote2:"če pa je polje neoznačeno, pa se ob izračunu povprečne ocene upoštevajo vse ocene",type:"tip",term:"rok",teacher:"profesor",zakljucneGradess:"zaključne ocene, ki bodo na spričevalu, so označene z rdečo, povprečja ocen pa so v črni barvi. V kolikor imate kakršnekoli pritožbe ali vprašanja glede zaključnih ocen, povprašajte profesorja",name:"ime",schoolSubject:"predmet",tpMeetings:"govorilne ure",from:"od",to:"do",cancel:"prekliči",ok:"v redu",noAbsences:"ni izostankov v izbranem časovnem obdobju",lesson:"ura",notProcessed:"ni obdelano",authorizedAbsence:"opravičeno",unauthorizedAbsence:"neopravičeno",doesNotCount:"ne šteje",loadingMessages:"Nalagam sporočila...",sendAMessage:"pošlji sporočilo",send:"pošlji",recipient:"prejemnik",messageSubject:"zadeva",messageBody:"telo",removeImages:"odstrani slike",note:"opomba",largeImagesNote:"GimB strežniki ne marajo velikih sporočil, zato lahko pošiljate le zelo majhne slike, v nasprotnem primeru sporočilo ne bo dostavljeno",attachedImages:"pripete slike",encryptMessage:"Šifriraj sporočilo",passwordForE2EE:"geslo za šifriranje sporočila",messages:"sporočila",received:"prejeta",sent:"poslana",deleted:"izbrisana",messageStorageUsed:"zasedenost shrambe sporočil v tej mapi",maxMessagesNote:"v vsaki mapi imate lahko največ 120 sporočil. Starejša sporočila ne bodo prikazana. Redno brišite sporočila, da se izognete morebitnim težavam.",loadMessageBody:"naloži telo sporočila",thisMessageWasEncrypted:"to sporočilo je šifrirano",enterPassword:"vnesite geslo",decrypt:"dešifriraj",nameDirectoryNotSet:"imenik ni nastavljen, pošiljanje ni mogoče",errorFetchingMessages:"sporočil ni bilo mogoče prenesti",unableToReceiveTheMessage:"sporočila ni bilo mogoče prenesti",unableToDeleteTheMessage:"sporočila ni bilo mogoče izbrisati",messageWasProbablySent:"sporočilo je bilo verjetno poslano, prepričajte se in preverite mapo s poslanimi sporočili",errorSendingMessage:"sporočila ni bilo mogoče poslati",imageAddedAsAnAttachment:"slika dodana kot priloga",unableToReadDirectory:"imenika ni bilo mogoče prebrati",messageCouldNotBeSent:"sporočila ni bilo mogoče poslati",incorrectPassword:"nepravilno geslo",chat:"klepet",chattingWith:"klepet z osebo",noMessages:"ni sporočil",stillLoading:"nalaganje še poteka",directory:"imenik",select:"izberi",mustSelectRecipient:"pred klepetom morate izbrati sogovornika. Odprite imenik (meni na levi strani) s pritiskom na gumb \"imenik\" zgoraj desno in izberite sogovornika.",recipientNotInDirectory:"izbrane osebe ni v imeniku",chatExternalInfo:"dobili ste kratko sporočilo v standardu, ki ga GimSIS ne podpira. Pri odgovarjanju spremenite zadevo. Vsebina sporočila: ",loginError:"napaka pri prijavi",loginToLopolis:"prijava v Lopolis",loginToLopolisNote:"izgleda, da niste prijavljeni v eRestavracijo, zato se vam je prikazal prijavni obrazec. Za uporavljanje s prehrano se uporablja druga kombinacija uporabniškega imena in gesla, zato se prijavite s svojimi Lopolis prijavnimi podatki za nadaljevanje.",logInToLopolis:"prijava v Lopolis",logOutFromLopolis:"odjava iz Lopolisa",readOnly:"samo za branje",usage:"uporaba",mealsUsageNote:"kliknite na datum za prikaz menijev, nato pa si enega izberite s klikom na ime menija. Po nastavitvi menijev ponovno naložite menije in se prepričajte o pravilnih nastavitvah.",lunchesNote:"aplikacija ni testirana za naročanje na kosila, zato verjetno to ne deluje. Če ste naročeni na kosila lahko naročanje na menije sploh ne deluje ali pa deluje narobe.",mealNotShownNote:"če nek dan manjka med meniji, to verjetno pomeni, da ni več spremenljiv in zanj niste ročno spremenili menija",mealsContributeNote:"vabimo vas k urejanju LopolisAPI programa za upravljanje z meniji.",authenticationError:"napaka avtentikacije",lopolisAPIConnectionError:"napaka povezave na LopolisAPI strežnik",errorGettingMenus:"napaka branja menijev",errorUnexpectedResponse:"napaka: nepričakovan odgovor",requestForAuthenticationFailed:"zahteva za avtentikacijo ni uspela",credentialsMatch:"prijavni podatki so pravilni",errorSettingMeals:"napaka pri nastavljanju menijev",mealSet:"obrok nastavljen! osvežite obroke in se prepričajte sami",selected:"izbrano",version:"različica",authors:"avtorji",translatorsForThisLanguage:"prevajalci izbranega jezika",whatIsNew:"kaj je novega",whatsNew:"kaj je novega",reportABug:"prijavite napako",sendASuggestion:"pošljite pripombo/predlog/pohvalo/pritožbo",instagram:"instagram",changelog:"dnevnik sprememb",termsOfUse:"terms of use",termsOfUseDescription:"as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App",termsOfUseHarass:"to abuse, harass, threaten, impersonate or intimidate any person",termsOfUsePost:"to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person",termsOfUseCommunicate:"to communicate with the App developers or other users in abusive or offensive manner",termsOfUsePurpose:"for any purpose that is not permitted under the laws of the jurisdiction where you use the App",termsOfUseExploit:"to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user",termsOfUseSpam:"to create or transmit unwanted “spam” to any person or any URL",termsOfUseModify:"you may also not reverse engineer, modify or redistribute the app without written consent from the developers",terminationOfServices:"termination of services",terminationOfServicesDescriptions:"the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons",terminationOfServicesBreaching:"breaching the Terms of Service",terminationOfServicesRequest:"receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App",limitationOfLiability:"limitation of Liability",limitationOfLiabilityContent:"the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.",tosAreEffectiveAsOf:"the Terms of Service are effective as of",privacyImportant:"your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.",privacyOnlyAskedWhen:"we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.",privacyDataCollection:"we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.",privacySharingData:"we don’t share any personally identifying information publicly or with third-parties, except when required to by law",privacyExternalSites:"our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.",privacyRefuse:"you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.",privacyAcceptWithUse:"your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.",privacyEffectiveAsOf:"this policy is effective as of",language:"jezik",selectLanguage:"izberite željen jezik",languageSet:"jezik nastavljen, odprite neko drugo stran da se pokažejo spremembe",theme:"izgled",themeLight:"svetel izgled (privzeto)",themeDark:"temen izgled",themeNight:"nočni izgled",themeSet:"izgled nastavljen, odprite neko drugo stran da se spremembe uveljavijo",selectTheme:"izberite željen izgled",errorReportingSet:"nastavitev pošiljanja napak izbrana",errorReporting:"pošiljanje napak",on:"vklopljeno",off:"izklopljeno",selectErrorReporting:"ali naj so napake v aplikaciji posredovane razvijalcem?",triggerWarning:"spodnji gumb omogoči dodatne možnosti, ki lahko razburijo/vznevoljijo nekatere uporabnike. Če omogočite stikalo, se strinjate, da avtorjev in/ali njihovih osebnih prepričanj ne boste povezovali s katerokoli od dodatnih omogočenih možnosti",triggerAgreement:"strinjam se z zgoraj navedenimi pogoji",triggerWarningSet:"spremenili ste stanje dodatnih nastavitev",additionalOptions:"dodatne nastavitve",gsecErrNet:"napaka povezave na GimSIS",gsecErrLogin:"prijava v GimSIS ni uspela (napačno geslo?), poskusite se odjaviti",gsecErrOther:"neznana napaka GimSISa, poskusite se odjaviti",videoconferences:"GimB konference"}} \ No newline at end of file
+var langstrings={en:{miscTranslationLanguage:"English",miscTranslationAuthors:"Rok Štular","":"",monday:"monday",tuesday:"tuesday",wednesday:"wednesday",thursday:"thursday",friday:"friday",saturday:"saturday",sunday:"sunday",am:"am",pm:"pm",january:"january",february:"february",march:"march",april:"april",may:"may",june:"june",july:"july",august:"august",september:"september",october:"october",november:"november",december:"december",username:"username",password:"password",signIn:"sign in",bySigningInYouAgreeTo:"by signing in, you agree to",theToS:"the terms and conditions",and:"and",thePrivacyPolicy:"the privacy policy",loginFailed:"login failed",browserNotSupported:"bežiapp won't work on your device, unless you update your Internet browser",timetable:"timetable",gradings:"gradings",grades:"grades",teachers:"teachers",absences:"absences",messaging:"messaging",meals:"meals",about:"about",logout:"logout",settings:"settings",noPeriods:"no periods in selected week",date:"date",description:"description",add:"add",requestFailed:"request failed",addGrading:"add grading",noInternetConnection:"no internet connection",temporary:"temporary",useOnlyPermanentGrades:"use only permanent grades",useOnlyPermanentGradesNote1:"if checked, only permanent grades will be used in the average grade calculation",useOnlyPermanentGradesNote2:"if left unchecked, the calculation will include every available grade",type:"type",term:"term",teacher:"teacher",zakljucneGradess:"grades in red are final grades that appear on your end-of-year certificate and are decided by your teacher. They are not averages like grades in black. Should you have any questions or complaints about them, contact your teacher",name:"name",schoolSubject:"subject",tpMeetings:"TP meetings",from:"from",to:"to",cancel:"cancel",ok:"ok",noAbsences:"no absences in the chosen time period",lesson:"lesson",notProcessed:"not processed",authorizedAbsence:"authorized",unauthorizedAbsence:"unauthorized",doesNotCount:"does not count",loadingMessages:"Loading messages...",sendAMessage:"send a message",send:"send",recipient:"recipient",messageSubject:"subject",messageBody:"message body",removeImages:"remove images",note:"note",largeImagesNote:"GimB servers don't like large messages, so only very small images may be attached or your message will not be delivered",attachedImages:"attached images",encryptMessage:"Encrypt message",passwordForE2EE:"password for encrypting the message",messages:"messages",received:"received",sent:"sent",deleted:"deleted",messageStorageUsed:"message storage used in this folder",maxMessagesNote:"you can only have 120 messages per message folder, older messages will not be shown. Remember to delete read and sent messages regulary to avoid any issues.",loadMessageBody:"load message body",thisMessageWasEncrypted:"this message was encrypted",enterPassword:"enter password",decrypt:"decrypt",nameDirectoryNotSet:"name directory not set, sending unavailable",errorFetchingMessages:"error fetching messages",unableToReceiveTheMessage:"unable to receive the message",unableToDeleteTheMessage:"unable to delete the message",messageWasProbablySent:"message was probably sent, check the Sent folder to be sure",errorSendingMessage:"error sending message",imageAddedAsAnAttachment:"image added as an attachment",unableToReadDirectory:"unable to read directory of people",messageCouldNotBeSent:"message could to be sent",incorrectPassword:"incorrect password",chat:"chat",chattingWith:"chatting with",noMessages:"no messages",stillLoading:"loading is still in progress",directory:"directory",select:"select",mustSelectRecipient:"you have to select a recipient before chatting. Open directory on the left side by clicking on the top left addressbook button and select a recipient in order to start chatting with them",recipientNotInDirectory:"recipient is not in directory.",chatExternalInfo:"you have just received a chat. Chats are not supported by GimSIS, so you must reply by changing the subject to something else. Chat body: ",loginError:"login error",loginToLopolis:"login to Lopolis",loginToLopolisNote:"it seems like you're not currently logged in to eRestavracija, so this form has been presented to you. You have a different username and password combination used for applying and opting out of of menus. In order to use this feature, you have to log in with your Lopolis account.",logInToLopolis:"log in to Lopolis",logOutFromLopolis:"log out from Lopolis",readOnly:"read only",usage:"usage",mealsUsageNote:"click on a date to open the collapsible menu with choices and click on a specific meal to select it. Reload the meals when you're done and check the entries.",lunchesNote:"app was not tested with lunches in mind. Meals probably won't work with lunches and having a lunch subscription may even break its functionality.",mealNotShownNote:"editable meals are highlighted in gold, read-only meals are highlighted in grey and cannot be changed. Meals that provide no options for menus are not shown for clarity, same applies for days where there are no meals",mealsContributeNote:"you are welcome to contribute to the LopolisAPI project and add features, such as checkouts.",authenticationError:"authentication error",lopolisAPIConnectionError:"LopolisAPI server connection error",errorGettingMenus:"error getting menus",errorUnexpectedResponse:"error: unexpected response",requestForAuthenticationFailed:"request for authentication failed",credentialsMatch:"credentials match",errorSettingMeals:"error setting meals",mealSet:"meal set! Reload meals to be sure",selected:"selected",meal:"meal",version:"version",authors:"authors",translatorsForThisLanguage:"translators for this language",whatIsNew:"what's new",whatsNew:"what's new",reportABug:"report a bug",sendASuggestion:"send a suggestion",instagram:"instagram",changelog:"changelog",termsOfUse:"terms of use",termsOfUseDescription:"as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App",termsOfUseHarass:"to abuse, harass, threaten, impersonate or intimidate any person",termsOfUsePost:"to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person",termsOfUseCommunicate:"to communicate with the App developers or other users in abusive or offensive manner",termsOfUsePurpose:"for any purpose that is not permitted under the laws of the jurisdiction where you use the App",termsOfUseExploit:"to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user",termsOfUseSpam:"to create or transmit unwanted “spam” to any person or any URL",termsOfUseModify:"you may also not reverse engineer, modify or redistribute the app without written consent from the developers",terminationOfServices:"termination of services",terminationOfServicesDescriptions:"the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons",terminationOfServicesBreaching:"breaching the Terms of Service",terminationOfServicesRequest:"receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App",limitationOfLiability:"limitation of Liability",limitationOfLiabilityContent:"the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.",tosAreEffectiveAsOf:"the Terms of Service are effective as of",privacyImportant:"your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.",privacyOnlyAskedWhen:"we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.",privacyDataCollection:"we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.",privacySharingData:"we don’t share any personally identifying information publicly or with third-parties, except when required to by law",privacyExternalSites:"our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.",privacyRefuse:"you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.",privacyAcceptWithUse:"your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.",privacyEffectiveAsOf:"this policy is effective as of",language:"language",selectLanguage:"select desired language",languageSet:"language set, open another page for the changes to take effect",theme:"theme",themeLight:"light theme (default)",themeDark:"dark theme",themeNight:"night theme",selectTheme:"select a theme",triggerWarning:"the following switch enables additional settings, which some people may: disagree with, find annoying, be offended by them. By enabling the switch, you agree that you won't be triggered by any of the additional options and will not asociate any of the authors and/or their personal beliefs and opinions with additional options.",triggerAgreement:"i agree with terms and conditions stated above",triggerWarningSet:"additional settings toggled",additionalOptions:"additional settings",themeSet:"theme set, open another page for the changes to take effect",errorReportingSet:"error reporting preference set",errorReporting:"error reporting",on:"on",off:"off",selectErrorReporting:"should error reports be submitted to the developers?",gsecErrNet:"GimSIS connection error",gsecErrLogin:"GimSIS login error (bad password?), try logging out",gsecErrOther:"GimSIS unknown error, try logging out",videoconferences:"GimB meet"},sl:{miscTranslationLanguage:"slovenščina",miscTranslationAuthors:"Anton Luka Šijanec","":"",monday:"ponedeljek",tuesday:"torek",wednesday:"sreda",thursday:"četrtek",friday:"petek",saturday:"sobota",sunday:"nedelja",am:"dop.",pm:"pop.",january:"januar",february:"februar",march:"marec",april:"april",may:"maj",june:"junij",july:"julij",august:"avgust",september:"september",october:"oktober",november:"november",december:"december",username:"uporabniško ime",password:"geslo",signIn:"prijava",bySigningInYouAgreeTo:"s prijavo se strinjate s",theToS:"pogoji uporabe (v angleščini)",and:"in",thePrivacyPolicy:"politika zasebnosti (v angleščini)",loginFailed:"prijava je spodletela",browserNotSupported:"BežiApp ne bo deloval na vaši napravi, če ne posodobite vašega Internetnega brskalnika",noPeriods:"ni ur v izbranem tednu",timetable:"urnik",gradings:"ocenjevanja",grades:"ocene",teachers:"profesorji",absences:"izostanki",messaging:"sporočanje",meals:"obroki",about:"o",logout:"odjava",settings:"nastavitve",date:"datum",description:"opis",add:"dodaj",requestFailed:"zahteva spodletela",addGrading:"dodaj ocenjevanje",noInternetConnection:"ni povezave s spletom",temporary:"začasno",useOnlyPermanentGrades:"uporabi le stalne ocene",useOnlyPermanentGradesNote1:"če je označeno, bodo za izračun povprečja uporabljene le stalne ocene",useOnlyPermanentGradesNote2:"če pa je polje neoznačeno, pa se ob izračunu povprečne ocene upoštevajo vse ocene",type:"tip",term:"rok",teacher:"profesor",zakljucneGradess:"zaključne ocene, ki bodo na spričevalu, so označene z rdečo, povprečja ocen pa so v črni barvi. V kolikor imate kakršnekoli pritožbe ali vprašanja glede zaključnih ocen, povprašajte profesorja",name:"ime",schoolSubject:"predmet",tpMeetings:"govorilne ure",from:"od",to:"do",cancel:"prekliči",ok:"v redu",noAbsences:"ni izostankov v izbranem časovnem obdobju",lesson:"ura",notProcessed:"ni obdelano",authorizedAbsence:"opravičeno",unauthorizedAbsence:"neopravičeno",doesNotCount:"ne šteje",loadingMessages:"Nalagam sporočila...",sendAMessage:"pošlji sporočilo",send:"pošlji",recipient:"prejemnik",messageSubject:"zadeva",messageBody:"telo",removeImages:"odstrani slike",note:"opomba",largeImagesNote:"GimB strežniki ne marajo velikih sporočil, zato lahko pošiljate le zelo majhne slike, v nasprotnem primeru sporočilo ne bo dostavljeno",attachedImages:"pripete slike",encryptMessage:"Šifriraj sporočilo",passwordForE2EE:"geslo za šifriranje sporočila",messages:"sporočila",received:"prejeta",sent:"poslana",deleted:"izbrisana",messageStorageUsed:"zasedenost shrambe sporočil v tej mapi",maxMessagesNote:"v vsaki mapi imate lahko največ 120 sporočil. Starejša sporočila ne bodo prikazana. Redno brišite sporočila, da se izognete morebitnim težavam.",loadMessageBody:"naloži telo sporočila",thisMessageWasEncrypted:"to sporočilo je šifrirano",enterPassword:"vnesite geslo",decrypt:"dešifriraj",nameDirectoryNotSet:"imenik ni nastavljen, pošiljanje ni mogoče",errorFetchingMessages:"sporočil ni bilo mogoče prenesti",unableToReceiveTheMessage:"sporočila ni bilo mogoče prenesti",unableToDeleteTheMessage:"sporočila ni bilo mogoče izbrisati",messageWasProbablySent:"sporočilo je bilo verjetno poslano, prepričajte se in preverite mapo s poslanimi sporočili",errorSendingMessage:"sporočila ni bilo mogoče poslati",imageAddedAsAnAttachment:"slika dodana kot priloga",unableToReadDirectory:"imenika ni bilo mogoče prebrati",messageCouldNotBeSent:"sporočila ni bilo mogoče poslati",incorrectPassword:"nepravilno geslo",chat:"klepet",chattingWith:"klepet z osebo",noMessages:"ni sporočil",stillLoading:"nalaganje še poteka",directory:"imenik",select:"izberi",mustSelectRecipient:"pred klepetom morate izbrati sogovornika. Odprite imenik (meni na levi strani) s pritiskom na gumb \"imenik\" zgoraj desno in izberite sogovornika.",recipientNotInDirectory:"izbrane osebe ni v imeniku",chatExternalInfo:"dobili ste kratko sporočilo v standardu, ki ga GimSIS ne podpira. Pri odgovarjanju spremenite zadevo. Vsebina sporočila: ",loginError:"napaka pri prijavi",loginToLopolis:"prijava v Lopolis",loginToLopolisNote:"izgleda, da niste prijavljeni v eRestavracijo, zato se vam je prikazal prijavni obrazec. Za uporavljanje s prehrano se uporablja druga kombinacija uporabniškega imena in gesla, zato se prijavite s svojimi Lopolis prijavnimi podatki za nadaljevanje.",logInToLopolis:"prijava v Lopolis",logOutFromLopolis:"odjava iz Lopolisa",readOnly:"samo za branje",usage:"uporaba",mealsUsageNote:"kliknite na datum za prikaz menijev, nato pa si enega izberite s klikom na ime menija. Po nastavitvi menijev ponovno naložite menije in se prepričajte o pravilnih nastavitvah.",lunchesNote:"aplikacija ni testirana za naročanje na kosila, zato verjetno to ne deluje. Če ste naročeni na kosila lahko naročanje na menije sploh ne deluje ali pa deluje narobe.",mealNotShownNote:"obroki, označeni z zlato so nastavljivi, tisti, označeni s sivo, niso, če pa pri kakšnem dnevu obroka ni, pa pomeni, da ga ni moč nastaviti ali pa da ne obrok ne obstaja",mealsContributeNote:"vabimo vas k urejanju LopolisAPI programa za upravljanje z meniji.",authenticationError:"napaka avtentikacije",lopolisAPIConnectionError:"napaka povezave na LopolisAPI strežnik",errorGettingMenus:"napaka branja menijev",errorUnexpectedResponse:"napaka: nepričakovan odgovor",requestForAuthenticationFailed:"zahteva za avtentikacijo ni uspela",credentialsMatch:"prijavni podatki so pravilni",errorSettingMeals:"napaka pri nastavljanju menijev",mealSet:"obrok nastavljen! osvežite obroke in se prepričajte sami",selected:"izbrano",meal:"obrok",version:"različica",authors:"avtorji",translatorsForThisLanguage:"prevajalci izbranega jezika",whatIsNew:"kaj je novega",whatsNew:"kaj je novega",reportABug:"prijavite napako",sendASuggestion:"pošljite pripombo/predlog/pohvalo/pritožbo",instagram:"instagram",changelog:"dnevnik sprememb",termsOfUse:"terms of use",termsOfUseDescription:"as a condition of use, you promise not to use the BežiApp (App or application) and its related infrastructure (API, hosting service) for any purpose that is unlawful or prohibited by these Terms, or any other purpose not reasonably intended by the authors of the App. By way of example, and not as a limitation, you agree not to use the App",termsOfUseHarass:"to abuse, harass, threaten, impersonate or intimidate any person",termsOfUsePost:"to post or transmit, or cause to be posted or transmitted, any Content that is libelous, defamatory, obscene, pornographic, abusive, offensive, profane or that infringes any copyright or other right of any person",termsOfUseCommunicate:"to communicate with the App developers or other users in abusive or offensive manner",termsOfUsePurpose:"for any purpose that is not permitted under the laws of the jurisdiction where you use the App",termsOfUseExploit:"to post or transmit, or cause to be posted or transmitted, any Communication designed or intended to obtain password, account or private information of any App user",termsOfUseSpam:"to create or transmit unwanted “spam” to any person or any URL",termsOfUseModify:"you may also not reverse engineer, modify or redistribute the app without written consent from the developers",terminationOfServices:"termination of services",terminationOfServicesDescriptions:"the developers of the App may terminate your access to the App without any prior warning or notice for any of the following reasons",terminationOfServicesBreaching:"breaching the Terms of Service",terminationOfServicesRequest:"receiving a formal request from authorities of Gimnazija Bežigrad administration requesting termination of your access to the App",limitationOfLiability:"limitation of Liability",limitationOfLiabilityContent:"the developers of the App provide no warranty; You expressly acknowledge and agree that the use of the licensed application is at your sole risk. To the maximum extent permited by applicable law, the licensed application and any services performed of provided by the licensed application are provided “as is” and “as available”, with all faults and without warranty of any kind, and licensor hereby disclaims all warranties and conditions with respect to the licensed application and any services, either express, implied or statutory, including, but not limited to, the implied warranties and/or conditions of merchantability, of satisfactory quality, of fitness for a particular purpose, of accuracy, of quiet enjoyment, and of noninfringement of third-party rights. No oral or written information or advice given by licensor or its authorized representative shall create a warranty. Should the licensed application or services prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some jurisdictions do not allow the exclusion of the implied warranties or limitations on applicable statutory rights of a customer, so the above exclusion may not apply to you.",tosAreEffectiveAsOf:"the Terms of Service are effective as of",privacyImportant:"your privacy is important to us. It is the developers' policy to respect your privacy regarding any information we may collect from you through our app, BežiApp.",privacyOnlyAskedWhen:"we only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.",privacyDataCollection:"we only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.",privacySharingData:"we don’t share any personally identifying information publicly or with third-parties, except when required to by law",privacyExternalSites:"our app may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.",privacyRefuse:"you are free to refuse our request for your personal information, with the understanding that we may be unable to provide you with some of your desired services.",privacyAcceptWithUse:"your continued use of our website will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how we handle user data and personal information, feel free to contact us.",privacyEffectiveAsOf:"this policy is effective as of",language:"jezik",selectLanguage:"izberite željen jezik",languageSet:"jezik nastavljen, odprite neko drugo stran da se pokažejo spremembe",theme:"izgled",themeLight:"svetel izgled (privzeto)",themeDark:"temen izgled",themeNight:"nočni izgled",themeSet:"izgled nastavljen, odprite neko drugo stran da se spremembe uveljavijo",selectTheme:"izberite željen izgled",errorReportingSet:"nastavitev pošiljanja napak izbrana",errorReporting:"pošiljanje napak",on:"vklopljeno",off:"izklopljeno",selectErrorReporting:"ali naj so napake v aplikaciji posredovane razvijalcem?",triggerWarning:"spodnji gumb omogoči dodatne možnosti, ki lahko razburijo/vznevoljijo nekatere uporabnike. Če omogočite stikalo, se strinjate, da avtorjev in/ali njihovih osebnih prepričanj ne boste povezovali s katerokoli od dodatnih omogočenih možnosti",triggerAgreement:"strinjam se z zgoraj navedenimi pogoji",triggerWarningSet:"spremenili ste stanje dodatnih nastavitev",additionalOptions:"dodatne nastavitve",gsecErrNet:"napaka povezave na GimSIS",gsecErrLogin:"prijava v GimSIS ni uspela (napačno geslo?), poskusite se odjaviti",gsecErrOther:"neznana napaka GimSISa, poskusite se odjaviti",videoconferences:"GimB konference"}} \ No newline at end of file
diff --git a/dist/js/meals.js b/dist/js/meals.js
index 6bec928..adaf275 100755
--- a/dist/js/meals.js
+++ b/dist/js/meals.js
@@ -1,5 +1,7 @@
-const API_ENDPOINT="https://lopolis-api.gimb.tk/";async function checkLogin(){localforage.getItem("logged_in_lopolis").then((value)=>{if(value!=true){$("#meals-container").hide();$("#meals-login-container").show();}else{$("#meals-container").show();$("#meals-login-container").hide();loadMeals();}}).catch((err)=>{console.log(err);});}
+const API_ENDPOINT="https://lopolis-api.gimb.tk/";var meals_calendar_obj=null;var meals_data_global={};function getDateString(){let date=new Date();let year_str=date.getFullYear();let month_str=date.getMonth()+1
+month_str=month_str.toString().padStart(2,"0");let day_str=date.getDate();day_str=day_str.toString().padStart(2,"0");let date_string=year_str+"-"+month_str+"-"+day_str;return date_string;}
+async function checkLogin(){localforage.getItem("logged_in_lopolis").then((value)=>{if(value!=true){$("#meals-container").hide();$("#meals-login-container").show();}else{$("#meals-container").show();$("#meals-login-container").hide();loadMeals();}}).catch((err)=>{console.log(err);});}
function setLoading(state){if(state){$("#loading-bar").removeClass("hidden");}else{$("#loading-bar").addClass("hidden");}}
async function getToken(callback,callbackparams=[]){setLoading(true);let promises_to_run=[localforage.getItem("lopolis_username").then((value)=>{username=value;}),localforage.getItem("lopolis_password").then((value)=>{password=value;})];await Promise.all(promises_to_run);$.ajax({url:API_ENDPOINT+"gettoken",crossDomain:true,contentType:"application/json",data:JSON.stringify({"username":username,"password":password}),dataType:"json",cache:false,type:"POST",success:(dataauth)=>{if(dataauth==null||dataauth.error==true){UIAlert(D("authenticationError"),"getToken(): response error or null");localforage.setItem("logged_in_lopolis",false).then(function(){checkLogin();});}else if(dataauth.error==false){let empty={};empty.token=dataauth.data;let argumentsToCallback=[empty].concat(callbackparams);callback(...argumentsToCallback);}else{UIAlert(D("authenticationError"),"getToken(): invalid response, no condition met");}
setLoading(false);},error:()=>{UIAlert(D("lopolisAPIConnectionError"),"getToken(): AJAX error");setLoading(false);}});}
@@ -7,21 +9,22 @@ async function getMenus(dataauth,callback,callbackparams=[]){setLoading(true);le
await Promise.all(promises_to_wait_for);let allmeals={};let passtocallback={};for(const[index,monthmeals]of Object.entries(mealsgathered)){allmeals=mergeDeep(allmeals,monthmeals.data);}
passtocallback.data=allmeals;passtocallback.token=dataauth.token;let toBePassed=[passtocallback].concat(callbackparams);callback(...toBePassed);}
async function loadMeals(){getToken(getMenus,[displayMeals,[]]);}
-function displayMeals(meals){let root_element=document.getElementById("meals-collapsible");for(const[date,mealzz]of Object.entries(meals.data)){let unabletochoosequestionmark="";let readonly=mealzz.readonly;var datum=new Date(date);let subject_entry=document.createElement("li");let subject_header=document.createElement("div");subject_header.classList.add("collapsible-header");subject_header.classList.add("collapsible-header-root");let subject_header_text=document.createElement("span");if(mealzz.readonly){unabletochoosequestionmark=`*${S("readOnly")}*`;}
-subject_header_text=`${dateString.day(datum.getDay())}, ${datum.getDate()}. ${dateString.month(datum.getMonth())} ${datum.getFullYear()} (${mealzz.meal} @ ${mealzz.location}) ${unabletochoosequestionmark}`;let subject_body=document.createElement("div");subject_body.className="collapsible-body";let subject_body_root=document.createElement("ul");subject_body_root.className="collection";for(const[dindex,dmil]of Object.entries(mealzz.menu_options)){let meal_node=document.createElement("li");meal_node.className="collection-item";meal_node.classList.add("collection-item")
-meal_node.classList.add("meal-node");meal_node.dataset["index"]=dindex;if(!readonly){meal_node.onclick=()=>{setMenu(date,dmil.value);}}
-let meal_node_div=document.createElement("div");let meal_lefttext=document.createElement("span");let meal_righttext=document.createElement("div");meal_righttext.className="secondary-content";if(dmil.selected){meal_lefttext.innerHTML=`<i>${dmil.text}</i>`;meal_righttext.innerText=S("selected");}else{meal_lefttext.innerText=dmil.text;meal_righttext.innerText="";}
-meal_node_div.appendChild(meal_lefttext);meal_node_div.appendChild(meal_righttext);meal_node.appendChild(meal_node_div);subject_body_root.appendChild(meal_node);}
-var subject_header_text_span=document.createElement("span");subject_header_text_span.innerText=subject_header_text;subject_header.appendChild(subject_header_text_span);subject_body.append(subject_body_root);subject_entry.append(subject_header);subject_entry.append(subject_body);root_element.append(subject_entry);}
-$("#meals-collapsible").append(root_element);}
-function clearMeals(){const table=document.getElementById("meals-collapsible");while(table.firstChild){table.removeChild(table.firstChild);}}
+function displayMeals(meals){meals_data_global=meals.data;let transformed_meals=[];for(const[date,mealzz]of Object.entries(meals.data)){let bg_color="#877F02";let fg_color="#FFFFFF";if(mealzz.readonly)bg_color="#8d9288";let meal_date=new Date(date+"+00:00");let meal_object={start:meal_date.toISOString().substring(0,10),title:S("meal"),id:date,allDay:true,backgroundColor:bg_color,textColor:fg_color}
+transformed_meals.push(meal_object);}
+meals_calendar_obj.removeAllEvents();meals_calendar_obj.addEventSource(transformed_meals);return;}
+function clearMeals(){meals_calendar_obj.removeAllEvents();}
function refreshMeals(){clearMeals();loadMeals();}
function lopolisLogout(){localforage.setItem("logged_in_lopolis",false);$("#meals-collapsible").html("");checkLogin();}
async function lopolisLogin(){setLoading(true);var usernameEl=$("#meals-username");var passwordEl=$("#meals-password");$.ajax({url:API_ENDPOINT+"gettoken",crossDomain:true,contentType:"application/json",data:JSON.stringify({"username":usernameEl.val(),"password":passwordEl.val()}),dataType:"json",cache:false,type:"POST",success:async function(data){if(data==null){UIAlert(S("requestForAuthenticationFailed"),"lopolisLogin(): date is is null");setLoading(false);usernameEl.val("");passwordEl.val("");}else if(data.error==true){UIAlert(S("loginFailed"),"lopolisLogin(): login failed. data.error is true");usernameEl.val("");passwordEl.val("");setLoading(false);}else{let promises_to_run=[localforage.setItem("logged_in_lopolis",true),localforage.setItem("lopolis_username",usernameEl.val()),localforage.setItem("lopolis_password",passwordEl.val())];await Promise.all(promises_to_run);checkLogin();UIAlert("Credential match!");}},error:()=>{UIAlert(D("loginError"),"lopolisLogin(): ajax.error");setLoading(false);}});}
async function setMenus(currentmeals=69,toBeSentChoices){if(currentmeals===69){getToken(getMenus,[setMenus,toBeSentChoices]);return;}
-for(const[mealzzdate,mealzz]of Object.entries(currentmeals.data)){if(mealzzdate in toBeSentChoices===false){for(const[mealid,mealdata]of Object.entries(mealzz.menu_options)){console.log(mealdata);if(mealdata.selected==true||mealzz.readonly==true){toBeSentChoices[mealzzdate]=mealdata.value;break;}}}}
+for(const[mealzzdate,mealzz]of Object.entries(currentmeals.data)){if(mealzzdate in toBeSentChoices===false){for(const[mealid,mealdata]of Object.entries(mealzz.menu_options)){if(mealdata.selected==true||mealzz.readonly==true){toBeSentChoices[mealzzdate]=mealdata.value;break;}}}}
setLoading(true);$.ajax({url:API_ENDPOINT+"setmenus",crossDomain:true,contentType:"application/json",data:JSON.stringify({"choices":toBeSentChoices}),headers:{"Authorization":"Bearer "+currentmeals.token},dataType:"json",cache:false,type:"POST",success:(response)=>{if(response===null||response.error==true){UIAlert(D("errorSettingMeals"),"setMenus(): response error or null");}else if(response.error==false){UIAlert(D("mealSet"),"setMenus(): meni nastavljen");}else{UIAlert(D("errorUnexpectedResponse"),"setMenus(): invalid response, no condition met");}
setLoading(false);},error:()=>{setLoading(false);UIAlert(D("lopolisAPIConnectionError"),"setMenus(): AJAX error");}});}
async function setMenu(date,menu){let choice={};choice[date]=menu;getToken(getMenus,[setMenus,choice]);}
function setupEventListeners(){$("#meals-login").click(()=>{lopolisLogin();});$("#meals-logout").click(()=>{lopolisLogout();});}
-document.addEventListener("DOMContentLoaded",async()=>{checkLogin();setupEventListeners();let coll_elem=document.querySelectorAll('.collapsible');M.Collapsible.init(coll_elem,{});$("#refresh-icon").click(function(){refreshMeals();});let elems=document.querySelectorAll('.modal');M.Modal.init(elems,{});const menus=document.querySelectorAll('.side-menu');M.Sidenav.init(menus,{edge:'right',draggable:true});const modals=document.querySelectorAll('.side-modal');M.Sidenav.init(modals,{edge:'left',draggable:false});var elemsx=document.querySelectorAll('select');M.FormSelect.init(elemsx);var datepickerelems=document.querySelectorAll('.datepicker');var today=new Date();M.Datepicker.init(datepickerelems,{firstDay:1,minDate:today,showDaysInNextAndPreviousMonths:true,showClearBtn:true,format:"dddd, dd. mmmm yyyy"});refreshMeals();}); \ No newline at end of file
+var mealClickHandler=(eventClickInfo)=>{let meal_date=eventClickInfo.event.id;let meal_object=meals_data_global[meal_date];$("#meal-type").text(meal_object.meal);let meal_date_obj=new Date(meal_date);$("#meal-date").text(dateString.longFormatted(meal_date_obj));if(!(meal_object.readonly)){document.getElementById("meal-readonly").style.display="none";}else{document.getElementById("meal-readonly").style.display="block";}
+document.getElementById("meal-options").innerHTML="";for(const[option_index,option_object]of Object.entries(meal_object.menu_options)){let menu_option_li_el=document.createElement("li");let menu_option_a_el=document.createElement("button");menu_option_a_el.innerText=option_object.text;let classlist="";if(option_object.selected!=null){if(option_object.selected){classlist="color: green; font-weight: bold";}}
+menu_option_a_el.classList="waves-effect waves-light btn-large";menu_option_a_el.style="color: var(--color-text); background-color: rgba(0,0,0,0); line-height: 1.2; height:auto; "+classlist+" !important";menu_option_a_el.id="menu_index_"+option_index;if(!(meal_object.readonly)){menu_option_a_el.onclick=()=>{setMenu(meal_date,option_object.value);menu_option_a_el.className="to-be-selected-meal";let sidenav_element=document.getElementById("meal-info");let sidenav_instance=M.Sidenav.getInstance(sidenav_element);sidenav_instance.close();};}
+menu_option_li_el.appendChild(menu_option_a_el);document.getElementById("meal-options").appendChild(menu_option_li_el);}
+let sidenav_element=document.getElementById("meal-info");let sidenav_instance=M.Sidenav.getInstance(sidenav_element);sidenav_instance.open();}
+document.addEventListener("DOMContentLoaded",async()=>{checkLogin();var calendarEl=document.getElementById("meals-calendar");meals_calendar_obj=new FullCalendar.Calendar(calendarEl,{firstDay:1,plugins:["dayGrid"],defaultDate:getDateString(),navLinks:false,editable:false,events:[],eventClick:mealClickHandler,height:"parent"});meals_calendar_obj.render();setupEventListeners();$("#refresh-icon").click(function(){refreshMeals();});const menus=document.querySelectorAll('.side-menu');M.Sidenav.init(menus,{edge:'right',draggable:true});const modals=document.querySelectorAll('.side-modal');M.Sidenav.init(modals,{edge:'left',draggable:false});document.getElementsByClassName("fc-today-button")[0].style="display:none !important";var elemsx=document.querySelectorAll('select');M.FormSelect.init(elemsx);var datepickerelems=document.querySelectorAll('.datepicker');var today=new Date();M.Datepicker.init(datepickerelems,{firstDay:1,minDate:today,showDaysInNextAndPreviousMonths:true,showClearBtn:true,format:"dddd, dd. mmmm yyyy"});refreshMeals();}); \ No newline at end of file
diff --git a/dist/manifest.json b/dist/manifest.json
index b8bf5da..99fd18d 100755
--- a/dist/manifest.json
+++ b/dist/manifest.json
@@ -55,5 +55,12 @@
"education",
"productivity",
"utilities"
- ]
-} \ No newline at end of file
+ ],
+ "prefer_related_applications": true,
+ "related_applications": [
+ {
+ "platform": "play",
+ "id": "tk.gimb.app"
+ }
+ ]
+}
diff --git a/dist/pages/about.html b/dist/pages/about.html
index 2858f1d..b501109 100755
--- a/dist/pages/about.html
+++ b/dist/pages/about.html
@@ -76,7 +76,7 @@
<!-- One day in the future we may have sw cache version covered by this as well -->
<h5 class="subheader">
<x-su>version</x-su>
- 1.0.14.5-beta
+ 1.0.15.0-beta
</h5>
</div>
</div>
@@ -160,7 +160,7 @@
<div class="row">
<p>
<small>
- ^HEAD 47006bdae8d53e0bb33110f149730962e5591f4d
+ ^HEAD a0a53bec5f61439dece140798235114a0164e26d
</small>
</p>
</div>
diff --git a/dist/pages/changelog.html b/dist/pages/changelog.html
index 2fbf933..9f8cbab 100755
--- a/dist/pages/changelog.html
+++ b/dist/pages/changelog.html
@@ -2,150 +2,161 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <meta name="google" content="notranslate">
- <title>Changelog &laquo; BežiApp</title>
-
- <!-- Materialize -->
- <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
- <link href="/css/materialicons.css" rel="stylesheet">
- <link href="/css/fontawesome.min.css" rel="stylesheet">
- <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
-
- <script src="/js/lib/jquery.min.js"></script>
- <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
-
- <link type="text/css" href="/css/styles.css" rel="stylesheet">
- <script type="text/javascript" src="/js/changelog.js"></script>
-
- <link rel="manifest" href="/manifest.json">
- <script src="/js/app.js"></script>
- <script src="/js/lib/themes.js"></script>
- <script src="/js/lang/bundle.js"></script>
- <link rel="shortcut icon" type="image/png" href="/favicon.png" />
-
- <!-- iOS support -->
- <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
- <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
- <meta name="apple-mobile-web-app-status-bar" content="#004d32">
-</head>
-
-<body>
- <nav class="z-depth-0" id="navigation-main">
- <div class="nav-wrapper container">
- <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>changelog</x-su>
- <span class="right white-text" id="nav-back-button">
- <i class="material-icons">arrow_back</i>
- </span>
- </div>
- <div id="loading-bar" class="progress hidden">
- <div class="indeterminate"></div>
- </div>
- </nav>
-
- <div class="container">
- <div class="row">
- <h3 class="general-text"><x-su>changelog</x-su></h3>
- <ul class="collapsible">
- <li>
- <div class="collapsible-header">Version 1.0.14-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added themes (dark, light, night, defaulting to light)</li>
- <li class="collection-item">"Additional options" (before anyone gets triggered, their order <i>is</i> random)</li>
- <li class="collection-item">New messaging look</li>
- <li class="collection-item">Messaging has been overhauled, now better then ever. Powered by GimSIS™</li>
- <li class="collection-item">Added videoconferencing (via video.gimb)</li>
- <li class="collection-item">More network requests go directly to GimSISExt (with gsec.js)</li>
- <li class="collection-item">Many bug fixes</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.13-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Various bug fixes</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.12-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Now update does not clear whole database => you stay logged in</li>
- <li class="collection-item">Added multilanguage support</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.11-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added end-to-end encrypton support to messaging</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.10-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added meals</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.9-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added image sending support to messaging</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.8-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Added messaging</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.7-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Enter key now triggers login in the login form</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.6-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Fixed a typo (related to #5)</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.5-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Fixed default view on startup</li>
- <li class="collection-item">Changed promise handling in gradings (#5)</li>
- </ul>
- </div>
-
- <div class="collapsible-header">Version 1.0.4-beta</div>
- <div class="collapsible-body">
- <ul class="collection">
- <li class="collection-item">Introduced the changelog</li>
- <li class="collection-item">Fixed date picker color</li>
- <li class="collection-item">Changed weekly timetable accent color</li>
- <li class="collection-item">Option for including/excluding temporary grades in average
- calculation (credit: Tinkara)</li>
- </ul>
- </div>
- </li>
- </ul>
- </div>
- </div>
-
-</body>
-
-</html>
+ <!DOCTYPE html>
+ <html>
+
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <meta name="google" content="notranslate">
+ <title>Changelog &laquo; BežiApp</title>
+
+ <!-- Materialize -->
+ <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
+ <link href="/css/materialicons.css" rel="stylesheet">
+ <link href="/css/fontawesome.min.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
+
+ <script src="/js/lib/jquery.min.js"></script>
+ <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
+
+ <link type="text/css" href="/css/styles.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/changelog.js"></script>
+
+ <link rel="manifest" href="/manifest.json">
+ <script src="/js/app.js"></script>
+ <script src="/js/lib/themes.js"></script>
+ <script src="/js/lang/bundle.js"></script>
+ <link rel="shortcut icon" type="image/png" href="/favicon.png" />
+
+ <!-- iOS support -->
+ <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
+ <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
+ <meta name="apple-mobile-web-app-status-bar" content="#004d32">
+ </head>
+
+ <body>
+ <nav class="z-depth-0" id="navigation-main">
+ <div class="nav-wrapper container">
+ <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>changelog</x-su>
+ <span class="right white-text" id="nav-back-button">
+ <i class="material-icons">arrow_back</i>
+ </span>
+ </div>
+ <div id="loading-bar" class="progress hidden">
+ <div class="indeterminate"></div>
+ </div>
+ </nav>
+
+ <div class="container">
+ <div class="row">
+ <h3 class="general-text">
+ <x-su>changelog</x-su>
+ </h3>
+ <ul class="collapsible">
+ <li>
+ <div class="collapsible-header">Version 1.0.15-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Changed meals layout</li>
+ </ul>
+ </div>
+
+
+ <div class="collapsible-header">Version 1.0.14-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added themes (dark, light, night, defaulting to light)</li>
+ <li class="collection-item">"Additional options" (before anyone gets triggered, their order <i>is</i> random)</li>
+ <li class="collection-item">New messaging look</li>
+ <li class="collection-item">Messaging has been overhauled, now better then ever. Powered by GimSIS™</li>
+ <li class="collection-item">Added videoconferencing (via video.gimb)</li>
+ <li class="collection-item">More network requests go directly to GimSISExt (with gsec.js)</li>
+ <li class="collection-item">Many bug fixes</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.13-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Various bug fixes</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.12-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Now update does not clear whole database => you stay logged in</li>
+ <li class="collection-item">Added multilanguage support</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.11-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added end-to-end encrypton support to messaging</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.10-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added meals</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.9-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added image sending support to messaging</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.8-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Added messaging</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.7-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Enter key now triggers login in the login form</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.6-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Fixed a typo (related to #5)</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.5-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Fixed default view on startup</li>
+ <li class="collection-item">Changed promise handling in gradings (#5)</li>
+ </ul>
+ </div>
+
+ <div class="collapsible-header">Version 1.0.4-beta</div>
+ <div class="collapsible-body">
+ <ul class="collection">
+ <li class="collection-item">Introduced the changelog</li>
+ <li class="collection-item">Fixed date picker color</li>
+ <li class="collection-item">Changed weekly timetable accent color</li>
+ <li class="collection-item">Option for including/excluding temporary grades in average
+ calculation (credit: Tinkara)</li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+
+ </body>
+
+ </html>
diff --git a/dist/pages/gradings.html b/dist/pages/gradings.html
index ce30046..c2c9d7b 100755
--- a/dist/pages/gradings.html
+++ b/dist/pages/gradings.html
@@ -2,61 +2,62 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <meta name="google" content="notranslate">
- <title>Gradings &laquo; BežiApp</title>
-
- <!-- Materialize -->
- <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
- <link href="/css/materialicons.css" rel="stylesheet">
- <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
-
- <script src="/js/lib/jquery.min.js"></script>
- <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
-
- <!-- FullCalendar -->
- <link href="/css/fullcalendar/core/main.min.css" rel="stylesheet" />
- <link href="/css/fullcalendar/daygrid/main.min.css" rel="stylesheet" />
- <link href="/css/fullcalendar/custom.css" rel="stylesheet" />
- <script src="/js/lib/fullcalendar/core/main.min.js"></script>
- <script src="/js/lib/fullcalendar/daygrid/main.min.js"></script>
-
- <link type="text/css" href="/css/styles.css" rel="stylesheet">
- <script type="text/javascript" src="/js/gsec.js"></script> <!-- gimsisextclient -->
- <script type="text/javascript" src="/js/gradings.js"></script>
-
- <link rel="manifest" href="/manifest.json">
- <script src="/js/app.js"></script>
- <script src="/js/lib/themes.js"></script>
- <script src="/js/lang/bundle.js"></script>
- <link rel="shortcut icon" type="image/png" href="/favicon.png" />
-
- <!-- iOS support -->
- <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
- <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
- <meta name="apple-mobile-web-app-status-bar" content="#004d32">
-</head>
-
-<body>
- <nav class="z-depth-0" id="navigation-main">
- <div class="nav-wrapper container">
- <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>gradings</x-su>
- <span class="right white-text">
- <i class="material-icons sidenav-trigger" data-target="side-menu">menu</i>
- </span>
- <span class="right white-text" id="refresh-icon">
- <a href="#"><i class="material-icons">refresh</i></a>
- </span>
- </div>
- <div id="loading-bar" class="progress hidden">
- <div class="indeterminate"></div>
- </div>
- </nav>
+ <!DOCTYPE html>
+ <html>
+
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <meta name="google" content="notranslate">
+ <title>Gradings &laquo; BežiApp</title>
+
+ <!-- Materialize -->
+ <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
+ <link href="/css/materialicons.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
+
+ <script src="/js/lib/jquery.min.js"></script>
+ <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
+
+ <!-- FullCalendar -->
+ <link href="/css/fullcalendar/core/main.min.css" rel="stylesheet" />
+ <link href="/css/fullcalendar/daygrid/main.min.css" rel="stylesheet" />
+ <link href="/css/fullcalendar/custom.css" rel="stylesheet" />
+ <script src="/js/lib/fullcalendar/core/main.min.js"></script>
+ <script src="/js/lib/fullcalendar/daygrid/main.min.js"></script>
+
+ <link type="text/css" href="/css/styles.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/gsec.js"></script> <!-- gimsisextclient -->
+ <script type="text/javascript" src="/js/gradings.js"></script>
+
+ <link rel="manifest" href="/manifest.json">
+ <script src="/js/app.js"></script>
+ <script src="/js/lib/themes.js"></script>
+ <script src="/js/lang/bundle.js"></script>
+ <link rel="shortcut icon" type="image/png" href="/favicon.png" />
+
+ <!-- iOS support -->
+ <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
+ <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
+ <meta name="apple-mobile-web-app-status-bar" content="#004d32">
+ </head>
+
+ <body>
+ <nav class="z-depth-0" id="navigation-main">
+ <div class="nav-wrapper container">
+ <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>gradings</x-su>
+ <span class="right white-text">
+ <i class="material-icons sidenav-trigger" data-target="side-menu">menu</i>
+ </span>
+ <span class="right white-text" id="refresh-icon">
+ <a href="#"><i class="material-icons">refresh</i></a>
+ </span>
+ </div>
+ <div id="loading-bar" class="progress hidden">
+ <div class="indeterminate"></div>
+ </div>
+ </nav>
<ul id="side-menu" class="sidenav side-menu">
<li><a class="subheader"><h4 class="sidenav-beziapp-subheader"><b>Beži</b>App</h4></a></li>
<li><a href="/pages/timetable.html" class="waves-effect"><i class="material-icons">view_module</i><x-su>timetable</x-su></a></li>
@@ -75,34 +76,34 @@
<li><a href="/pages/settings.html" class="waves-effect"><i class="material-icons">settings</i><x-su>settings</x-su></a></li>
</ul>
- <ul id="grading-info" class="sidenav side-modal">
- <br>
- <li><a class="header">
- <h5 id="grading-subject"></h5>
- </a></li>
- <li>
- <a class="subheader">
- <h6 id="grading-date"></h6>
- </a>
- </li>
- <div class="divider"></div>
- </li>
- <li><a class="waves-effect" id="grading-description"></a></li>
- </ul>
-
-
- <div class="container">
- <br>
- <div id="calendar"></div>
- </div>
-
- <!-- FAB -->
- <!-- <div class="fixed-action-btn" id="fab-new">
+ <ul id="grading-info" class="sidenav side-modal">
+ <br>
+ <li><a class="header">
+ <h5 id="grading-subject"></h5>
+ </a></li>
+ <li>
+ <a class="subheader">
+ <h6 id="grading-date"></h6>
+ </a>
+ </li>
+ <div class="divider"></div>
+ </li>
+ <li><a class="waves-effect" id="grading-description"></a></li>
+ </ul>
+
+
+ <div class="container">
+ <br>
+ <div id="calendar"></div>
+ </div>
+
+ <!-- FAB -->
+ <!-- <div class="fixed-action-btn" id="fab-new">
<a class="btn-floating btn-large fab-new-message modal-trigger" href="#beziapp-add-grading">
<i class="large material-icons">add</i>
</a>
</div> -->
- <!-- Modal Structure -->
+ <!-- Modal Structure -->
<div id="beziapp-add-grading" class="modal modal-fixed-footer">
<div class="modal-content">
@@ -139,6 +140,6 @@
-</body>
+ </body>
-</html>
+ </html
diff --git a/dist/pages/meals.html b/dist/pages/meals.html
index 590e761..56e0af3 100755
--- a/dist/pages/meals.html
+++ b/dist/pages/meals.html
@@ -2,54 +2,67 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <meta name="google" content="notranslate">
- <title>Meals &laquo; BežiApp</title>
+ <!DOCTYPE html>
+ <html>
- <!-- Materialize -->
- <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
- <link href="/css/materialicons.css" rel="stylesheet">
- <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <meta name="google" content="notranslate">
+ <title>Meals &laquo; BežiApp</title>
- <script src="/js/lib/jquery.min.js"></script>
- <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
- <script type="text/javascript" src="/js/lib/mergedeep.js"></script>
+ <!-- Materialize -->
+ <link type="text/css" href="/css/materialize.min.css" rel="stylesheet">
+ <link href="/css/materialicons.css" rel="stylesheet">
+ <script type="text/javascript" src="/js/lib/materialize.min.js"></script>
+ <!-- jQuery -->
+ <script src="/js/lib/jquery.min.js"></script>
+ <!-- localForage -->
+ <script type="text/javascript" src="/js/lib/localforage.min.js"></script>
+ <!-- mergedeep.js -->
+ <script type="text/javascript" src="/js/lib/mergedeep.js"></script>
+ <!-- stylesheet for custom styles -->
+ <link type="text/css" href="/css/styles.css" rel="stylesheet">
+ <!-- page-specific javascript code -->
+ <script type="text/javascript" src="/js/meals.js"></script>
+ <!-- PWA manifest -->
+ <link rel="manifest" href="/manifest.json">
+ <!-- app global code -->
+ <script src="/js/app.js"></script>
+ <!-- code for custom theme switcher -->
+ <script src="/js/lib/themes.js"></script>
+ <!-- i18n bundle -->
+ <script src="/js/lang/bundle.js"></script>
+ <!-- favicon -->
+ <link rel="shortcut icon" type="image/png" href="/favicon.png" />
+ <!-- iOS support -->
+ <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
+ <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
+ <meta name="apple-mobile-web-app-status-bar" content="#004d32">
+ <!-- fullCalendar -->
+ <link href="/css/fullcalendar/core/main.min.css" rel="stylesheet" />
+ <link href="/css/fullcalendar/daygrid/main.min.css" rel="stylesheet" />
+ <link href="/css/fullcalendar/custom.css" rel="stylesheet" />
+ <script src="/js/lib/fullcalendar/core/main.min.js"></script>
+ <script src="/js/lib/fullcalendar/daygrid/main.min.js"></script>
+ </head>
- <link type="text/css" href="/css/styles.css" rel="stylesheet">
- <script type="text/javascript" src="/js/meals.js"></script>
-
- <link rel="manifest" href="/manifest.json">
- <script src="/js/app.js"></script>
- <script src="/js/lib/themes.js"></script>
- <script src="/js/lang/bundle.js"></script>
- <link rel="shortcut icon" type="image/png" href="/favicon.png" />
-
- <!-- iOS support -->
- <link rel="apple-touch-icon" href="/img/icons/icon_96.png">
- <link rel="apple-touch-icon" href="/img/icons/icon_512.png">
- <meta name="apple-mobile-web-app-status-bar" content="#004d32">
-</head>
-
-<body>
- <nav class="z-depth-0" id="navigation-main">
- <div class="nav-wrapper container">
- <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>meals</x-su>
- <span class="right white-text">
- <i class="material-icons sidenav-trigger" data-target="side-menu">menu</i>
- </span>
- <span class="right white-text" id="refresh-icon">
- <a href="#"><i class="material-icons">refresh</i></a>
- </span>
- </div>
- <div id="loading-bar" class="progress hidden">
- <div class="indeterminate"></div>
- </div>
- </nav>
+ <body>
+ <nav class="z-depth-0" id="navigation-main">
+ <div class="nav-wrapper container">
+ <b class="app-header-bold">Beži</b><span class="app-header-span">App</span> &raquo; <x-su>meals</x-su>
+ <span class="right white-text">
+ <i class="material-icons sidenav-trigger" data-target="side-menu">menu</i>
+ </span>
+ <span class="right white-text" id="refresh-icon">
+ <a href="#"><i class="material-icons">refresh</i></a>
+ </span>
+ </div>
+ <div id="loading-bar" class="progress hidden">
+ <div class="indeterminate"></div>
+ </div>
+ </nav>
<ul id="side-menu" class="sidenav side-menu">
<li><a class="subheader"><h4 class="sidenav-beziapp-subheader"><b>Beži</b>App</h4></a></li>
<li><a href="/pages/timetable.html" class="waves-effect"><i class="material-icons">view_module</i><x-su>timetable</x-su></a></li>
@@ -68,69 +81,98 @@
<li><a href="/pages/settings.html" class="waves-effect"><i class="material-icons">settings</i><x-su>settings</x-su></a></li>
</ul>
- <br>
- <div class="container login" hidden="hidden" id="meals-login-container">
- <h4 class="general-text"><x-su>loginToLopolis</x-su></h4>
- <p class="general-text">
- <x-du>loginToLopolisNote</x-du>
- </p>
- <div class="row">
- <div class="col s12">
- <div class="row">
- <div class="input-field col s12">
- <input id="meals-username" type="text" value="" required="required" name="meals_password" class="validate">
- <label for="meals-username">Lopolis <x-su>username</x-su></label>
- </div>
- </div>
- <div class="row">
- <div class="input-field col s12">
- <input autocomplete="new-password" id="meals-password" type="password" value="" required="required" name="meals_password" class="validate">
- <label for="meals-password">Lopolis <x-su>password</x-su></label>
- </div>
- </div>
- <div class="row">
- <div class="input-field col s12">
- <button id="meals-login" type="button" class="waves-effect waves-light btn">
- <x-su>loginToLopolis</x-su>
- <i class="material-icons right">arrow_right_alt</i>
- </button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="meals-container container" hidden="hidden" id="meals-container">
- <h4>Meals
- <button id="meals-logout" type="button" class="waves-effect waves-light btn" style="float: right">
- <x-su>logOutFromLopolis</x-su>
- <i class="material-icons right">exit_to_app</i>
- </button>
- </h4>
- <ul id="meals-collapsible" class="collapsible"></ul>
- <p>
- <small>
- <b>
- <x-su>usage</x-su>:
- </b>
- <x-du>mealsUsageNote</x-du>
- <br>
- <b>
- <x-su>note</x-su>:
- </b>
- <x-du>lunchesNote</x-du>
- <br>
- <b>
- <x-su>note</x-su>:
- </b>
- <x-du>mealNotShownNote</x-du>
- <br>
- <b>
- Note:
- </b>
- <x-du>mealsContributeNote</x-du>
- </small>
- </p>
- </div>
-</body>
+ <ul id=meal-info class="sidenav side-modal">
+ <br>
+ <li>
+ <a class=header>
+ <h5 id=meal-type>
+ </h5>
+ </a>
+ </li>
+ <li>
+ <a class=subheader>
+ <h6 id=meal-date>
+ </h6>
+ </a>
+ </li>
+ <li>
+ <li>
+ <a class="subheader" style="color:red" id="meal-readonly">
+ <x-du>readOnly</x-du>
+ </a>
+ </li>
+ <div class=divider></div>
+ <li id=meal-options>
+
+ </li>
+ </ul>
+ <br>
+ <div class="container login" hidden="hidden" id="meals-login-container">
+ <h4 class="general-text">
+ <x-su>loginToLopolis</x-su>
+ </h4>
+ <p class="general-text">
+ <x-du>loginToLopolisNote</x-du>
+ </p>
+ <div class="row">
+ <div class="col s12">
+ <div class="row">
+ <div class="input-field col s12">
+ <input id="meals-username" type="text" value="" required="required" name="meals_password" class="validate">
+ <label for="meals-username">Lopolis <x-su>username</x-su></label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="input-field col s12">
+ <input autocomplete="new-password" id="meals-password" type="password" value="" required="required" name="meals_password" class="validate">
+ <label for="meals-password">Lopolis <x-su>password</x-su></label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="input-field col s12">
+ <button id="meals-login" type="button" class="waves-effect waves-light btn">
+ <x-su>loginToLopolis</x-su>
+ <i class="material-icons right">arrow_right_alt</i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="meals-container container" hidden="hidden" id="meals-container">
+ <h4><x-su>meals</x-su>
+ <button id="meals-logout" type="button" class="waves-effect waves-light btn" style="float: right">
+ <x-su>logOutFromLopolis</x-su>
+ <i class="material-icons right">exit_to_app</i>
+ </button>
+ </h4>
+ <div id=meals-calendar></div>
+ <!-- <ul id="meals-collapsible" class="collapsible"></ul> -->
+ <!-- deprecated meals UI -->
+ <p>
+ <small>
+ <b>
+ <x-su>usage</x-su>:
+ </b>
+ <x-du>mealsUsageNote</x-du>
+ <br>
+ <b>
+ <x-su>note</x-su>:
+ </b>
+ <x-du>lunchesNote</x-du>
+ <br>
+ <b>
+ <x-su>note</x-su>:
+ </b>
+ <x-du>mealNotShownNote</x-du>
+ <br>
+ <b>
+ Note:
+ </b>
+ <x-du>mealsContributeNote</x-du>
+ </small>
+ </p>
+ </div>
+ </body>
-</html>
+ </html>
diff --git a/dist/sw.js b/dist/sw.js
index 7898010..dcf9d10 100755
--- a/dist/sw.js
+++ b/dist/sw.js
@@ -3,8 +3,8 @@
// Change version to cause cache refresh
-const static_cache_name = "site-static-1.0.14.5-beta-47006bd";
-// commit before the latest is 47006bdae8d53e0bb33110f149730962e5591f4d
+const static_cache_name = "site-static-1.0.15.0-beta-a0a53be";
+// commit before the latest is a0a53bec5f61439dece140798235114a0164e26d
// Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js
// sw.js NE SME BITI CACHAN, ker vsebuje verzijo!
diff --git a/global.bvr b/global.bvr
index 39715d1..74d6617 100644
--- a/global.bvr
+++ b/global.bvr
@@ -1,3 +1,3 @@
<@?s bvr_include_path assets/pages-src/ assets/pages-src/misc/@>
<@?s latest_commit ?u 0 -1 ?i .git/refs/heads/dev@>
-<@?s app_version 1.0.14.5-beta@>
+<@?s app_version 1.0.15.0-beta@>