summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-05-07 11:49:04 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-05-07 11:49:04 +0200
commita772bb7fef43421ed18a52b1cb1d7bd010e3cf93 (patch)
treeb8c35bc012c61497c53e2e4112dae613f0c8d0cb /public
parent2b795a4e87db14ca9e4e631e461171285db0d8b2 (diff)
clean template: show moreinfo using javascript
Diffstat (limited to 'public')
-rw-r--r--public/collapse.js22
-rw-r--r--public/default.css19
2 files changed, 33 insertions, 8 deletions
diff --git a/public/collapse.js b/public/collapse.js
new file mode 100644
index 0000000..d38b30a
--- /dev/null
+++ b/public/collapse.js
@@ -0,0 +1,22 @@
+$(document).ready(function() {
+ $('div.displayclean > ul > li').each(function() {
+ $(this).click(function() {
+ $(this).children('.moreinfo').each(function() {
+ if ($(this).hasClass('expanded-moreinfo')) {
+ $(this).removeClass('expanded-moreinfo');
+ $(this).addClass('collapsed-moreinfo');
+ }
+ else {
+ $('.moreinfo').each(function() {
+ if ($(this).hasClass('expanded-moreinfo')) {
+ $(this).removeClass('expanded-moreinfo');
+ $(this).addClass('collapsed-moreinfo');
+ }
+ });
+ $(this).removeClass('collapsed-moreinfo');
+ $(this).addClass('expanded-moreinfo');
+ }
+ });
+ });
+ });
+});
diff --git a/public/default.css b/public/default.css
index 6d59b03..e4d36a5 100644
--- a/public/default.css
+++ b/public/default.css
@@ -106,20 +106,23 @@ div.displayclean li .info {
div.displayclean li .moreinfo {
color:#000000;
font-size:2.1em;
- position:absolute;
- top:5px;
- left:8em;
+ position:fixed;
+ top:1em;
+ left:1em;
min-height: 1em;
- width: 66%;
+ width: 90%;
background-color: white;
border: 1px solid black;
z-index: 5;
- visibility: hidden;
+ display: none;
+}
+
+div.displayclean li .collapsed-moreinfo {
+ display: none;
}
-div.displayclean li:hover .moreinfo,
-div.displayclean li .moreinfo:hover {
- visibility: visible;
+div.displayclean li .expanded-moreinfo {
+ display: block;
}
div.displayclean li .moreinfo .reason {