From 6225daa33e80bc879f27229dc32d8d5cf01f020d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Tue, 2 Aug 2022 11:59:18 +0200 Subject: [PATCH] Display attachment action button in tab container. Form field for attachment move destination. --- themes/default.css | 39 +++++++++++++++++++++++---------------- themes/default.sh | 14 +++++++++----- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/themes/default.css b/themes/default.css index eacc66c..e21c919 100644 --- a/themes/default.css +++ b/themes/default.css @@ -123,39 +123,46 @@ body[id$="/[newpage]"] textarea { margin-right: 1em; } -[id$="/[attachment]"] input[type=radio].tab ~ ul.attachment.list.tab { +[id$="/[attachment]"] input[type=radio].tab ~ div.tab { display: block; - margin-left: 0; padding-top: 1em; +} +[id$="/[attachment]"] input[type=radio].tab ~ div.tab ul.attachment.list { list-style: none; + margin-left: 0; } -ul.attachment.list.tab li input[name=select], -ul.attachment.list.tab li label.name, -ul.attachment.list.tab li a.name, -ul.attachment.list.tab li input.name { +.tab ul li input[name=select], +.tab ul li label.name, +.tab ul li a.name, +.tab ul li input.name { display: none; } -[id$="/[attachment]"] input[type=radio].tab#tview:checked ~ ul li a.name, -[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ ul li input[name=select], -[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ ul li label.name, -[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ ul li input[name=select], -[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ ul li label.name { +[id$="/[attachment]"] input[type=radio].tab#tview:checked ~ div.tab ul li a.name, +[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ div.tab ul li input[name=select], +[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ div.tab ul li label.name, +[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab ul li input[name=select], +[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab ul li label.name { display: inline; } -[id$="/[attachment]"] input[type=radio].tab#tren:checked ~ ul li input.name { +[id$="/[attachment]"] input[type=radio].tab#tren:checked ~ .tab ul li input.name { display: block; } +[id$="/[attachment]"] label[for=moveto], [id$="/[attachment]"] input#moveto, [id$="/[attachment]"] button[name=action] { display: none; } + [id$="/[attachment]"] .upload button[name=action] { display: inline-block; } -[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ button[name=action][value=delete], -[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ button[name=action][value=move], -[id$="/[attachment]"] input[type=radio].tab#tren:checked ~ button[name=action][value=rename] { - display: block; +[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ div.tab button[name=action][value=delete], +[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab label[for=moveto], +[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab input#moveto, +[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab button[name=action][value=move], +[id$="/[attachment]"] input[type=radio].tab#tren:checked ~ div.tab button[name=action][value=rename] { + display: inline; } + /* === Macros === */ .macro.toc { diff --git a/themes/default.sh b/themes/default.sh index 6807242..3c803f4 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -112,7 +112,8 @@ theme_attachments(){ - + + + + + + EOF else -- 2.39.2