const rel_vert_pos_copy_count = 6;
const rel_vert_pos_barcode = 7;
const rel_vert_pos_part = 8;
+const update_timer = 1000;
var g = {};
g.use_defaults = true;
g.acn_map = {}; // store retrieved acn objects here by id
util.widgets.apply_vertical_tab_on_enter_handler(
tb,
function() { render_copy_count_entry({'target':tb}); setTimeout(function(){util.widgets.vertical_tab(tb);},0); },
- g.abort_gather_copies_soon
+ g.delay_gather_copies_soon
);
tb.addEventListener( 'change', render_copy_count_entry, false);
tb.addEventListener( 'change', g.gather_copies_soon, false);
},0
);
},
- g.abort_gather_copies_soon
+ g.delay_gather_copies_soon
);
call_number_column_textbox.addEventListener( 'change', handle_change_to_callnumber_data, false);
call_number_column_textbox.addEventListener( 'change', g.gather_copies_soon, false);
},0
);
},
- g.abort_gather_copies_soon
+ g.delay_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);
util.widgets.apply_vertical_tab_on_enter_handler(
tb,
function() { ready_to_create({'target':tb}); setTimeout(function(){util.widgets.vertical_tab(tb);},0); },
- g.abort_gather_copies_soon
+ g.delay_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); },
- g.abort_gather_copies_soon
+ g.delay_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.delay_gather_copies_soon = function() {
+ if (xulG.unified_interface) {
+ dump('g.delay_gather_copies_soon()\n');
+ g.gather_copies_soon();
}
}
g.gather_copies_soon = function() {
try {
+ if (!xulG.unified_interface) { return; }
dump('g.gather_copies_soon()\n');
if (g.update_copy_editor_timeoutID) {
clearTimeout(g.update_copy_editor_timeoutID);
function() {
try {
g.gather_copies();
- if (xulG.unified_interface) {
- xulG.refresh_copy_editor();
- }
+ xulG.refresh_copy_editor();
} catch(E) {
alert('Error in volume_copy_editor.js with g.gather_copies_soon setTimeout func(): ' + E);
}
- }, 2000
+ }, update_timer
);
} catch(E) {
alert('Error in volume_copy_creator.js, g.gather_copies_soon(): ' + E);
if (xulG.unified_interface) {
copies = xulG.copies;
} else {
- var copies = g.gather_copies();
+ copies = g.gather_copies();
copies = blob.copies;
}