12 |
}); |
}); |
13 |
} |
} |
14 |
|
|
15 |
|
var rfid_reset_field = false; |
16 |
|
|
17 |
function rfid_scan(data,textStatus) { |
function rfid_scan(data,textStatus) { |
18 |
// console.debug( 'rfid_scan', data, textStatus ); |
// console.debug( 'rfid_scan', data, textStatus ); |
19 |
|
|
33 |
if ( t.security.toUpperCase() == 'D7' ) color = 'green'; |
if ( t.security.toUpperCase() == 'D7' ) color = 'green'; |
34 |
span.text( t.content ).css('color', color); |
span.text( t.content ).css('color', color); |
35 |
$('input[name=barcode]').val( t.content ); |
$('input[name=barcode]').val( t.content ); |
36 |
|
rfid_reset_field = 'barcode'; |
37 |
|
|
38 |
var url = document.location.toString(); |
var url = document.location.toString(); |
39 |
if ( url.substr(-14,14) == 'circulation.pl' ) |
if ( url.substr(-14,14) == 'circulation.pl' ) |
44 |
} else { |
} else { |
45 |
span.text( t.content ).css('color', 'blue' ); |
span.text( t.content ).css('color', 'blue' ); |
46 |
$('input[name=findborrower]').val( t.content ); |
$('input[name=findborrower]').val( t.content ); |
47 |
|
rfid_reset_field = 'findborrower'; |
48 |
} |
} |
49 |
} |
} |
50 |
} else { |
} else { |
55 |
|
|
56 |
} else { |
} else { |
57 |
span.text( 'no tags in range' ).css('color','gray'); |
span.text( 'no tags in range' ).css('color','gray'); |
58 |
|
if ( rfid_reset_field ) { |
59 |
|
$('input[name='+rfid_reset_field+']').val( '' ); |
60 |
|
rfid_reset_field = false; |
61 |
|
} |
62 |
} |
} |
63 |
|
|
64 |
window.setTimeout( function() { |
window.setTimeout( function() { |