You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2014/10/31 03:03:27 UTC
svn commit: r1635655 - in /lucene/cms/branches/solr_6058:
content/solr/assets/images/ content/solr/assets/styles/ templates/
Author: sarowe
Date: Fri Oct 31 02:03:27 2014
New Revision: 1635655
URL: http://svn.apache.org/r1635655
Log:
Enable search and search provider in top nav bar
Added:
lucene/cms/branches/solr_6058/content/solr/assets/images/magnifying-glass.png (with props)
Modified:
lucene/cms/branches/solr_6058/content/solr/assets/styles/base.css
lucene/cms/branches/solr_6058/templates/_solr-navigation.html
lucene/cms/branches/solr_6058/templates/_solr-search.html
lucene/cms/branches/solr_6058/templates/solr-documentation.html
lucene/cms/branches/solr_6058/templates/solr-tutorials.html
Added: lucene/cms/branches/solr_6058/content/solr/assets/images/magnifying-glass.png
URL: http://svn.apache.org/viewvc/lucene/cms/branches/solr_6058/content/solr/assets/images/magnifying-glass.png?rev=1635655&view=auto
==============================================================================
Binary file - no diff available.
Propchange: lucene/cms/branches/solr_6058/content/solr/assets/images/magnifying-glass.png
------------------------------------------------------------------------------
svn:mime-type = image/png
Modified: lucene/cms/branches/solr_6058/content/solr/assets/styles/base.css
URL: http://svn.apache.org/viewvc/lucene/cms/branches/solr_6058/content/solr/assets/styles/base.css?rev=1635655&r1=1635654&r2=1635655&view=diff
==============================================================================
--- lucene/cms/branches/solr_6058/content/solr/assets/styles/base.css (original)
+++ lucene/cms/branches/solr_6058/content/solr/assets/styles/base.css Fri Oct 31 02:03:27 2014
@@ -747,45 +747,66 @@ ul.side-nav > li {
color:#D9411E;
}
-
#search form, #search fieldset {
border:none;
padding:0;
margin:0;
}
-#search input[type="search"] {
- font-family: 'Raleway', 'Helvetica Neue', sans-serif;
- font-weight:300;
- height: 50px;
- font-size: 25px;
- border:none;
- box-shadow:none;
-}
-
.search-box {
display: inline-block;
- margin-top: -3px;
- margin-bottom: -5px;
padding-right: 1em;
+ position: relative;
+ width: 200px;
+ height: 42px;
}
-.search-box input[type="search"] {
+#search input[type="search"] {
font-family: 'Raleway', 'Helvetica Neue', sans-serif;
font-weight:300;
- font-size: 14px;
- border:none;
- box-shadow:none;
+ height: 28px;
+ width: 185px;
+ font-size: 18px;
+ border: none;
+ box-shadow: none;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+}
+
+#search input[type="search"]:focus {
+ background-color: #f9f9f9;
}
.search-button {
position:absolute;
- top:30px;
- right:30px;
+ height:23px;
+ width:23px;
+ background-color: transparent !important;
+ line-height: 23px !important;
+ padding: 0 !important;
+ top: 2px;
+ right: 17px;
+ margin:0;
}
.search-button img {
- width:70%;
+ padding:0;
+ line-height:23px;
+ margin:0;
+}
+
+select.search-provider {
+ position:absolute;
+ height:19px;
+ width: 185px;
+ top:29px;
+ left:0px;
+ font-size:0.85em;
+ font-style: italic;
+ color: #888;
+ padding:0;
+ padding-left:7px;
}
.nested-nav {
@@ -806,3 +827,5 @@ ul.breadcrumbs a {
margin-top: 40px;
margin-bottom:40px;
}
+
+
Modified: lucene/cms/branches/solr_6058/templates/_solr-navigation.html
URL: http://svn.apache.org/viewvc/lucene/cms/branches/solr_6058/templates/_solr-navigation.html?rev=1635655&r1=1635654&r2=1635655&view=diff
==============================================================================
--- lucene/cms/branches/solr_6058/templates/_solr-navigation.html (original)
+++ lucene/cms/branches/solr_6058/templates/_solr-navigation.html Fri Oct 31 02:03:27 2014
@@ -9,10 +9,8 @@
<a href="/solr/resources.html">Resources</a>
</li>
<li class="toggle">
- <a ng-hide="toggled" ng-click="toggle();" href="#">Search</a>
- <span class="search-box" ng-show="toggled">
- <input type="search" placeholder="Search |" />
- </span>
+ <a ng-hide="toggled" ng-click="toggle();" href="#">Search</a>
+ {% include "_solr-search.html" %}
</li>
<li>
<a class="btn" href="http://lucene.apache.org/solr/mirrors-solr-latest-redir.html">download</a>
Modified: lucene/cms/branches/solr_6058/templates/_solr-search.html
URL: http://svn.apache.org/viewvc/lucene/cms/branches/solr_6058/templates/_solr-search.html?rev=1635655&r1=1635654&r2=1635655&view=diff
==============================================================================
--- lucene/cms/branches/solr_6058/templates/_solr-search.html (original)
+++ lucene/cms/branches/solr_6058/templates/_solr-search.html Fri Oct 31 02:03:27 2014
@@ -8,42 +8,48 @@
}
function selectProvider(form) {
+ lucidAction = "http://find.searchhub.org/p:lucene,solr";
+ searchLuceneAction = "http://search-lucene.com/lucene";
+
provider = form.elements['searchProvider'].value;
- if (provider == "any") {
+ if (provider == "lucid" || provider == "sl") {
+ if (provider == "lucid") {
+ form.action = lucidAction;
+ } else if (provider == "sl") {
+ form.action = searchLuceneAction;
+ }
+
+ // Only store provider preference cookie if the user selected it
+ days = 90; // cookie will be valid for 90 days
+ date = new Date();
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+ expires = "; expires=" + date.toGMTString();
+ document.cookie = "searchProvider=" + provider + expires + "; path=/";
+ } else {
if (Math.random() > 0.5) {
- provider = "lucid";
+ form.action = lucidAction;
} else {
- provider = "sl";
+ form.action = searchLuceneAction;
}
}
-
- if (provider == "lucid") {
- form.action = "http://find.searchhub.org/p:lucene,solr";
- } else if (provider == "sl") {
- form.action = "http://search-lucene.com/lucene";
- }
-
- days = 90; // cookie will be valid for 90 days
- date = new Date();
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
- expires = "; expires=" + date.toGMTString();
- document.cookie = "searchProvider=" + provider + expires + "; path=/";
return true;
}
</script>
<form id="quick-search" method="GET" onsubmit="return selectProvider(this)"
- action="http://search-lucene.com/lucene"
+ action="http://search-lucene.com//lucene"
name="searchform">
<fieldset>
- <input type="search" name="q" placeholder="Search |" class="class1 class2 hint" accesskey="q"
- onfocus="getBlank(this, 'Search with Apache Solr...')">
- <a class="search-button" type="submit"><img src="/solr/assets/images/magnifying-glass.png"></a>
- <!-- <span style="color:white">@</span>
- <select name="searchProvider" id="searchProvider">
- <option value="any">select provider</option>
- <option value="lucid">Lucid Find</option>
- <option value="sl">Search-Lucene</option>
- </select> -->
+ <div ng-show="toggled" class="search-box">
+ <input type="search" name="q" placeholder="Search |" accesskey="q"
+ onfocus="getBlank(this, 'Search |');"/>
+ <a class="search-button" type="submit"
+ onclick="form = document.getElementById('quick-search'); selectProvider(form); form.submit();"><img src="/solr/assets/images/magnifying-glass.png"/></a>
+ <select name="searchProvider" id="searchProvider" class="search-provider">
+ <option value="any"> - select provider - </option>
+ <option value="lucid">@ Lucid Find</option>
+ <option value="sl">@ Search-Lucene</option>
+ </select>
+ </div>
</fieldset>
<script type="text/javascript">
if (document.cookie.length > 0) {
Modified: lucene/cms/branches/solr_6058/templates/solr-documentation.html
URL: http://svn.apache.org/viewvc/lucene/cms/branches/solr_6058/templates/solr-documentation.html?rev=1635655&r1=1635654&r2=1635655&view=diff
==============================================================================
--- lucene/cms/branches/solr_6058/templates/solr-documentation.html (original)
+++ lucene/cms/branches/solr_6058/templates/solr-documentation.html Fri Oct 31 02:03:27 2014
@@ -21,7 +21,6 @@
<div class="medium-4 columns">
{% block sidebar %}
<ul class="side-nav nested-nav">
- {% include "_solr-search.html" %}
<li><a href="#">Collections and Indexes</a>
<ul>
<li>nested info</li>
Modified: lucene/cms/branches/solr_6058/templates/solr-tutorials.html
URL: http://svn.apache.org/viewvc/lucene/cms/branches/solr_6058/templates/solr-tutorials.html?rev=1635655&r1=1635654&r2=1635655&view=diff
==============================================================================
--- lucene/cms/branches/solr_6058/templates/solr-tutorials.html (original)
+++ lucene/cms/branches/solr_6058/templates/solr-tutorials.html Fri Oct 31 02:03:27 2014
@@ -23,7 +23,6 @@
<ul class="side-nav">
- {% include "_solr-search.html" %}
<li><a data-scroll href="#overview" class="active">Overview</a></li>
<li><a data-scroll href="#requirements">Requirements</a></li>
<li><a data-scroll href="#getting-started">Getting Started</a></li>