tests, blah autosuggest
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 12 Dec 2011 20:12:26 +0000 (15:12 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 15 Dec 2011 13:55:01 +0000 (08:55 -0500)
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/templates/opac/parts/searchbar.tt2
Open-ILS/web/css/skin/default/opac/style.css

index 907a0e7..27680df 100644 (file)
@@ -9,26 +9,33 @@
             id="home_adv_search_link"><span
             class="adv_search_font">[% l('Advanced Search') %]</span></a>
     </div>
-    <div style="font-weight: bold">[%- l('Search ');
-        INCLUDE "opac/parts/coded_value_selector.tt2"
-            attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats');
-            l(' for ');
-        %]
-        <span class='search_box_wrapper'>
+    <div id="basic-search-row">
+        <div class="basic-search-formats">
+            [%-
+                l('Search ');
+                INCLUDE "opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats');
+                l(' for ')
+            %]
+        </div>
+        <div class="basic-search-term">
             <input type="text" id="search_box" name="query" value="[% is_advanced ? ctx.processed_search_query : CGI.param('query') || l("Search Keyword") | html %]"
                 onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
                 onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}"
-                x-webkit-speech />
-        </span>
+                x-webkit-speech /><br />
+            <div class="basic-search-autosuggest">test</div>
+        </div>
+        <div class="basic-search-remainder">
         [%- INCLUDE "opac/parts/qtype_selector.tt2";
             l(' in '); PROCESS build_org_selector name='loc' value=CGI.param('loc');
     %]
-    <span>
-        <input id='search-submit-go' type="submit" value="[% l('Search') %]" alt="[% l('Search') %]" class="opac-button"
-            onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
-        <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt=''/>
-    </span>
+            <span>
+                <input id='search-submit-go' type="submit" value="[% l('Search') %]" alt="[% l('Search') %]" class="opac-button"
+                    onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
+                <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt=''/>
+            </span>
+        </div>
     </div>
+    <br class="clear-both" />
     [% IF is_advanced || is_special %]
     <div>
         <input type="hidden" name="_adv" value="1" />
index 27eb9d8..90a5703 100644 (file)
@@ -216,8 +216,48 @@ span.dash_divider {
        background: white;
 }
 
-.search_box_wrapper {
-       padding: 1px 1px 1px 3px;
+.basic-search-row {
+}
+
+.basic-search-formats {
+    float: left;
+    margin-top: 2px;
+    height: 3.5ex;
+    width: 22em;    /* This and .basic-search-foo may not need explicit widths
+        like this. if the autosuggest dropdown can be made to stay directly
+        underneath input#search_box by some cleaner means, I'm all for it. */
+}
+
+.basic-search-term {
+    float: left;
+    width: 16em;
+    height: 3.5ex;
+    margin-top: 2px;
+}
+
+.basic-search-remainder {
+    height: 3.5ex;
+    float: left;
+    width: 40em;
+    margin-left: 1em;
+}
+
+.basic-search-autosuggest {
+    width: 14.5em;
+    float: left;
+    position: absolute;
+    z-index: 100;
+    background-color: #ccc;
+    padding: 0.5ex 0.5em;
+}
+
+.basic-search-row div {
+    font-size: 12px;
+}
+
+#search_box {
+    width: 15.5em;
+    font-size: inherit;
 }
 
 #search-wrapper #breadcrumb {