}
util.widgets.apply_vertical_tab_on_enter_handler(
tb,
- function() { render_copy_count_entry({'target':tb}); setTimeout(function(){util.widgets.vertical_tab(tb);},0); }
+ function() { render_copy_count_entry({'target':tb}); setTimeout(function(){util.widgets.vertical_tab(tb);},0); },
+ g.abort_gather_copies_soon
);
tb.addEventListener( 'change', render_copy_count_entry, false);
tb.addEventListener( 'change', g.gather_copies_soon, false);
x.setAttribute('style','font-weight: bold');
function handle_change(call_number_column_textbox,number_of_copies_column_textbox,barcode_column_box) {
- if (call_number_column_textbox.value == '') return;
if (isNaN( Number( number_of_copies_column_textbox.value ) )) return;
if ( Number( number_of_copies_column_textbox.value ) > g_max_copies_that_can_be_added_at_a_time_per_volume ) {
g.error.yns_alert($("catStrings").getFormattedString('staff.cat.volume_copy_creator.render_volume_count_entry.message', [g_max_copies_that_can_be_added_at_a_time_per_volume]),
util.widgets.vertical_tab(call_number_column_textbox);
},0
);
- }
+ },
+ g.abort_gather_copies_soon
);
call_number_column_textbox.addEventListener( 'change', handle_change_call_number_column_textbox, false);
call_number_column_textbox.addEventListener( 'change', g.gather_copies_soon, false);
util.widgets.vertical_tab(number_of_copies_column_textbox);
},0
);
- }
+ },
+ g.abort_gather_copies_soon
);
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);
if (set_handlers) {
util.widgets.apply_vertical_tab_on_enter_handler(
tb,
- function() { ready_to_create({'target':tb}); setTimeout(function(){util.widgets.vertical_tab(tb);},0); }
+ function() { ready_to_create({'target':tb}); setTimeout(function(){util.widgets.vertical_tab(tb);},0); },
+ g.abort_gather_copies_soon
);
util.widgets.apply_vertical_tab_on_enter_handler(
part_menu.firstChild,
- function() { setTimeout(function(){util.widgets.vertical_tab(part_menu.firstChild);},0); }
+ function() { setTimeout(function(){util.widgets.vertical_tab(part_menu.firstChild);},0); },
+ g.abort_gather_copies_soon
);
tb.addEventListener('change', function(ev) {
var barcode = String( ev.target.value ).replace(/\s/g,'');
}
}
+g.abort_gather_copies_soon = function() {
+ dump('g.abort_gather_copies_soon()\n');
+ if (g.update_copy_editor_timeoutID) {
+ clearTimeout(g.update_copy_editor_timeoutID);
+ }
+}
+
g.gather_copies_soon = function() {
+ dump('g.gather_copies_soon()\n');
if (g.update_copy_editor_timeoutID) {
clearTimeout(g.update_copy_editor_timeoutID);
}
g.new_acp_id = -1;
g.gather_copies = function() {
+ dump('g.gather_copies()\n');
try {
var nl = document.getElementsByTagName('textbox');