| 
      
            Lines 1448-1455
          Note that permanent location is a code, and location may be an authval.
      
      
        Link Here
      
     | 
  
        
          | 1448 | 
           | 
          1448 | 
           | 
        
        
          | 1449 | 
                          // Toolbar  | 
          1449 | 
                          // Toolbar  | 
        
        
          | 1450 | 
                          var bundle_toolbar = $('<div id="toolbar" class="btn-toolbar"></div>'); | 
          1450 | 
                          var bundle_toolbar = $('<div id="toolbar" class="btn-toolbar"></div>'); | 
        
          
            
              | 1451 | 
                              bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#addToBundleModal" data-item="' + itemnumber + '"><i class="fa fa-plus"></i> Add to bundle</a>'); | 
              1451 | 
                              bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#addToBundleModal" data-item="' + itemnumber + '"><i class="fa fa-plus"></i> ' + _("Add to bundle") + '</a>'); | 
            
            
              | 1452 | 
                              bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#removeFromBundleModal" data-item="' + itemnumber + '"><i class="fa fa-minus"></i> Remove from bundle</a>'); | 
              1452 | 
                              bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#removeFromBundleModal" data-item="' + itemnumber + '"><i class="fa fa-minus"></i> ' + _("Remove from bundle") + '</a>'); | 
            
        
          | 1453 | 
           | 
          1453 | 
           | 
        
        
          | 1454 | 
                          // This is the table we'll convert into a DataTable  | 
          1454 | 
                          // This is the table we'll convert into a DataTable  | 
        
        
          | 1455 | 
                          var bundles_table = $('<table class="display tbundle" data-itemnumber="'+itemnumber+'" id="bundle_table_'+itemnumber+'" width="100%"/>'); | 
          1455 | 
                          var bundles_table = $('<table class="display tbundle" data-itemnumber="'+itemnumber+'" id="bundle_table_'+itemnumber+'" width="100%"/>'); | 
        
  
    | 
      
            Lines 1481-1487
          Note that permanent location is a code, and location may be an authval.
      
      
        Link Here
      
     | 
  
        
          | 1481 | 
                              "columns": [  | 
          1481 | 
                              "columns": [  | 
        
        
          | 1482 | 
                                  { | 
          1482 | 
                                  { | 
        
        
          | 1483 | 
                                      "data": "biblio.title:biblio.medium",  | 
          1483 | 
                                      "data": "biblio.title:biblio.medium",  | 
        
          
            
              | 1484 | 
                                          "title": "Title",  | 
              1484 | 
                                          "title": _("Title"), | 
            
        
          | 1485 | 
                                      "searchable": true,  | 
          1485 | 
                                      "searchable": true,  | 
        
        
          | 1486 | 
                                      "orderable": true,  | 
          1486 | 
                                      "orderable": true,  | 
        
        
          | 1487 | 
                                      "render": function(data, type, row, meta) { | 
          1487 | 
                                      "render": function(data, type, row, meta) { | 
        
  
    | 
      
            Lines 1500-1536
          Note that permanent location is a code, and location may be an authval.
      
      
        Link Here
      
     | 
  
        
          | 1500 | 
                                  },  | 
          1500 | 
                                  },  | 
        
        
          | 1501 | 
                                  { | 
          1501 | 
                                  { | 
        
        
          | 1502 | 
                                      "data": "biblio.author",  | 
          1502 | 
                                      "data": "biblio.author",  | 
        
          
            
              | 1503 | 
                                          "title": "Author",  | 
              1503 | 
                                          "title": _("Author"), | 
            
        
          | 1504 | 
                                      "searchable": true,  | 
          1504 | 
                                      "searchable": true,  | 
        
        
          | 1505 | 
                                      "orderable": true,  | 
          1505 | 
                                      "orderable": true,  | 
        
        
          | 1506 | 
                                  },  | 
          1506 | 
                                  },  | 
        
        
          | 1507 | 
                                  { | 
          1507 | 
                                  { | 
        
        
          | 1508 | 
                                      "data": "collection_code",  | 
          1508 | 
                                      "data": "collection_code",  | 
        
          
            
              | 1509 | 
                                          "title": "Collection code",  | 
              1509 | 
                                          "title": _("Collection"), | 
            
        
          | 1510 | 
                                      "searchable": true,  | 
          1510 | 
                                      "searchable": true,  | 
        
        
          | 1511 | 
                                      "orderable": true,  | 
          1511 | 
                                      "orderable": true,  | 
        
        
          | 1512 | 
                                  },  | 
          1512 | 
                                  },  | 
        
        
          | 1513 | 
                                  { | 
          1513 | 
                                  { | 
        
        
          | 1514 | 
                                      "data": "item_type",  | 
          1514 | 
                                      "data": "item_type",  | 
        
          
            
              | 1515 | 
                                          "title": "Item Type",  | 
              1515 | 
                                          "title": _("Item type"), | 
            
        
          | 1516 | 
                                      "searchable": false,  | 
          1516 | 
                                      "searchable": false,  | 
        
        
          | 1517 | 
                                      "orderable": true,  | 
          1517 | 
                                      "orderable": true,  | 
        
        
          | 1518 | 
                                  },  | 
          1518 | 
                                  },  | 
        
        
          | 1519 | 
                                  { | 
          1519 | 
                                  { | 
        
        
          | 1520 | 
                                      "data": "callnumber",  | 
          1520 | 
                                      "data": "callnumber",  | 
        
          
            
              | 1521 | 
                                          "title": "Callnumber",  | 
              1521 | 
                                          "title": _("Callnumber"), | 
            
        
          | 1522 | 
                                      "searchable": true,  | 
          1522 | 
                                      "searchable": true,  | 
        
        
          | 1523 | 
                                      "orderable": true,  | 
          1523 | 
                                      "orderable": true,  | 
        
        
          | 1524 | 
                                  },  | 
          1524 | 
                                  },  | 
        
        
          | 1525 | 
                                  { | 
          1525 | 
                                  { | 
        
        
          | 1526 | 
                                      "data": "external_id",  | 
          1526 | 
                                      "data": "external_id",  | 
        
          
            
              | 1527 | 
                                          "title": "Barcode",  | 
              1527 | 
                                          "title": _("Barcode"), | 
            
        
          | 1528 | 
                                      "searchable": true,  | 
          1528 | 
                                      "searchable": true,  | 
        
        
          | 1529 | 
                                      "orderable": true,  | 
          1529 | 
                                      "orderable": true,  | 
        
        
          | 1530 | 
                                  },  | 
          1530 | 
                                  },  | 
        
        
          | 1531 | 
                                  { | 
          1531 | 
                                  { | 
        
        
          | 1532 | 
                                      "data": "lost_status:last_seen_date:return_claim.patron",  | 
          1532 | 
                                      "data": "lost_status:last_seen_date:return_claim.patron",  | 
        
          
            
              | 1533 | 
                                          "title": "Status",  | 
              1533 | 
                                          "title": _("Status"), | 
            
        
          | 1534 | 
                                      "searchable": false,  | 
          1534 | 
                                      "searchable": false,  | 
        
        
          | 1535 | 
                                      "orderable": true,  | 
          1535 | 
                                      "orderable": true,  | 
        
        
          | 1536 | 
                                      "render": function(data, type, row, meta) { | 
          1536 | 
                                      "render": function(data, type, row, meta) { | 
        
  
    | 
      
            Lines 1552-1558
          Note that permanent location is a code, and location may be an authval.
      
      
        Link Here
      
     | 
  
        
          | 1552 | 
                                          var result = '<button class="btn btn-default btn-xs remove" role="button" data-itemnumber="'+row.item_id+'"><i class="fa fa-minus" aria-hidden="true"></i> '+_("Remove")+'</button>\n'; | 
          1552 | 
                                          var result = '<button class="btn btn-default btn-xs remove" role="button" data-itemnumber="'+row.item_id+'"><i class="fa fa-minus" aria-hidden="true"></i> '+_("Remove")+'</button>\n'; | 
        
        
          | 1553 | 
                                          return result;  | 
          1553 | 
                                          return result;  | 
        
        
          | 1554 | 
                                      },  | 
          1554 | 
                                      },  | 
        
          
            
              | 1555 | 
                                          "title": "Actions",  | 
              1555 | 
                                          "title": _("Actions"), | 
            
        
          | 1556 | 
                                      "searchable": false,  | 
          1556 | 
                                      "searchable": false,  | 
        
        
          | 1557 | 
                                      "orderable": false,  | 
          1557 | 
                                      "orderable": false,  | 
        
        
          | 1558 | 
                                      "class": "noExport"  | 
          1558 | 
                                      "class": "noExport"  | 
        
  
    | 
      
            Lines 1608-1614
          Note that permanent location is a code, and location may be an authval.
      
      
        Link Here
      
     | 
  
        
          | 1608 | 
                            /* Report the results */  | 
          1608 | 
                            /* Report the results */  | 
        
        
          | 1609 | 
                            posting.done(function(data) { | 
          1609 | 
                            posting.done(function(data) { | 
        
        
          | 1610 | 
                                var barcode = $('#external_id').val(); | 
          1610 | 
                                var barcode = $('#external_id').val(); | 
        
          
            
              | 1611 | 
                                    $('#addResult').replaceWith('<div id="addResult" class="alert alert-success">Success: Added '+barcode+'</div>'); | 
              1611 | 
                                    $('#addResult').replaceWith('<div id="addResult" class="alert alert-success">'+_("Success: Added '%s'").format(barcode)+'</div>'); | 
            
        
          | 1612 | 
                                $('#external_id').val('').focus(); | 
          1612 | 
                                $('#external_id').val('').focus(); | 
        
        
          | 1613 | 
                                bundle_changed = 1;  | 
          1613 | 
                                bundle_changed = 1;  | 
        
        
          | 1614 | 
                            });  | 
          1614 | 
                            });  | 
        
  
    | 
      
            Lines 1617-1628
          Note that permanent location is a code, and location may be an authval.
      
      
        Link Here
      
     | 
  
        
          | 1617 | 
                                if ( data.status === 409 ) { | 
          1617 | 
                                if ( data.status === 409 ) { | 
        
        
          | 1618 | 
                                    var response = data.responseJSON;  | 
          1618 | 
                                    var response = data.responseJSON;  | 
        
        
          | 1619 | 
                                    if ( response.key === "PRIMARY" ) { | 
          1619 | 
                                    if ( response.key === "PRIMARY" ) { | 
        
          
            
              | 1620 | 
                                            $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">Warning: Item '+barcode+' already attached</div>'); | 
              1620 | 
                                            $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' aready attached").format(barcode)+'</div>'); | 
            
        
          | 1621 | 
                                    } else { | 
          1621 | 
                                    } else { | 
        
          
            
              | 1622 | 
                                            $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">Failure: Item '+barcode+' belongs to another bundle</div>'); | 
              1622 | 
                                            $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>'); | 
            
        
          | 1623 | 
                                    }  | 
          1623 | 
                                    }  | 
        
        
          | 1624 | 
                                } else { | 
          1624 | 
                                } else { | 
        
          
            
              | 1625 | 
                                        $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">Failure: Check the logs for details</div>'); | 
              1625 | 
                                        $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>'); | 
            
        
          | 1626 | 
                                }  | 
          1626 | 
                                }  | 
        
        
          | 1627 | 
                                $('#external_id').val('').focus(); | 
          1627 | 
                                $('#external_id').val('').focus(); | 
        
        
          | 1628 | 
                            });  | 
          1628 | 
                            });  | 
        
  
    | 
      
            Lines 1675-1681
          Note that permanent location is a code, and location may be an authval.
      
      
        Link Here
      
     | 
  
        
          | 1675 | 
                                  /* Report the results */  | 
          1675 | 
                                  /* Report the results */  | 
        
        
          | 1676 | 
                                  deleteReq.done(function(data) { | 
          1676 | 
                                  deleteReq.done(function(data) { | 
        
        
          | 1677 | 
                                      var barcode = $('#rm_external_id').val(); | 
          1677 | 
                                      var barcode = $('#rm_external_id').val(); | 
        
          
            
              | 1678 | 
                                          $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-success">'+_("Success: Removed ")+barcode+'</div>'); | 
              1678 | 
                                          $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-success">'+_("Success: Removed '%s'").format(barcode)+'</div>'); | 
            
        
          | 1679 | 
                                      $('#rm_external_id').val('').focus(); | 
          1679 | 
                                      $('#rm_external_id').val('').focus(); | 
        
        
          | 1680 | 
                                      bundle_changed = 1;  | 
          1680 | 
                                      bundle_changed = 1;  | 
        
        
          | 1681 | 
                                  });  | 
          1681 | 
                                  });  | 
        
  
    | 
      
            Lines 1684-1704
          Note that permanent location is a code, and location may be an authval.
      
      
        Link Here
      
     | 
  
        
          | 1684 | 
                                      if ( data.status === 409 ) { | 
          1684 | 
                                      if ( data.status === 409 ) { | 
        
        
          | 1685 | 
                                          var response = data.responseJSON;  | 
          1685 | 
                                          var response = data.responseJSON;  | 
        
        
          | 1686 | 
                                          if ( response.key === "PRIMARY" ) { | 
          1686 | 
                                          if ( response.key === "PRIMARY" ) { | 
        
          
            
              | 1687 | 
                                                  $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">Warning: Item '+barcode+' already attached</div>'); | 
              1687 | 
                                                  $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>'); | 
            
        
          | 1688 | 
                                          } else { | 
          1688 | 
                                          } else { | 
        
          
            
              | 1689 | 
                                                  $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">Failure: Item '+barcode+' belongs to another bundle</div>'); | 
              1689 | 
                                                  $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>'); | 
            
        
          | 1690 | 
                                          }  | 
          1690 | 
                                          }  | 
        
        
          | 1691 | 
                                      } else { | 
          1691 | 
                                      } else { | 
        
          
            
              | 1692 | 
                                              $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">Failure: Check the logs for details</div>'); | 
              1692 | 
                                              $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>'); | 
            
        
          | 1693 | 
                                      }  | 
          1693 | 
                                      }  | 
        
        
          | 1694 | 
                                      $('#rm_external_id').val('').focus(); | 
          1694 | 
                                      $('#rm_external_id').val('').focus(); | 
        
        
          | 1695 | 
                                  });  | 
          1695 | 
                                  });  | 
        
        
          | 1696 | 
                              } else { | 
          1696 | 
                              } else { | 
        
          
            
              | 1697 | 
                                      $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Barcode matched more than one item ")+barcode+'</div>'); | 
              1697 | 
                                      $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Barcode matched more than one item '%s'").format(barcode)+'</div>'); | 
            
        
          | 1698 | 
                              }  | 
          1698 | 
                              }  | 
        
        
          | 1699 | 
                          });  | 
          1699 | 
                          });  | 
        
        
          | 1700 | 
                          itemReq.fail(function(data) { | 
          1700 | 
                          itemReq.fail(function(data) { | 
        
          
            
              | 1701 | 
                                   $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Item not found ")+barcode+'</div>'); | 
              1701 | 
                                   $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Item not found '%s'").format(barcode)+'</div>'); | 
            
        
          | 1702 | 
                              $('#rm_external_id').val('').focus(); | 
          1702 | 
                              $('#rm_external_id').val('').focus(); | 
        
        
          | 1703 | 
           | 
          1703 | 
           | 
        
        
          | 1704 | 
                          });  | 
          1704 | 
                          });  |