From a32bdef661b26489f2b6db3622700846c61f4018 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 28 Aug 2014 14:46:24 +0200 Subject: [PATCH] update books_count after list --- examples/selfcheck.html | 2 +- examples/selfcheck.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/selfcheck.html b/examples/selfcheck.html index dab4ef4..6b26462 100644 --- a/examples/selfcheck.html +++ b/examples/selfcheck.html @@ -114,7 +114,7 @@ Postavite knjige na predviđeno mjesto ispred monitora. -Dokumenata: 0 +Dokumenata: 0
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() { -- 2.20.1