g.volumes_by_ou = {};
g.acpl_list = [];
+
// This file was modeled off of volume_copy_creator.js, so if you need
// functionality back, take it from there
function my_init() {
+ g.totalRows = 0;
try {
/* Initial setup */
note_textbox.setAttribute('rel_vert_pos',rel_vert_pos_copy_note);
note_node.appendChild(note_textbox);
}
-
+ g.totalRows ++;
barcode_textbox.setAttribute('acn_id',acn_id);
barcode_textbox.setAttribute('ou_id',ou_id);
barcode_textbox.setAttribute('callkey',acn_id);
barcode_textbox.setAttribute('rel_vert_pos',rel_vert_pos_barcode);
-
+ barcode_textbox.setAttribute('id', "barcode" + g.totalRows);
if (!barcode_textbox.value && g.org_label_existing_copy_map[ ou_id ] &&
g.org_label_existing_copy_map[ ou_id ][ acn_id ] &&
g.org_label_existing_copy_map[ ou_id ][ acn_id ].length > i) {
barcode_textbox.value = g.org_label_existing_copy_map[ ou_id ][ acn_id ][i].barcode();
- barcode_textbox.setAttribute('acp_id', g.org_label_existing_copy_map[ ou_id ][ acn_id ][i].id());
+ barcode_textbox.setAttribute('acp_id', g.org_label_existing_copy_map[ ou_id ][ acn_id ][i].id());
barcode_textbox.select();
}, false);
barcode_textbox.addEventListener( 'focus', function(ev) { g.last_focus = ev.target; }, false );
+
+ barcode_textbox.addEventListener( 'keypress', function(ev) {
+ var key = ev.which || ev.keyCode;
+ if (key == 13 && this.id == "barcode" + g.totalRows){
+ document.getElementById("barcode1").focus();
+ }
+ }, false );
}
}
menulist.addEventListener(
'command',
function(ev) {
+ g.totalRows = 0;
g.first_focus = null;
g.current_lineitem_index = menulist.getIndexOfItem( menulist.selectedItem );
g.reset_lineitem();