Our libs got this issue when entering fields in workflow.
"Jumping cursor to marc record" issue has been caused by loadRecord() function whenever you filled in a fixed filed (with enough length of characters). The loadRecord() will "refresh" the below record table with the new value you just put in, and yes, after that, keep the cursor on the MARC record table. So, we want to put the cursor back to the current field we're editing, right?
Here is solution -> insert once more code line in this file: /openils.var/web/xul/rel_2_3.1/server/cat/marcedit.js
(rel_2_x.y is depending on your version)
Search this function "updateFixedFields (line 816):
function updateFixedFields (element) {
var grid = document.getElementById('leaderGrid');
var recGrid = document.getElementById('recGrid');
var new_value = element.value;
// Don't take focus away/adjust the record on partial changes
var length = element.getAttribute('maxlength');
if(new_value.length < length) return true;
var marc_rec = new MARC.Record ({ delimiter : '$', marcxml : xml_record.toXMLString() });
marc_rec.setFixedField(element.getAttribute('name'), new_value);
var xml_string = marc_rec.toXmlString();
xml_record = new XML( xml_string );
if (xml_record..record[0]) xml_record = xml_record..record[0];
loadRecord(); //line 830
document.getElementById(element.getAttribute('id')).select(); <== Insert this code
Save changed.
Clear cache of client, close the current client window, open the new one, and you're good to go with what you want ^^
Our libs got this issue when entering fields in workflow. var/web/ xul/rel_ 2_3.1/server/ cat/marcedit. js getElementById( 'leaderGrid' ); getElementById( 'recGrid' ); getAttribute( 'maxlength' ); new_value. length < length) return true;
"Jumping cursor to marc record" issue has been caused by loadRecord() function whenever you filled in a fixed filed (with enough length of characters). The loadRecord() will "refresh" the below record table with the new value you just put in, and yes, after that, keep the cursor on the MARC record table. So, we want to put the cursor back to the current field we're editing, right?
Here is solution -> insert once more code line in this file: /openils.
(rel_2_x.y is depending on your version)
Search this function "updateFixedFields (line 816):
function updateFixedFields (element) {
var grid = document.
var recGrid = document.
var new_value = element.value;
// Don't take focus away/adjust the record on partial changes
var length = element.
if(
var marc_rec = new MARC.Record ({ delimiter : '$', marcxml : xml_record. toXMLString( ) }); rec.setFixedFie ld(element. getAttribute( 'name') , new_value);
marc_
var xml_string = marc_rec. toXmlString( ); .record[ 0]) xml_record = xml_record. .record[ 0];
xml_record = new XML( xml_string );
if (xml_record.
loadRecord(); //line 830
document. getElementById( element. getAttribute( 'id')). select( ); <== Insert this code
Save changed.
Clear cache of client, close the current client window, open the new one, and you're good to go with what you want ^^