g.load_prefs();
+ if (g.existing_copies.length > 0) {
+ g.gather_copies_soon();
+ }
+
} catch(E) {
var err_msg = $("commonStrings").getFormattedString('common.exception', ['cat/volume_copy_creator.js', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); dump(js2JSON(E)); }
function() { render_copy_count_entry({'target':tb}); setTimeout(function(){util.widgets.vertical_tab(tb);},0); }
);
tb.addEventListener( 'change', render_copy_count_entry, false);
+ tb.addEventListener( 'change', g.gather_copies_soon, false);
tb.addEventListener( 'focus', function(ev) { g.last_focus = ev.target; }, false );
setTimeout(
function() {
);
call_number_column_textbox.addEventListener( 'change', handle_change_call_number_column_textbox, false);
+ call_number_column_textbox.addEventListener( 'change', g.gather_copies_soon, false);
call_number_column_textbox.addEventListener( 'focus', function(ev) { g.last_focus = ev.target; }, false );
number_of_copies_column_textbox.addEventListener( 'change', handle_change_number_of_copies_column_textbox, false);
+ number_of_copies_column_textbox.addEventListener( 'change', g.gather_copies_soon, false);
number_of_copies_column_textbox.addEventListener( 'focus', function(ev) { g.last_focus = ev.target; }, false );
if ( !g.last_focus ) { number_of_copies_column_textbox.focus(); g.last_focus = number_of_copies_column_textbox; }
barcode_tb.setAttribute('bmp_id',menulist.selectedItem.value);
button.hidden = true;
}
+ g.gather_copies_soon();
}
});
},
},
false
);
+ menulist.addEventListener('change',g.gather_copies_soon,false);
menulist.addEventListener(
'command',
function(ev) {
},
false
);
+ menulist.addEventListener('command',g.gather_copies_soon,false);
return hbox;
}
$("catStrings").getString('staff.cat.volume_copy_creator.render_barcode_entry.alert_confirm'));
setTimeout( function() { ev.target.select(); ev.target.focus(); }, 0);
}
- if (xulG.unified_interface) {
- if (g.update_copy_editor_timeoutID) {
- clearTimeout(g.update_copy_editor_timeoutID);
- }
- // This function is expensive when it comes to keeping the UI responsive, so let's give it a delay
- // that quick entry of consecutive barcodes can override
- g.update_copy_editor_timeoutID = setTimeout(
- function() {
- g.gather_copies();
- try {
- xulG.refresh_copy_editor();
- } catch(E) {
- alert('Error in volume_copy_editor.js trying to call xulG.refresh_copy_editor(): ' + E);
- }
- }, 2000
- );
- }
}, false);
+ tb.addEventListener('change', g.gather_copies_soon, false);
tb.addEventListener( 'focus', function(ev) { g.last_focus = ev.target; }, false );
}
}
}
}
+g.gather_copies_soon = function() {
+ if (g.update_copy_editor_timeoutID) {
+ clearTimeout(g.update_copy_editor_timeoutID);
+ }
+ // This function is expensive when it comes to keeping the UI responsive, so let's give it a delay
+ // that quick entry of consecutive fields can override
+ g.update_copy_editor_timeoutID = setTimeout(
+ function() {
+ g.gather_copies();
+ try {
+ if (xulG.unified_interface) {
+ xulG.refresh_copy_editor();
+ }
+ } catch(E) {
+ alert('Error in volume_copy_editor.js trying to call xulG.refresh_copy_editor(): ' + E);
+ }
+ }, 2000
+ );
+}
+
g.new_node_id = -1;
g.gather_copies = function() {