From dcf73ef720f872f1d61834e9008641d3ec3d489a Mon Sep 17 00:00:00 2001
From: paul
Date: Mon, 29 Jun 2015 01:38:22 +0000
Subject: [PATCH] removed java script dependency from filter dialog
svn path=/trunk/; revision=57
---
templates/common.css.sh | 51 ++++++++++++++++++++++++++++++++++++++--
templates/filter.html.sh | 48 ++++++++++++++++++-------------------
2 files changed, 73 insertions(+), 26 deletions(-)
diff --git a/templates/common.css.sh b/templates/common.css.sh
index 0c3d51a..0ae44a7 100755
--- a/templates/common.css.sh
+++ b/templates/common.css.sh
@@ -28,6 +28,11 @@ body {
background-color: #000;
color: #DDD;
}
+
+input.tabhandle { display: none; }
+.tabcontent { display: none; }
+input.tabhandle:checked ~ .tabcontent { display: inline-block; }
+
a {
color: #EEE;
}
@@ -75,7 +80,7 @@ a.clearsearch, a.advanced, a.tagger, .pagination_nav {
padding-top: .125em;
}
-.panel .filter, .panel .quicklinks,
+.panel .quicklinks,
.footer .newtag, .footer input[type=submit] {
display: inline-block;
vertical-align: top;
@@ -84,7 +89,6 @@ a.clearsearch, a.advanced, a.tagger, .pagination_nav {
.panel .help {
display: block;
}
-.panel .filter select, .panel .filter .help,
.footer .newtag select, .footer .newtag .label{
display: block;
width: 10em;
@@ -100,6 +104,49 @@ a.clearsearch, a.advanced, a.tagger, .pagination_nav {
display: block
}
+.panel .filter {
+ vertical-align: top;
+ border: solid 1px; border-radius: .25em;
+ padding: .25em .5em;
+ margin: 0 0 1em 0;
+}
+.panel > label.tabhandle {
+ display: inline-block;
+ text-align: right;
+ width: 4em;
+ margin-left: 4em;
+}
+.panel > .tabhandle + label { display: none; }
+.panel > .tabhandle + label + .tabcontent { display: none; }
+.panel > .tabhandle:checked + label.tabhandle + .tabcontent { display: inline-block; }
+.panel > .tabhandle:checked + label.tabhandle + .tabcontent + .tabhandle + label{ display: inline-block; }
+.panel > .tabhandle:checked + label.tabhandle + .tabcontent + .tabhandle:checked + label{ display: none; }
+
+.panel .filter .tabcontainer {
+ position: relative;
+ width: 16em;
+}
+.panel .filter .category.tabhandle {
+ display: block;
+}
+.panel .filter input:checked + .category.tabhandle {
+ background: #FFF;
+ color: #000;
+}
+.panel .filter .category.tabcontent {
+ position: absolute;
+ top: 0; right: 0;
+ width: 10em;
+ height: 100%;
+ min-height: 4em;
+}
+
+.panel .filter.final {
+ display: inline-block;
+ width: 16em;
+ margin-left: 1em;
+}
+
#thumblist {
width: 100%;
padding: .5em 0 3em 0;
diff --git a/templates/filter.html.sh b/templates/filter.html.sh
index 4d1547d..0ba32bb 100755
--- a/templates/filter.html.sh
+++ b/templates/filter.html.sh
@@ -34,30 +34,30 @@ cat <Up to 10 filter boxes will appear as you start selecting tags. You can select multiple tags in each box by holding down the Ctrl-key. Click the "Filter!" button when you are ready.
$(for n in {0..9}; do
- hideall="$(echo "$taglist" |sed -rn "s;^([^:]+):.*$;hide('${n}_\\1')\\;;p" |sort -u)hide('${n}_none');"
- echo "
-
- and
-
-
- of the tags selected here:
-
-
-
- $(echo "$taglist" |sed -rn 's;^([^:]+):.*$;\1;p' |sort -u |while read cat; do echo "
- "
- done)
-
"
+ cat <<-EOF
+
+
+
+
+
+
of the items selected here:
+
+
+
+ $( {echo none; echo "$taglist" |sed -rn 's;^([^:]+):.*$;\1;p' |sort -u} \
+ |while read cat; do echo "
+
+
+
+
+
+ "
+ done)
+
+
+ EOF
done)
--
2.39.2