diff options
author | B. Stack <bgstack15@gmail.com> | 2024-07-11 09:36:59 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2024-07-11 09:36:59 -0400 |
commit | 77a14762f9b18f68b65b7c91576e3906951806c3 (patch) | |
tree | f62b58abae697d63dfca6b02312d7f3448edb0d2 | |
parent | implement reservations for polaris (diff) | |
download | library-info-77a14762f9b18f68b65b7c91576e3906951806c3.tar.gz library-info-77a14762f9b18f68b65b7c91576e3906951806c3.tar.bz2 library-info-77a14762f9b18f68b65b7c91576e3906951806c3.zip |
html table width 100%
-rwxr-xr-x | library_info_cli.py | 5 |
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: |