focus tweaks and shortcuts
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 2 Feb 2007 17:05:07 +0000 (17:05 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 2 Feb 2007 17:05:07 +0000 (17:05 +0000)
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
Open-ILS/xul/staff_client/server/cat/copy_editor.xul

index 4690b72..7a83add 100644 (file)
@@ -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 );
                                }
index 1386808..bb190e5 100644 (file)
                        </vbox>
                        <splitter><grippy /></splitter>
                        <vbox flex="1">
-                               <label value="Location" style="font-weight: bold; font-size: large"/>
+                               <button style="font-weight: bold; font-size: normal" label="Location" accesskey="1" oncommand="document.getElementById('right_pane').firstChild.firstChild.focus();"/>
                                <vbox id="right_pane" flex="1"/>
                        </vbox>
                        <splitter><grippy /></splitter>
                        <vbox flex="1">
-                               <label value="Circulation" style="font-weight: bold; font-size: large"/>
+                               <button style="font-weight: bold; font-size: normal" label="Circulation" accesskey="2" oncommand="document.getElementById('right_pane2').firstChild.firstChild.focus();"/>
                                <vbox id="right_pane2" flex="1"/>
                        </vbox>
                        <splitter><grippy /></splitter>
                        <vbox flex="1">
-                               <label value="Miscellaneous" style="font-weight: bold; font-size: large"/>
+                               <button style="font-weight: bold; font-size: normal" label="Miscellaneous" accesskey="3" oncommand="document.getElementById('right_pane3').firstChild.firstChild.focus();"/>
                                <vbox id="right_pane3" flex="1"/>
                        </vbox>
                        <splitter><grippy /></splitter>
                        <vbox flex="1">
-                               <label value="Statistics" style="font-weight: bold; font-size: large"/>
+                               <button style="font-weight: bold; font-size: normal" label="Statistics" accesskey="4" oncommand="document.getElementById('right_pane4').firstChild.firstChild.focus();"/>
                                <vbox id="right_pane4" flex="1"/>
                        </vbox>
                </hbox>