From f76ecd2267401b1faacbc630ffd05a69322e629a Mon Sep 17 00:00:00 2001 From: gravel Date: Tue, 18 Apr 2023 13:27:01 +0200 Subject: [PATCH] Helpful table tooltips & fix sortable check --- sites/+components/tbl_communities.php | 42 ++++++++++++++++++--------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/sites/+components/tbl_communities.php b/sites/+components/tbl_communities.php index 48c1c2f..8ea6846 100644 --- a/sites/+components/tbl_communities.php +++ b/sites/+components/tbl_communities.php @@ -9,15 +9,15 @@ // Once handlers are attached in JS, this check ceases to be useful. function column_sortable($id) { // Join URL contents are not guaranteed to have visible text. - return $id != "qr" && $id != "preview" && $id != "join_url"; + return $id != "qr_code" && $id != "preview" && $id != "join_url"; } function sort_onclick($colno) { global $TABLE_COLUMNS; $column = $TABLE_COLUMNS[$colno]; $name = isset($column['name_long']) ? $column['name_long'] : $column['name']; - if (!column_sortable($column['id'])) return " title='Column: $name'"; - return " title='Click to sort by $name'"; + if (!column_sortable($column['id'])) return " title='$name'"; + return " title='Click to sort by $name'."; } // Note: Changing the names displayed requires updating @@ -30,9 +30,9 @@ ['id' => "description", 'name' => "About", 'name_long' => "Description"], ['id' => "users", 'name' => "#", 'name_long' => "Weekly Active Users"], ['id' => "preview", 'name' => "Preview"], - ['id' => "qr_code", 'name' => "QR"], + ['id' => "qr_code", 'name' => "QR", 'name_long' => "QR Code (for use in-app)"], ['id' => "server_icon", 'name' => "Host", 'name_long' => "Server host"], - ['id' => "join_url", 'name' => "URL", 'name_long' => "In-app Join URL"], + ['id' => "join_url", 'name' => "URL", 'name_long' => "Join URL (for use in-app)"], ]; ?> @@ -70,15 +70,24 @@ data-hostname="" > - - - - name?> + + + + - - + + @@ -89,11 +98,12 @@ class="qr-code-icon" src="qrcode-solid.svg" alt="Pictogram of a QR code" + title="Click here to view the QR Code for ''" >
@@ -104,8 +114,12 @@