checkout/in books only on 3M reader
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 14 Apr 2014 13:05:18 +0000 (15:05 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 4 Jan 2016 14:56:39 +0000 (15:56 +0100)
otherwise, we can't secure/unsecure books

ffzg/rfid/koha-rfid.js

index 1e3cbc7..53aa3c5 100644 (file)
@@ -82,7 +82,7 @@ function rfid_scan(data,textStatus) {
                                        rfid_blank_sid = t.sid;
                                        span.text( t.sid + ' blank' ).css('color', 'red' );
 
-                               } else if ( t.content.substr(0,3) == '130' ) { // books
+                               } else if ( t.content.substr(0,3) == '130' && t.reader == '3M810' ) { // books on 3M reader
 
                                        var color = 'blue';
                                        if ( t.security.toUpperCase() == 'DA' ) color = 'red';
@@ -115,6 +115,10 @@ function rfid_scan(data,textStatus) {
                                                }
                                        }
 
+                               } else if ( t.content.substr(0,3) == '130' ) {
+
+                                       span.text( 'Please put book on 3M reader!' ).css( 'color', 'red' );
+
                                } else {
                                        span.text( t.content ).css('color', 'blue' );