From 564ccdf4d8d77d6a849b031d4c3180b17c1e0672 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 14 Jan 2017 10:36:33 +0100 Subject: [PATCH] Implemented smart search boxes --- skins/elastic/styles.css | 49 ++++++++++++++++-- skins/elastic/templates/addressbook.html | 4 +- skins/elastic/templates/folders.html | 17 +++---- skins/elastic/templates/mail.html | 5 +- skins/elastic/ui.js | 65 ++++++++++++++++++++++-- 5 files changed, 120 insertions(+), 20 deletions(-) diff --git a/skins/elastic/styles.css b/skins/elastic/styles.css index 880f18b60..558ceec54 100644 --- a/skins/elastic/styles.css +++ b/skins/elastic/styles.css @@ -195,9 +195,10 @@ body { font-weight: bold; line-height: 30pt; height: 30pt; - overflow: hidden; padding: 0 0.5em; margin: 0; + position: relative; /* for absolute positioning of searchbar */ + overflow: hidden; } #layout > div > .header { border-bottom: 1px solid #ddd; @@ -208,7 +209,7 @@ body { /*** Login form ***/ -.task-login .content { +.task-login #content { text-align: center; width: 100%; background: url(images/watermark.jpg) center -20px no-repeat; @@ -388,7 +389,39 @@ ul.listing li input[type=checkbox] { .toolbar > .spacer { display: inline-block; - width: 1em; + width: 1.2em; +} + +.searchbar { + display: table; + text-align: right; + position: absolute; + background-color: #f9f9f9; + z-index: 10; + top: 0; + right: 0; +} + +.searchbar > form, +.searchbar > a.button.options, +.searchbar > a.button.reset { + display: none; + width: 1%; +} + +.searchbar > form, +.searchbar > form > input { + width: 98%; +} + +.searchbar input { + border: none; + border-bottom: 1px solid #ddd; + background: transparent; +} + +.searchbar > a.button.search.active { + color: green; } .header > .buttons > input.button { @@ -688,6 +721,13 @@ button.ui.button.icon:before { content: "\f050"; /* i.icon.fast.forward */ } +.searchbar > a.button.reset:before { + content: "\f00d"; /* i.icon.remove */ +} +.searchbar > a.button.options:before { + content: "\f107"; /* i.icon.angle.down */ +} + button.icon.save:before { content: "\f00c"; /* i.icon.checkmark */ } @@ -697,6 +737,9 @@ button.icon.edit:before { button.icon.qrcode:before { content: "\f029"; /* i.icon.qrcode */ } +button.icon.search:before { + content: "\f002"; /* i.icon.search */ +} /**** Styles for widescreen (3-column) view ****/ diff --git a/skins/elastic/templates/addressbook.html b/skins/elastic/templates/addressbook.html index 6119402b3..8532b00c0 100644 --- a/skins/elastic/templates/addressbook.html +++ b/skins/elastic/templates/addressbook.html @@ -27,6 +27,8 @@ +
@@ -119,7 +121,7 @@
  • -
    +
    @@ -57,4 +48,8 @@
    + + diff --git a/skins/elastic/templates/mail.html b/skins/elastic/templates/mail.html index ff25e5b4e..b4ce62a43 100644 --- a/skins/elastic/templates/mail.html +++ b/skins/elastic/templates/mail.html @@ -30,7 +30,10 @@
    +
    +

    @@ -112,7 +115,7 @@
  • -
    +