/[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 72 by dpavlin, Thu Feb 11 20:59:42 2010 UTC revision 74 by dpavlin, Thu Feb 11 21:36:46 2010 UTC
# Line 12  console.debug(i,o,possible, barcode); Line 12  console.debug(i,o,possible, barcode);
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    
# Line 31  function rfid_scan(data,textStatus) { Line 33  function rfid_scan(data,textStatus) {
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' )
# Line 41  function rfid_scan(data,textStatus) { Line 44  function rfid_scan(data,textStatus) {
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 {
# Line 51  function rfid_scan(data,textStatus) { Line 55  function rfid_scan(data,textStatus) {
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() {

Legend:
Removed from v.72  
changed lines
  Added in v.74

  ViewVC Help
Powered by ViewVC 1.1.26