summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-03-04 23:56:37 +0100
committerAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-03-04 23:56:37 +0100
commit1836820ff66d474e5326b99213b2cf56ab611df8 (patch)
tree3319be247bf7e0cb70a5f91f58319008295a1e86
parentrewrite of meals.js (diff)
downloadbeziapp-1836820ff66d474e5326b99213b2cf56ab611df8.tar
beziapp-1836820ff66d474e5326b99213b2cf56ab611df8.tar.gz
beziapp-1836820ff66d474e5326b99213b2cf56ab611df8.tar.bz2
beziapp-1836820ff66d474e5326b99213b2cf56ab611df8.tar.lz
beziapp-1836820ff66d474e5326b99213b2cf56ab611df8.tar.xz
beziapp-1836820ff66d474e5326b99213b2cf56ab611df8.tar.zst
beziapp-1836820ff66d474e5326b99213b2cf56ab611df8.zip
-rw-r--r--js/meals.js11
-rw-r--r--pages/meals.html51
-rw-r--r--sw.js2
3 files changed, 62 insertions, 2 deletions
diff --git a/js/meals.js b/js/meals.js
index f283913..097d799 100644
--- a/js/meals.js
+++ b/js/meals.js
@@ -323,4 +323,15 @@ document.addEventListener("DOMContentLoaded", async () => {
// Setup side modal
const modals = document.querySelectorAll('.side-modal');
M.Sidenav.init(modals, { edge: 'left', draggable: false });
+ var elemsx = document.querySelectorAll('select');
+ var instancesx = M.FormSelect.init(elemsx);
+ var datepickerelems = document.querySelectorAll('.datepicker');
+ var today = new Date();
+ var datepickerinstances = M.Datepicker.init(datepickerelems, {
+ firstDay: 1,
+ minDate: today,
+ showDaysInNextAndPreviousMonths: true,
+ showClearBtn: true,
+ format: "dddd, dd. mmmm yyyy"
+ });
});
diff --git a/pages/meals.html b/pages/meals.html
index 9e80ec0..36ba07b 100644
--- a/pages/meals.html
+++ b/pages/meals.html
@@ -135,7 +135,56 @@
</button>
</h4>
<ul id="meals-collapsible" class="collapsible"></ul>
- </div>
+ <!--
+ <div class="row">
+ <div class="input-field col s4">
+ <input type="text" class="datepicker" id="datepicker-from">
+ <label for="datepicker-from" class="active">Date</label>
+ </div>
+ <div class="input-field col s4">
+ <select>
+ <option value="" disabled selected>Meal type</option>
+ <option value="Malica">Malica</option>
+ <option value="Kosilo">Kosilo</option>
+ </select>
+ <label>Meal type</label>
+ </div>
+ <div class="input-field col s4">
+ <button id="meals_checkout" href="#meals_checkout-warning-modal" type="button" class="modal-trigger waves-effect waves-light btn" style="float: right">
+ Checkout from a meal
+ <i class="material-icons right">trending_up</i>
+ </button>
+ </div>
+ </div>
+ <h4>Checkouts</h4>
+
+ <hr>
+ -->
+ <p>
+ <small>
+ <b>
+ Usage:
+ </b>
+ 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.
+ <br>
+ <b>
+ Note:
+ </b>
+ 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.
+ <br>
+ <b>
+ Note:
+ </b>
+ 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 or are unchangable
+ (read-only) are not shown for clarity.
+ <br>
+ <b>
+ Note:
+ </b>
+ You are welcome to contribute to the <a href="https://github.com/rstular/lopolis-api/" target="_blank">LopolisAPI project source (py)</a> and add features, such as checkouts.
+ </small>
+ </p>
+ </div>
</body>
</html>
diff --git a/sw.js b/sw.js
index 861ba19..2feb9f2 100644
--- a/sw.js
+++ b/sw.js
@@ -1,5 +1,5 @@
// Change version to cause cache refresh
-const static_cache_name = "site-static-v1.0.11.2";
+const static_cache_name = "site-static-v1.0.11.3";
// Tukej ne met notr directory namov, samo imena fajlov,
// ker v primeru index.html to prpele do double-cachinga, oz. do velik 404