[Rt-commit] rt branch, 4.4/layout-changes, created. rt-4.2.11-239-gb650719

Shawn Moore shawn at bestpractical.com
Mon Oct 19 18:44:02 EDT 2015


The branch, 4.4/layout-changes has been created
        at  b65071996e839b4c8d40c3f06cc6cdd4f4e63104 (commit)

- Log -----------------------------------------------------------------
commit b65071996e839b4c8d40c3f06cc6cdd4f4e63104
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Mon Oct 19 22:42:11 2015 +0000

    Improved search widget using input type="search"
    
        In Safari this gives a dropdown of recent searches (with a button to clear
        them)

diff --git a/share/html/Elements/SimpleSearch b/share/html/Elements/SimpleSearch
index 7db2aca..6d07a75 100644
--- a/share/html/Elements/SimpleSearch
+++ b/share/html/Elements/SimpleSearch
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" id="simple-search">
-  <input size="12" name="q" accesskey="0" class="field" value="<% $value %>" placeholder="<% $Placeholder %>..." />
+  <input size="12" name="q" accesskey="0" class="field" value="<% $value %>" placeholder="<% $Placeholder %>..." type="search" results=5 autosave="simple-search" />
 </form>
 <%init>
 my $value = defined $DECODED_ARGS->{q} ? $DECODED_ARGS->{q} : '';
diff --git a/share/static/css/base/nav.css b/share/static/css/base/nav.css
index 538aab8..48b4a8f 100644
--- a/share/static/css/base/nav.css
+++ b/share/static/css/base/nav.css
@@ -27,3 +27,12 @@
     width: 1.25em;
 }
 
+#simple-search input.field {
+    /* turn off webkit input[type=search] styling */
+    -webkit-appearance: textfield;
+}
+
+#simple-search input.field::-webkit-search-cancel-button {
+    /* hide webkit x button for searches */
+    -webkit-appearance: none;
+}

-----------------------------------------------------------------------


More information about the rt-commit mailing list