Biblio-RFID

 view release on metacpan or  search on metacpan

examples/koha-rfid.js  view on Meta::CPAN

		}

	} else {
		span.text( 'no tags in range' ).css('color','gray');
		if ( rfid_reset_field ) {
			$('input[name='+rfid_reset_field+']').val( '' );
			rfid_reset_field = false;
		}
	}

	window.setTimeout( function() {
		$.getJSON("http://localhost:9000/scan?callback=?", rfid_scan);
	}, 1000 ); // 1000ms
}

$(document).ready( function() {
	$.getJSON("http://localhost:9000/scan?callback=?", rfid_scan);
});

examples/selfcheck.html  view on Meta::CPAN

</head>
<body>

<div id="tags">
RFID reader not found or driver program not started.
</div>

<h1>Knjižnica Filozofskog fakulteta</h1>

<div id="timeout">
Timeout in <span id="tick">99</span> seconds.
<div class="button">
<input type=button value="continue" onClick="start_timeout();" style="width:100%">
</div>
</div>


<div id="working">
<img src="/examples/giphy.gif">
</div>

examples/selfcheck.js  view on Meta::CPAN

		if ( state == 'start' ) {
			circulation_type = 'checkout';
			book_barcodes = {};
			$('ul#books').html(''); // clear book list
			$('#books_count').html( 0 );
			only_reader = '/only/librfid';
			scan_tags();
		}

		if ( state == 'end' ) {
			window.setTimeout(function(){
				//change_page('start');
				location.reload(); // force js VM to GC?
			},end_timeout);
		}

		if ( state == 'error' ) {
			beep( 'error page' );
			window.setTimeout(function(){
				//change_page('start');
				location.reload();
			},error_timeout);
		}

		if ( state == 'circulation' || state == 'borrower_info' ) {
			start_timeout();
		} else {
			tick = 0; // timeout disabled
		}

examples/selfcheck.js  view on Meta::CPAN

			$('#tick').html( Math.round( tick * tag_rescan / 1000 ) );
			$('#timeout').show();
		}
		tick--;
		if ( tick == 0 ) {
			$('#timeout').hide();
			change_page('end');
		}
	}

	scan_timeout = window.setTimeout(function(){
		scan_tags();
	},tag_rescan);	// re-scan every 200ms
}

$(document).ready(function() {
		$('div#tags').click( function() {
			scan_tags();
		});

		change_page('start');

inc/Module/Install/Fetch.pm  view on Meta::CPAN


    require Cwd;
    my $dir = Cwd::getcwd();
    chdir $args{local_dir} or return if exists $args{local_dir};

    if (eval { require LWP::Simple; 1 }) {
        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }
    elsif (my $ftp = $self->can_run('ftp')) { eval {
        # no Net::FTP, fallback to ftp.exe
        require FileHandle;
        my $fh = FileHandle->new;

scripts/RFID-JSONP-server.pl  view on Meta::CPAN


	var arrows = Array( 8592, 8598, 8593, 8599, 8594, 8600, 8595, 8601 );

	html = '<div class=status>'
		+ textStatus
		+ ' &#' + arrows[ data.time % arrows.length ] + ';'
		+ '</div>'
		+ html
		;
	$('#tags').html( html );
	window.setTimeout(function(){
		scan_tags();
	},200);	// re-scan every 200ms
};

function scan_tags() {
	console.info('scan_tags');
	if ( $('input#pull-reader').attr('checked') )
		$.getJSON("/scan?callback=?", got_visible_tags);
}



( run in 0.432 second using v1.01-cache-2.11-cpan-05444aca049 )