X-Git-Url: http://git.rot13.org/?p=Biblio-RFID.git;a=blobdiff_plain;f=examples%2Fselfcheck.js;h=4955e54f30b3e627339663e7be984f73071a40a6;hp=d2f82b55a564510e1060a22e3c363a1aede16a11;hb=a32bdef661b26489f2b6db3622700846c61f4018;hpb=78d349901a60f408c31a50664b435f2ec526a50d diff --git a/examples/selfcheck.js b/examples/selfcheck.js index d2f82b5..4955e54 100644 --- a/examples/selfcheck.js +++ b/examples/selfcheck.js @@ -48,6 +48,7 @@ function change_page(new_state) { circulation_type = 'checkout'; book_barcodes = {}; $('ul#books').html(''); // clear book list + $('#books_count').html( 0 ); scan_tags(); } @@ -190,6 +191,7 @@ function circulation( barcode, sid ) { $.getJSON('/sip2/'+circulation_type+'/'+borrower_cardnumber+'/'+barcode+'/'+sid , function( data ) { console.info( circulation_type, data ); $('ul#books').append('
  • ' + ( data['AJ'] || barcode ) + ( data['AF'] ? ' ' + data['AF'] + '' : '' ) + '
  • '); + $('#books_count').html( $('ul#books > li').length ); console.debug( book_barcodes ); pending_jsonp--; }).fail( function() {