Skip to content

Commit

Permalink
Tag style table improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Sep 5, 2024
1 parent 10f5b70 commit 5e5de3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -14246,7 +14246,7 @@ function make_input_autogrower(e) {
sh = make_shadow(e),
ws = sh.scrollWidth + borderPadding;
if (Math.max(e.scrollWidth, ws) > Math.min(minWidth, ww)) {
e.style.width = Math.min(ww, Math.max(ws, minWidth)) + "px";
e.style.width = Math.min(ww, Math.max(minWidth, ws)) + "px";
}
}
return f;
Expand Down
4 changes: 2 additions & 2 deletions src/settings/s_tagstyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function prepare_oblist(Si $si, SettingValues $sv) {
static function print(SettingValues $sv) {
echo Ht::hidden("has_tag_style", 1),
"<p>Submissions and PC members tagged with a style name, or with an associated tag, appear in that style in lists.</p>",
'<table class="demargin"><tr><th></th><th class="settings-simplehead" style="min-width:8rem">Style name</th><th class="settings-simplehead">Tags</th><th></th></tr>';
'<table class="demargin"><thead><tr><th></th><th class="settings-simplehead" style="min-width:8rem">Style name</th><th class="settings-simplehead">Tags</th><th></th></tr></thead><tbody class="settings-tag-style-table">';
$dt = $sv->conf->tags();
foreach ($sv->oblist_keys("tag_style") as $ctr) {
$style = $sv->oldv("tag_style/{$ctr}/style");
Expand All @@ -107,7 +107,7 @@ static function print(SettingValues $sv) {
'</td><td class="remargin-right"></td></tr>';
TagMap::stash_ensure_pattern("tag-{$style}");
}
echo Ht::unstash(), '</table>';
echo Ht::unstash(), '</tbody></table>';
}

private function _apply_tag_style_req(Si $si, SettingValues $sv) {
Expand Down
3 changes: 3 additions & 0 deletions stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1905,6 +1905,9 @@ th.settings-simplehead {
.settings-draghandle:hover {
opacity: 1 !important;
}
.settings-tag-style-table input.tags {
width: 25rem;
}
hr.dropmark {
/* Do not use borders and margin, because margin isn't included in parent's
getBorderClientRect */
Expand Down

0 comments on commit 5e5de3d

Please sign in to comment.