git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4_0@12591
dcc99617-32d9-48b4-a31d-
7c20da2025e4
var new_bc = window.prompt(offlineStrings.getString('menu.cmd_replace_barcode.replacement.prompt'),'',offlineStrings.getString('menu.cmd_replace_barcode.replacement.label'));
new_bc = String( new_bc ).replace(/\s/g,'');
- if (!new_bc) {
+ /* Casting a possibly null input value to a String turns it into "null" */
+ if (!new_bc || new_bc == 'null') {
alert(offlineStrings.getString('menu.cmd_replace_barcode.blank.error'));
return;
}
'',
$("catStrings").getString('staff.cat.util.replace_barcode.new_bc_window_prompt.title'));
new_bc = String( new_bc ).replace(/\s/g,'');
- if (!new_bc) {
+ /* Casting a possibly null input value to a String turns it into "null" */
+ if (!new_bc || new_bc == 'null') {
alert($("catStrings").getString('staff.cat.util.replace_barcode.new_bc.failed'));
return old_bc;
}