diff options
author | Sebastian Reichel <sre@ring0.de> | 2018-07-18 00:56:23 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2018-07-18 01:24:48 +0200 |
commit | 568c2be3c328a272f7a872c3fc67b61af3c4e797 (patch) | |
tree | 8a4dd6bcfd41cf92e2625b54b79618b97ee2d7fc /data/templates/products | |
parent | 59997697f56e73d2323f8ec4be0d2581055063f8 (diff) | |
download | serial-barcode-scanner-568c2be3c328a272f7a872c3fc67b61af3c4e797.tar.bz2 |
web: use datatables instead of sortable
Diffstat (limited to 'data/templates/products')
-rw-r--r-- | data/templates/products/bestbefore.html | 8 | ||||
-rw-r--r-- | data/templates/products/index.html | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/data/templates/products/bestbefore.html b/data/templates/products/bestbefore.html index dbc7f47..721ea9d 100644 --- a/data/templates/products/bestbefore.html +++ b/data/templates/products/bestbefore.html @@ -1,4 +1,4 @@ -<table class="sortable table table-bordered table-striped table-condensed"> +<table id="producttable" class="table table-bordered table-striped table-condensed"> <thead> <tr><th>EAN</th></th><th>Name</th><th>Amount</th><th>Best Before Date</th></tr> </thead> @@ -6,3 +6,9 @@ {{{DATA}}} </tbody> </table> + +<script type="text/javascript"> +$(document).ready(function() { + $('#producttable').DataTable(); +} ); +</script> diff --git a/data/templates/products/index.html b/data/templates/products/index.html index 5e432c0..38d9909 100644 --- a/data/templates/products/index.html +++ b/data/templates/products/index.html @@ -1,6 +1,6 @@ <a href="/products/bestbefore">product list with best before dates</a> -<table class="sortable table table-bordered table-striped table-condensed"> +<table id="producttable" class="table table-bordered table-striped table-condensed"> <thead> <tr><th>EAN</th></th><th>Name</th><th>Category</th><th>Amount</th><th>Memberprice</th><th>Guestprice</th></tr> </thead> @@ -24,3 +24,9 @@ </div> </form> </div> + +<script type="text/javascript"> +$(document).ready(function() { + $('#producttable').DataTable(); +} ); +</script> |