summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/js/lang/bundle.js2
-rw-r--r--assets/js/login.js21
-rw-r--r--assets/js/meals.js5
-rw-r--r--assets/root/login.html3
-rw-r--r--assets/root/server-message-at-login.html6
5 files changed, 32 insertions, 5 deletions
diff --git a/assets/js/lang/bundle.js b/assets/js/lang/bundle.js
index b311bf4..10cfd20 100644
--- a/assets/js/lang/bundle.js
+++ b/assets/js/lang/bundle.js
@@ -447,7 +447,7 @@ var langstrings = {
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 koslila, zato verjetno to ne deluje. Če ste naročeni na kosila lahko naročanje na menije sploh ne deluje ali pa deluje narobe.",
+ 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",
diff --git a/assets/js/login.js b/assets/js/login.js
index cdecf38..88bf501 100644
--- a/assets/js/login.js
+++ b/assets/js/login.js
@@ -1,7 +1,24 @@
// const API_ENDPOINT = "https://gimb.tk/test.php"; // deprecated
document.addEventListener("DOMContentLoaded", () => {
- setupEventListeners();
-})
+ setupEventListeners();
+ try {
+ load_server_message_at_login();
+ } catch (e) {
+ console.log("login.js: load_server-message-at-login: silently failed.");
+ }
+});
+
+function load_server_message_at_login() {
+ $.ajax({
+ url: "/server-message-at-login.html",
+ success: (data) => {
+ $("#server-message-at-login").html(data);
+ },
+ error: () => {
+ $("#server-message-at-login").html("");
+ }
+ });
+}
function setupEventListeners() {
// Setup login button listener
diff --git a/assets/js/meals.js b/assets/js/meals.js
index 78de032..891feae 100644
--- a/assets/js/meals.js
+++ b/assets/js/meals.js
@@ -209,8 +209,9 @@ function displayMeals(meals) {
meal_node.appendChild(meal_node_div);
subject_body_root.appendChild(meal_node);
}
-
- subject_header.appendChild(subject_header_text);
+ 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);
diff --git a/assets/root/login.html b/assets/root/login.html
index 542b157..95bcc2e 100644
--- a/assets/root/login.html
+++ b/assets/root/login.html
@@ -60,6 +60,9 @@
<a href="/pages/privacypolicy.html"><x-dl>thePrivacyPolicy</x-dl></a>
</p>
</div>
+ <div class="row" id="server-message-at-login">
+
+ </div>
</div>
</div>
</body>
diff --git a/assets/root/server-message-at-login.html b/assets/root/server-message-at-login.html
new file mode 100644
index 0000000..d0ec9e2
--- /dev/null
+++ b/assets/root/server-message-at-login.html
@@ -0,0 +1,6 @@
+<h5>
+ Opozorilo razvijalcev / developer's note:
+</h5>
+<p>
+ Srečno v novem šolskem letu 2020/21!
+</p>