| Lines 7-13
          
      
      
        Link Here | 
        
          | 7 |     // Elements we work frequently with | 7 |     // Elements we work frequently with | 
        
          | 8 |     var textarea = document.getElementById("identifiers_input"); | 8 |     var textarea = document.getElementById("identifiers_input"); | 
        
          | 9 |     var nameInput = document.getElementById("name"); | 9 |     var nameInput = document.getElementById("name"); | 
          
            
              | 10 |     var cardnumberInput = document.getElementById("cardnumber"); | 10 |     var cardnumberInput = document.getElementById("batchcardnumber"); | 
        
          | 11 |     var branchcodeSelect = document.getElementById("branchcode"); | 11 |     var branchcodeSelect = document.getElementById("branchcode"); | 
        
          | 12 |     var processButton = document.getElementById("process_button"); | 12 |     var processButton = document.getElementById("process_button"); | 
        
          | 13 |     var createButton = document.getElementById("button_create_batch"); | 13 |     var createButton = document.getElementById("button_create_batch"); | 
  
    | Lines 22-27
          
      
      
        Link Here | 
        
          | 22 |     var statusesSelect = document.getElementById('statuscode'); | 22 |     var statusesSelect = document.getElementById('statuscode'); | 
        
          | 23 |  | 23 |  | 
        
          | 24 |  | 24 |  | 
            
              |  |  | 25 |     // Bail if there aren't any metadata enrichment plugins installed | 
            
              | 26 |     if (typeof metadata_enrichment_services === 'undefined') { | 
            
              | 27 |         return; | 
            
              | 28 |     } | 
        
          | 25 |     // We need a data structure keyed on identifier type, which tells us how to parse that | 29 |     // We need a data structure keyed on identifier type, which tells us how to parse that | 
        
          | 26 |     // identifier type and what services can get its metadata. We receive an array of | 30 |     // identifier type and what services can get its metadata. We receive an array of | 
        
          | 27 |     // available services | 31 |     // available services | 
  
    | Lines 299-304
          
      
      
        Link Here | 
        
          | 299 |                 tableContent.data = tableContent.data.map(function (row) { | 303 |                 tableContent.data = tableContent.data.map(function (row) { | 
        
          | 300 |                     if (row.value === identifier) { | 304 |                     if (row.value === identifier) { | 
        
          | 301 |                         row.requestId = data.illrequest_id; | 305 |                         row.requestId = data.illrequest_id; | 
            
              |  |  | 306 |                         row.requestStatus = data.status; | 
        
          | 302 |                     } | 307 |                     } | 
        
          | 303 |                     return row; | 308 |                     return row; | 
        
          | 304 |                 }); | 309 |                 }); | 
  
    | Lines 893-898
          
      
      
        Link Here | 
        
          | 893 |         return data.requestId || '-'; | 898 |         return data.requestId || '-'; | 
        
          | 894 |     } | 899 |     } | 
        
          | 895 |  | 900 |  | 
            
              |  |  | 901 |     function createRequestStatus(x, y, data) { | 
            
              | 902 |         return data.requestStatus || '-'; | 
            
              | 903 |     } | 
            
              | 904 |  | 
        
          | 896 |     function buildTable(identifiers) { | 905 |     function buildTable(identifiers) { | 
        
          | 897 |         table = KohaTable('identifier-table', { | 906 |         table = KohaTable('identifier-table', { | 
        
          | 898 |             processing: true, | 907 |             processing: true, | 
  
    | Lines 918-926
          
      
      
        Link Here | 
        
          | 918 |                 }, | 927 |                 }, | 
        
          | 919 |                 { | 928 |                 { | 
        
          | 920 |                     data: 'requestId', | 929 |                     data: 'requestId', | 
          
            
              | 921 |                     width: '13%', | 930 |                     width: '6.5%', | 
        
          | 922 |                     render: createRequestId | 931 |                     render: createRequestId | 
        
          | 923 |                 }, | 932 |                 }, | 
            
              |  |  | 933 |                 { | 
            
              | 934 |                     data: 'requestStatus', | 
            
              | 935 |                     width: '6.5%', | 
            
              | 936 |                     render: createRequestStatus | 
            
              | 937 |                 }, | 
        
          | 924 |                 { | 938 |                 { | 
        
          | 925 |                     width: '18%', | 939 |                     width: '18%', | 
        
          | 926 |                     render: createActions, | 940 |                     render: createActions, | 
  
    | Lines 1021-1043
          
      
      
        Link Here | 
        
          | 1021 |     } | 1035 |     } | 
        
          | 1022 |  | 1036 |  | 
        
          | 1023 |     function patronAutocomplete() { | 1037 |     function patronAutocomplete() { | 
          
            
              | 1024 |         // Add autocomplete for patron selection | 1038 |         patron_autocomplete( | 
            
              | 1025 |         $('#batch-form #cardnumber').autocomplete({ | 1039 |             $('#batch-form #batchcardnumber'), | 
            
              | 1026 |             appendTo: '#batch-form', | 1040 |             { | 
            
              | 1027 |             source: "/cgi-bin/koha/circ/ysearch.pl", | 1041 |               'on-select-callback': function( event, ui ) { | 
            
              | 1028 |             minLength: 3, | 1042 |                 $("#batch-form #batchcardnumber").val( ui.item.cardnumber ); | 
            
              | 1029 |             select: function (event, ui) { |  |  | 
            
              | 1030 |                 var field = ui.item.cardnumber; | 
            
              | 1031 |                 $('#batch-form #cardnumber').val(field) | 
        
          | 1032 |                 return false; | 1043 |                 return false; | 
            
              |  |  | 1044 |               } | 
        
          | 1033 |             } | 1045 |             } | 
          
            
              | 1034 |         }) | 1046 |           ); | 
            
              | 1035 |             .data("ui-autocomplete")._renderItem = function (ul, item) { |  |  | 
            
              | 1036 |                 return $("<li></li>") | 
            
              | 1037 |                     .data("ui-autocomplete-item", item) | 
            
              | 1038 |                     .append("<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>") | 
            
              | 1039 |                     .appendTo(ul); | 
            
              | 1040 |             }; | 
        
          | 1041 |     }; | 1047 |     }; | 
        
          | 1042 |  | 1048 |  | 
        
          | 1043 |     function createPatronLink() { | 1049 |     function createPatronLink() { | 
            
              | 1044 | -  |  |  |