/[meteor]/trunk/public_html/koha.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 /trunk/public_html/koha.js

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

revision 71 by dpavlin, Sat Mar 28 03:45:31 2009 UTC revision 72 by dpavlin, Sat Mar 28 14:21:21 2009 UTC
# Line 1  Line 1 
1  // Set this to something unique to this client  // Set this to something unique to this client
2    
3    var rfid_visible = {};
4    
5  function process(data) {  function process(data) {
6          var a = data.split('|');          var a = data.split('|');
7          console.info('process', a);          console.info('process', a);
8          $('#test').html( a[1] );          $('#test').html( a[1] );
9          if ( a[0] > 0 ) {          if ( a[0] > 0 && ! rfid_visible[ a[0] ] ) {
10                  $('#koha')                  $('#koha').append( '<div class="item" id="' + a[0] + '">Loading item '+a[0]+' from Koha</div>' )
11                  .html( 'Loading item '+a[0]+' from Koha' )                  $('#' + a[0]).load( '/koha/' + a[0] );
12                  .load( '/koha/' + a[0] )                  rfid_visible[ a[0] ]++;
                 ;  
13          } else if ( a[0] < 0 ) {          } else if ( a[0] < 0 ) {
14                  $('#koha').html( '--' );                  $('#koha').html( 'No RFID chips in range' );
15                    rfid_visible = {};
16          }          }
17  };  };
18    

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

  ViewVC Help
Powered by ViewVC 1.1.26