/[RFID]/koha/koha-rfid.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /koha/koha-rfid.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 69 by dpavlin, Thu Feb 11 18:40:24 2010 UTC revision 70 by dpavlin, Thu Feb 11 18:48:19 2010 UTC
# Line 12  function rfid_scan(data,textStatus) { Line 12  function rfid_scan(data,textStatus) {
12    
13          if ( data.tags ) {          if ( data.tags ) {
14                  if ( data.tags.length === 1 ) {                  if ( data.tags.length === 1 ) {
15                          var numbers = data.tags[0].content;                          var t = data.tags[0];
16                          if ( span.text() != numbers ) {                          if ( span.text() != t.content ) {
17                                  if ( numbers.substr(0,3) == '130' ) {                                  if ( t.content.substr(0,3) == '130' ) {
18                                          span.text( numbers ).css('color', 'blue');                                          var color = 'blue';
19                                          $('input[name=barcode]').val( numbers );                                          if ( t.security.toUpperCase() == 'DA' ) color = 'red';
20                                            if ( t.security.toUpperCase() == 'D7' ) color = 'green';
21                                            span.text( t.content ).css('color', color);
22                                            $('input[name=barcode]').val( t.content );
23                                  } else {                                  } else {
24                                          span.text( numbers ).css('color', 'yellow' );                                          span.text( t.content ).css('color', 'yellow' );
25                                          $('input[name=findborrower]').val( numbers );                                          $('input[name=findborrower]').val( t.content );
26                                  }                                  }
27                          }                          }
28                  } else {                  } else {

Legend:
Removed from v.69  
changed lines
  Added in v.70

  ViewVC Help
Powered by ViewVC 1.1.26