Reworked filters to be far simpler that before.
Filter state is stored in the dom instead of global variables. No time
is lost because these dom objects were retrieved or removed regardless.
Change-Id: I5a525c5ea1f8740d25ba5cad8f81a8a148c5e651
diff --git a/client/query/query2.css b/client/query/query2.css
index a39b328..026c7b8 100644
--- a/client/query/query2.css
+++ b/client/query/query2.css
@@ -25,3 +25,47 @@
margin-left: 15px;
border-left: gray 3px solid;
}
+
+#filters {
+ margin-bottom: 10px;
+ visibility: visible;
+ opacity: 1;
+ transition: visibility 1s ease-out, opacity 1s ease-out, margin-bottom 1s ease-out;
+}
+
+#filters .label {
+ /* display: none; */
+ font-size: inherit;
+ transition: background-color 1s,
+
+ border-color 2s;
+}
+
+#filters .label:hover {
+ /* font-size: 0; */
+ background-color: red;
+ border-color: red;
+}
+
+#filters .label:hover::before {
+ content: "Remove ";
+}
+
+#filters .label:hover::after {
+ content: "?";
+}
+
+#filters .label:not(:last-child) {
+ margin-right: 5px;
+}
+
+#filters:empty {
+ visibility: hidden;
+ opacity: 0;
+ margin-bottom: 0;
+}
+
+/* Magic filters text that won't get picked up in jquery.text */
+#filters:not(:empty)::before {
+ content: "Filters: ";
+}