From 556d206ab8f5f420e171838fd50a546d37ec5eb7 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Wed, 22 Feb 2012 13:18:46 +0100 Subject: [PATCH] Hide filter input field if no filter is set. --- README.md | 1 + src/_h5ai/css/inc/nav.less | 7 +++++++ src/_h5ai/js/inc/Finder.js | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 032efbab..31eb9d22 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h * adds optional QRCode display * adds optional filtering for displayed files and folders +* updates design * improves zipped download * changes h5ai.htaccess * custom headers/footers are now optional and disabled by default diff --git a/src/_h5ai/css/inc/nav.less b/src/_h5ai/css/inc/nav.less index b3d94681..4a758693 100644 --- a/src/_h5ai/css/inc/nav.less +++ b/src/_h5ai/css/inc/nav.less @@ -84,11 +84,18 @@ body > nav { border-left: 1px solid rgba(0,0,0,0.05); input { + display: none; border: none; font-family: Ubuntu, sans-serif; color: #555; background-color: rgba(0,0,0,0); width: 100px; } + + &.current { + input { + display: inline; + } + } } } diff --git a/src/_h5ai/js/inc/Finder.js b/src/_h5ai/js/inc/Finder.js index 60771f7b..e4aab214 100644 --- a/src/_h5ai/js/inc/Finder.js +++ b/src/_h5ai/js/inc/Finder.js @@ -53,7 +53,7 @@ init = function () { if (H5AI.core.settings.showFilter) { - $("
  • filter
  • ") + $("
  • filter
  • ") .on('click', function () { var $input = $(this).find('input');