var barcode = retrieve_ids[i].barcode;
dump('Mark barcode lost = ' + barcode);
var robj = obj.network.simple_request( 'MARK_ITEM_LOST', [ ses(), { barcode: barcode } ]);
- if (typeof robj.ilsevent != 'undefined') { if (robj.ilsevent != 0) throw(robj); }
- obj.refresh(retrieve_ids[i].circ_id);
+ if (typeof robj.ilsevent != 'undefined') {
+ switch(robj.ilsevent) {
+ case 7018 /* COPY_MARKED_LOST */ :
+ alert( 'Item Barcode ' + barcode + '\n' + robj.desc );
+ break;
+ default: throw(robj);
+ }
+ } else {
+ obj.refresh(retrieve_ids[i].circ_id,true);
+ }
}
} catch(E) {
obj.error.standard_unexpected_error_alert('The items were not likely marked lost.',E);
if (typeof robj.ilsevent != 'undefined') { if (robj.ilsevent != 0) throw(robj); }
}
}
- for (var i = 0; i < retrieve_ids.length; i++) obj.refresh(retrieve_ids[i].circ_id);
+ for (var i = 0; i < retrieve_ids.length; i++) obj.refresh(retrieve_ids[i].circ_id,true);
} catch(E) {
obj.error.standard_unexpected_error_alert('The items were not likely marked Claimed Returned.',E);
}
ses(), { 'copy_id' : copy_id }
);
/* circ.util.checkin_via_barcode handles errors currently */
- obj.refresh(retrieve_ids[i].circ_id);
}
+ obj.retrieve();
} catch(E) {
obj.error.standard_unexpected_error_alert('Checkin probably did not happen.',E);
}
);
},
- 'refresh' : function(circ_id) {
+ 'refresh' : function(circ_id,move_to_bottom_list) {
var obj = this;
try {
var nparams = obj.list_circ_map[circ_id];
- var which_list = nparams.which_list;
- switch(which_list) {
- case 1: case '1':
- setTimeout(function(){try{obj.list2.refresh_row(nparams);}catch(E){obj.error.standard_unexpected_error_alert('2 Error refreshing row in list\ncirc_id = ' + circ_id + '\nnparams = ' + nparams,E);}},1000);
- break;
- default:
- setTimeout(function(){try{obj.list.refresh_row(nparams);}catch(E){obj.error.standard_unexpected_error_alert('2 Error refreshing row in list\ncirc_id = ' + circ_id + '\nnparams = ' + nparams,E);}},1000);
- break;
- }
+ if (move_to_bottom_list) {
+ obj.list_circ_map[circ_id].my_node.setAttribute('hidden','true');
+ var nparams2 = obj.list2.append( { 'row' : { 'my' : { 'circ_id' : circ_id } }, 'to_bottom' : true, 'which_list' : 1 } );
+ obj.list_circ_map[circ_id] = nparams2;
+ } else {
+ var which_list = nparams.which_list;
+ switch(which_list) {
+ case 1: case '1':
+ setTimeout(function(){try{obj.list2.refresh_row(nparams);}catch(E){obj.error.standard_unexpected_error_alert('2 Error refreshing row in list\ncirc_id = ' + circ_id + '\nnparams = ' + nparams,E);}},1000);
+ break;
+ default:
+ setTimeout(function(){try{obj.list.refresh_row(nparams);}catch(E){obj.error.standard_unexpected_error_alert('2 Error refreshing row in list\ncirc_id = ' + circ_id + '\nnparams = ' + nparams,E);}},1000);
+ break;
+ }
+ }
} catch(E) {
obj.error.standard_unexpected_error_alert('Error refreshing row in list\ncirc_id = ' + circ_id + '\nnparams = ' + nparams,E);
}