From 389bae2771dc4e6f9e7cb38081cedde6cac48606 Mon Sep 17 00:00:00 2001 From: pines Date: Fri, 2 Feb 2007 17:05:07 +0000 Subject: [PATCH] focus tweaks and shortcuts git-svn-id: svn://svn.open-ils.org/ILS/trunk@6849 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/copy_editor.js | 5 +++-- Open-ILS/xul/staff_client/server/cat/copy_editor.xul | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 4690b72906..7a83add9dd 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -965,7 +965,7 @@ g.render = function() { groupbox = document.createElement('groupbox'); document.getElementById(h).appendChild(groupbox); if (typeof g.changed[fn] != 'undefined') groupbox.setAttribute('class','copy_editor_field_changed'); caption = document.createElement('caption'); groupbox.appendChild(caption); - caption.setAttribute('label',fn); + caption.setAttribute('label',fn); caption.setAttribute('id','caption_'+fn); vbox = document.createElement('vbox'); groupbox.appendChild(vbox); grid = util.widgets.make_grid( [ { 'flex' : 1 }, {}, {} ] ); vbox.appendChild(grid); grid.setAttribute('flex','1'); @@ -1066,6 +1066,7 @@ g.render_input = function(node,blob) { function() { g.summarize( g.copies ); g.render(); + document.getElementById(caption.id).focus(); }, 0 ); } catch(E) { @@ -1085,7 +1086,7 @@ g.render_input = function(node,blob) { apply.addEventListener('command',function() { c(x.value); },false); var cancel = document.createElement('button'); cancel.setAttribute('label','Cancel'); - cancel.addEventListener('command',function() { setTimeout( function() { g.summarize( g.copies ); g.render(); }, 0); }, false); + cancel.addEventListener('command',function() { setTimeout( function() { g.summarize( g.copies ); g.render(); document.getElementById(caption.id).focus(); }, 0); }, false); hbox2.appendChild(cancel); setTimeout( function() { x.focus(); }, 0 ); } diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.xul b/Open-ILS/xul/staff_client/server/cat/copy_editor.xul index 138680807f..bb190e5a98 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.xul @@ -60,22 +60,22 @@ -