Some focus/label tweaks. And a help button point to an html file. Dan and I need...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 16 Mar 2008 20:52:06 +0000 (20:52 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 16 Mar 2008 20:52:06 +0000 (20:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9058 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/record_buckets.js
Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul
Open-ILS/xul/staff_client/server/locale/en-US/multiclass_search_help.html [new file with mode: 0644]

index bbffe36..1bf13c6 100644 (file)
@@ -832,9 +832,12 @@ cat.record_buckets.prototype = {
     'submit' : function() {
         try {
             var obj = this;
-            obj.list0.clear();
             var x = document.getElementById('record_query_input'); 
-            if (x.value == '') return;
+            if (x.value == '') {
+                setTimeout( function() { obj.controller.view.record_query_input.focus(); obj.controller.view.record_query_input.select(); }, 0 );
+                return;
+            }
+            obj.list0.clear();
             var y = document.getElementById('query_status');
             x.disabled = true;
             if (y) y.value = 'Searching...';
@@ -858,9 +861,16 @@ cat.record_buckets.prototype = {
                                     }(resp.ids[i][0])
                                 );
                             }
+                            funcs.push(
+                                function() {
+                                    obj.controller.view.record_query_input.focus();
+                                    obj.controller.view.record_query_input.select();
+                                }
+                            );
                             exec.chain( funcs ); 
+                        } else {
+                            setTimeout( function() { obj.controller.view.record_query_input.focus(); obj.controller.view.record_query_input.select(); }, 0 );
                         }
-                        obj.controller.view.record_query_input.focus();
                     } catch(E) {
                         obj.error.standard_unexpected_error_alert('submit_query_callback',E);
                     }
index 3b7d536..961fcf6 100644 (file)
 </vbox>
 
 <hbox id="record_query_top_ui">
+    <label id="record_query_label" value="Query" accesskey="y" control="record_query_input"/>
     <textbox id="record_query_input" flex="1"/>
     <button command="cmd_submit_query" label="Submit" accesskey="S"/>
+    <button id="query_help" label="Help" accesskey="H" oncommand="window.open('/xul/server/locale/<!--#echo var='locale' -->/multiclass_search_help.html','multiclass_search_help','chrome,modal,resizable');" >
+    </button>
 </hbox>
 
 <hbox id="record_query_bottom_ui">
diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/multiclass_search_help.html b/Open-ILS/xul/staff_client/server/locale/en-US/multiclass_search_help.html
new file mode 100644 (file)
index 0000000..cc47c0b
--- /dev/null
@@ -0,0 +1,23 @@
+<html>
+<head><title>Multiclass Search Help</title></head>
+<body onload="window.focus()">
+<p>
+Recognized search keys include:
+</p>
+<blockquote>
+    keyword/kw - search keyword(s)<br/>
+    author/au/name - search author(s)<br/>
+    title/ti - search title<br/>
+    subject/su - search subject<br/>
+    series/se - search series<br/>
+    lang - limit by language (specifiy multiple langs with lang:l1 lang:l2 ...)<br/>
+    site - search at specified org unit, corresponds to actor.org_unit.shortname<br/>
+    sort - sort type (title, author, pubdate)<br/>
+    dir - sort direction (asc, desc)<br/>
+    available - if set to anything other than "false" or "0", limits to available items<br/>
+<br/>
+    keyword, title, author, subject, and series support additional search
+    subclasses, specified with a "|". For example, "title|proper:gone with the wind"<br/>
+</blockquote>
+</body>
+</html>