aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-07-11 09:36:59 -0400
committerB. Stack <bgstack15@gmail.com>2024-07-11 09:36:59 -0400
commit77a14762f9b18f68b65b7c91576e3906951806c3 (patch)
treef62b58abae697d63dfca6b02312d7f3448edb0d2
parentimplement reservations for polaris (diff)
downloadlibrary-info-77a14762f9b18f68b65b7c91576e3906951806c3.tar.gz
library-info-77a14762f9b18f68b65b7c91576e3906951806c3.tar.bz2
library-info-77a14762f9b18f68b65b7c91576e3906951806c3.zip
html table width 100%
-rwxr-xr-xlibrary_info_cli.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/library_info_cli.py b/library_info_cli.py
index 6ffaf21..5416662 100755
--- a/library_info_cli.py
+++ b/library_info_cli.py
@@ -93,7 +93,8 @@ def html(checkouts, reservations):
prn("<span class='eighty'>Last modified: " + now.strftime("%FT%TZ") + "</span>\n")
prn("<h2>Checkouts</h2>\n")
if len(checkouts):
- prn("<table class='display' id='checkouts'>\n")
+ # for some reason, DataTables will let a table resize with browser window resize only if the table object itself has the style. A css entry for "table" does not affect DataTables.
+ prn("<table style='width: 100%;' class='display' id='checkouts'>\n")
prn(f"<thead><tr><th>Patron</th><th>barcode</th><th>due</th><th>format</th><th>cover</th><th>Title</th></tr></thead>\n")
prn("<tbody>\n")
for i in checkouts:
@@ -117,7 +118,7 @@ def html(checkouts, reservations):
prn(f"No checkouts.\n")
prn("<h2>Reservations</h2>\n")
if len(reservations):
- prn(f"<table class='display' id='reservations'>\n")
+ prn(f"<table style='width: 100%;' class='display' id='reservations'>\n")
prn(f"<thead><tr><th>Patron</th><th>date placed</th><th>location</th><th>position</th><th>status</th><th>cover</th><th>title</th></thead>\n")
prn("<tbody>\n")
for i in reservations:
bgstack15