From 29d4dd8b3eef579cdb2fd8a8b45eaa29f291bd0c Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 18 Aug 2009 05:35:04 +0000 Subject: [PATCH] backport changeset 13857: fixed regression with default search field not being refocused after using the Clear Form button. Also have the default field come into focus when the whole tab leaves focus and is later revisited. git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@13860 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/z3950.js | 2 +- Open-ILS/xul/staff_client/server/cat/z3950.xul | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js index c9802418bd..5ea8cd99cd 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.js +++ b/Open-ILS/xul/staff_client/server/cat/z3950.js @@ -431,7 +431,7 @@ cat.z3950.prototype = { var obj = this; var nl = document.getElementsByAttribute('mytype','search_class'); for (var i = 0; i < nl.length; i++) { nl[i].value = ''; nl[i].setAttribute('value',''); } - //obj.focus(obj.controller.view.service_menu.value); + obj.focus(); }, 'search_params' : {}, diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.xul b/Open-ILS/xul/staff_client/server/cat/z3950.xul index e698bf123f..b245e05772 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.xul +++ b/Open-ILS/xul/staff_client/server/cat/z3950.xul @@ -70,7 +70,7 @@ } function default_focus() { - setTimeout( function() { try { document.getElementById("username").focus(); g.z3950.focus(g.service); } catch(E) { } }, 0 ); + setTimeout( function() { try { g.z3950.focus(); } catch(E) { alert(E); } }, 0 ); } ]]> -- 2.11.0