class="form-control"
ng-model="checkinArgs.copy_barcode"
placeholder="[% l('Barcode') %]"
+ eg-rfid-target
id="patron-checkin-barcode" type="text"/>
<input type="submit" class="btn btn-default" value="[% l('Submit') %]"/>
<input select-me="selectMe" class="form-control"
ng-model="args.barcode"
placeholder="[% l('Patron Barcode') %]"
+ eg-rfid-target
id="patron-checkout-barcode" type="text"/>
<input class="btn btn-default" type="submit" value="[% l('Submit') %]"/>
<input focus-me="focusMe" class="form-control"
ng-model="checkoutArgs.copy_barcode"
+ eg-rfid-target
ng-disabled="checkoutArgs.noncat_type != 'barcode' || disable_checkout()"
id="patron-checkout-barcode" type="text"/>
*/
angular.module('egUiMod', ['egCoreMod', 'ui.bootstrap'])
+.directive('egRfidTarget',
+ ['$window',
+function($window) {
+ return {
+ link: function(scope, element, attrs) {
+ var origTitle = $window.document.title;
+ element.bind('focus', function(e) {
+ $window.document.title = origTitle + ' (RFID: On)';
+ });
+ element.bind('blur', function(e) {
+ $window.document.title = origTitle;
+ });
+ }
+ };
+}])
/**
* <input focus-me="iAmOpen"/>