From 10c0eecb79d8fe838f8a86a2be81f25f0a89494c Mon Sep 17 00:00:00 2001 From: phasefx Date: Sun, 16 Mar 2008 20:52:06 +0000 Subject: [PATCH] Some focus/label tweaks. And a help button point to an html file. Dan and I need to revisit this and come up with a best practice and infrastructure git-svn-id: svn://svn.open-ils.org/ILS/trunk@9058 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/server/cat/record_buckets.js | 16 ++++++++++++--- .../server/cat/record_buckets_overlay.xul | 3 +++ .../locale/en-US/multiclass_search_help.html | 23 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 Open-ILS/xul/staff_client/server/locale/en-US/multiclass_search_help.html diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets.js b/Open-ILS/xul/staff_client/server/cat/record_buckets.js index bbffe3698d..1bf13c656a 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets.js +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets.js @@ -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); } diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul b/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul index 3b7d53619f..961fcf68b9 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul @@ -66,8 +66,11 @@ + 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 index 0000000000..cc47c0b88a --- /dev/null +++ b/Open-ILS/xul/staff_client/server/locale/en-US/multiclass_search_help.html @@ -0,0 +1,23 @@ + +Multiclass Search Help + +

+Recognized search keys include: +

+
+ keyword/kw - search keyword(s)
+ author/au/name - search author(s)
+ title/ti - search title
+ subject/su - search subject
+ series/se - search series
+ lang - limit by language (specifiy multiple langs with lang:l1 lang:l2 ...)
+ site - search at specified org unit, corresponds to actor.org_unit.shortname
+ sort - sort type (title, author, pubdate)
+ dir - sort direction (asc, desc)
+ available - if set to anything other than "false" or "0", limits to available items
+
+ keyword, title, author, subject, and series support additional search + subclasses, specified with a "|". For example, "title|proper:gone with the wind"
+
+ + -- 2.11.0