|
Lines 508-552
Link Here
|
| 508 |
<h1>View ILL requests</h1> |
508 |
<h1>View ILL requests</h1> |
| 509 |
<div id="results"> |
509 |
<div id="results"> |
| 510 |
<h3>Details for all requests</h3> |
510 |
<h3>Details for all requests</h3> |
| 511 |
|
511 |
[% INCLUDE 'ill-list-table.inc' %] |
| 512 |
<table id="ill-requests"> |
|
|
| 513 |
<thead> |
| 514 |
<tr id="illview-header"> |
| 515 |
<th scope="col">Request ID</th> |
| 516 |
<th scope="col">Author</th> |
| 517 |
<th scope="col">Title</th> |
| 518 |
<th scope="col">Article title</th> |
| 519 |
<th scope="col">Issue</th> |
| 520 |
<th scope="col">Volume</th> |
| 521 |
<th scope="col">Year</th> |
| 522 |
<th scope="col">Pages</th> |
| 523 |
<th scope="col">Type</th> |
| 524 |
<th scope="col">Order ID</th> |
| 525 |
<th scope="col">Patron ID</th> |
| 526 |
<th scope="col" class="patron_cardnumber">Patron barcode</th> |
| 527 |
<th scope="col">Patron</th> |
| 528 |
<th scope="col">Biblio ID</th> |
| 529 |
<th scope="col">Branch</th> |
| 530 |
<th scope="col">Status</th> |
| 531 |
<th scope="col" class="placed"> </th> |
| 532 |
<th scope="col" class="placed_formatted">Placed on</th> |
| 533 |
<th scope="col">Replied</th> |
| 534 |
<th scope="col" class="updated"> </th> |
| 535 |
<th scope="col" class="updated_formatted">Updated on</th> |
| 536 |
<th scope="col">Replied</th> |
| 537 |
<th scope="col">Completed on</th> |
| 538 |
<th scope="col">Access URL</th> |
| 539 |
<th scope="col">Cost</th> |
| 540 |
<th scope="col">Comments</th> |
| 541 |
<th scope="col">OPAC notes</th> |
| 542 |
<th scope="col">Staff notes</th> |
| 543 |
<th scope="col">Backend</th> |
| 544 |
<th scope="col" class="actions"></th> |
| 545 |
</tr> |
| 546 |
</thead> |
| 547 |
<tbody id="illview-body"> |
| 548 |
</tbody> |
| 549 |
</table> |
| 550 |
</div> |
512 |
</div> |
| 551 |
[% ELSE %] |
513 |
[% ELSE %] |
| 552 |
<!-- Custom Backend Action --> |
514 |
<!-- Custom Backend Action --> |
|
Lines 558-1067
Link Here
|
| 558 |
</div> |
520 |
</div> |
| 559 |
</div> |
521 |
</div> |
| 560 |
|
522 |
|
| 561 |
[% TRY %] |
|
|
| 562 |
[% PROCESS backend_jsinclude %] |
| 563 |
[% CATCH %] |
| 564 |
[% END %] |
| 565 |
|
| 566 |
[% MACRO jsinclude BLOCK %] |
523 |
[% MACRO jsinclude BLOCK %] |
| 567 |
[% INCLUDE 'datatables.inc' %] |
524 |
[% INCLUDE 'datatables.inc' %] |
| 568 |
[% INCLUDE 'columns_settings.inc' %] |
525 |
[% INCLUDE 'columns_settings.inc' %] |
| 569 |
[% INCLUDE 'calendar.inc' %] |
526 |
[% INCLUDE 'calendar.inc' %] |
| 570 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
527 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
| 571 |
<script> |
528 |
<script> |
| 572 |
$(document).ready(function() { |
529 |
// Date format for datepickers |
| 573 |
|
530 |
var dateMap = { |
| 574 |
// Illview Datatable setup |
531 |
dmydot: 'dd.mm.yy', |
| 575 |
|
532 |
iso: 'yy-mm-dd', |
| 576 |
var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %]; |
533 |
metric: 'dd/mm/yy', |
| 577 |
|
534 |
us: 'mm/dd/yy' |
| 578 |
var table; |
535 |
}; |
| 579 |
|
536 |
var dateFormat = dateMap['[% Koha.Preference('dateformat') | html %]']; |
| 580 |
// Filters that are active |
537 |
var prefilters = '[% prefilters | html %]'; |
| 581 |
var activeFilters = {}; |
538 |
// Set column settings |
| 582 |
|
539 |
var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %]; |
| 583 |
// Fields we need to expand (flatten) |
|
|
| 584 |
var expand = [ |
| 585 |
'metadata', |
| 586 |
'patron', |
| 587 |
'library' |
| 588 |
]; |
| 589 |
|
| 590 |
// Expanded fields |
| 591 |
// This is auto populated |
| 592 |
var expanded = {}; |
| 593 |
|
| 594 |
// Filterable columns |
| 595 |
var filterable = { |
| 596 |
status: { |
| 597 |
prep: function(tableData, oData) { |
| 598 |
var uniques = {}; |
| 599 |
tableData.forEach(function(row) { |
| 600 |
var resolvedName; |
| 601 |
if (row.status_alias) { |
| 602 |
resolvedName = row.status_alias.lib; |
| 603 |
} else { |
| 604 |
resolvedName = getStatusName( |
| 605 |
oData[0].capabilities[row.status].name |
| 606 |
); |
| 607 |
} |
| 608 |
uniques[resolvedName] = 1 |
| 609 |
}); |
| 610 |
Object.keys(uniques).sort().forEach(function(unique) { |
| 611 |
$('#illfilter_status').append( |
| 612 |
'<option value="' + unique + |
| 613 |
'">' + unique + '</option>' |
| 614 |
); |
| 615 |
}); |
| 616 |
}, |
| 617 |
listener: function() { |
| 618 |
var me = 'status'; |
| 619 |
$('#illfilter_status').change(function() { |
| 620 |
var sel = $('#illfilter_status option:selected').val(); |
| 621 |
if (sel && sel.length > 0) { |
| 622 |
activeFilters[me] = function() { |
| 623 |
table.api().column(15).search(sel); |
| 624 |
} |
| 625 |
} else { |
| 626 |
if (activeFilters.hasOwnProperty(me)) { |
| 627 |
delete activeFilters[me]; |
| 628 |
} |
| 629 |
} |
| 630 |
}); |
| 631 |
}, |
| 632 |
clear: function() { |
| 633 |
$('#illfilter_status').val(''); |
| 634 |
} |
| 635 |
}, |
| 636 |
pickupBranch: { |
| 637 |
prep: function(tableData, oData) { |
| 638 |
var uniques = {}; |
| 639 |
tableData.forEach(function(row) { |
| 640 |
uniques[row.library_branchname] = 1 |
| 641 |
}); |
| 642 |
Object.keys(uniques).sort().forEach(function(unique) { |
| 643 |
$('#illfilter_branchname').append( |
| 644 |
'<option value="' + unique + |
| 645 |
'">' + unique + '</option>' |
| 646 |
); |
| 647 |
}); |
| 648 |
}, |
| 649 |
listener: function() { |
| 650 |
var me = 'pickupBranch'; |
| 651 |
$('#illfilter_branchname').change(function() { |
| 652 |
var sel = $('#illfilter_branchname option:selected').val(); |
| 653 |
if (sel && sel.length > 0) { |
| 654 |
activeFilters[me] = function() { |
| 655 |
table.api().column(14).search(sel); |
| 656 |
} |
| 657 |
} else { |
| 658 |
if (activeFilters.hasOwnProperty(me)) { |
| 659 |
delete activeFilters[me]; |
| 660 |
} |
| 661 |
} |
| 662 |
}); |
| 663 |
}, |
| 664 |
clear: function() { |
| 665 |
$('#illfilter_branchname').val(''); |
| 666 |
} |
| 667 |
}, |
| 668 |
barcode: { |
| 669 |
listener: function() { |
| 670 |
var me = 'barcode'; |
| 671 |
$('#illfilter_barcode').change(function() { |
| 672 |
var val = $('#illfilter_barcode').val(); |
| 673 |
if (val && val.length > 0) { |
| 674 |
activeFilters[me] = function() { |
| 675 |
table.api().column(11).search(val); |
| 676 |
} |
| 677 |
} else { |
| 678 |
if (activeFilters.hasOwnProperty(me)) { |
| 679 |
delete activeFilters[me]; |
| 680 |
} |
| 681 |
} |
| 682 |
}); |
| 683 |
}, |
| 684 |
clear: function() { |
| 685 |
$('#illfilter_barcode').val(''); |
| 686 |
} |
| 687 |
}, |
| 688 |
dateModified: { |
| 689 |
clear: function() { |
| 690 |
$('#illfilter_datemodified_start, #illfilter_datemodified_end').val(''); |
| 691 |
} |
| 692 |
}, |
| 693 |
datePlaced: { |
| 694 |
clear: function() { |
| 695 |
$('#illfilter_dateplaced_start, #illfilter_dateplaced_end').val(''); |
| 696 |
} |
| 697 |
} |
| 698 |
}; |
| 699 |
|
| 700 |
// Expand any fields we're expanding |
| 701 |
var expandExpand = function(row) { |
| 702 |
expand.forEach(function(thisExpand) { |
| 703 |
if (row.hasOwnProperty(thisExpand)) { |
| 704 |
if (!expanded.hasOwnProperty(thisExpand)) { |
| 705 |
expanded[thisExpand] = []; |
| 706 |
} |
| 707 |
var expandObj = row[thisExpand]; |
| 708 |
Object.keys(expandObj).forEach( |
| 709 |
function(thisExpandCol) { |
| 710 |
var expColName = thisExpand + '_' + thisExpandCol.replace(/\s/g,'_'); |
| 711 |
// Keep a list of fields that have been expanded |
| 712 |
// so we can create toggle links for them |
| 713 |
if (expanded[thisExpand].indexOf(expColName) == -1) { |
| 714 |
expanded[thisExpand].push(expColName); |
| 715 |
} |
| 716 |
expandObj[expColName] = |
| 717 |
expandObj[thisExpandCol]; |
| 718 |
delete expandObj[thisExpandCol]; |
| 719 |
} |
| 720 |
); |
| 721 |
$.extend(true, row, expandObj); |
| 722 |
delete row[thisExpand]; |
| 723 |
} |
| 724 |
}); |
| 725 |
}; |
| 726 |
|
| 727 |
// Strip the expand prefix if it exists, we do this for display |
| 728 |
var stripPrefix = function(value) { |
| 729 |
expand.forEach(function(thisExpand) { |
| 730 |
var regex = new RegExp(thisExpand + '_', 'g'); |
| 731 |
value = value.replace(regex, ''); |
| 732 |
}); |
| 733 |
return value; |
| 734 |
}; |
| 735 |
|
| 736 |
// Our 'render' function for borrowerlink |
| 737 |
var createPatronLink = function(data, type, row) { |
| 738 |
var patronLink = '<a title="' + _("View borrower details") + '" ' + |
| 739 |
'href="/cgi-bin/koha/members/moremember.pl?' + |
| 740 |
'borrowernumber='+row.borrowernumber+'">'; |
| 741 |
if ( row.patron_firstname ) { |
| 742 |
patronLink = patronLink + row.patron_firstname + ' '; |
| 743 |
} |
| 744 |
patronLink = patronLink + row.patron_surname + '</a>'; |
| 745 |
return patronLink; |
| 746 |
}; |
| 747 |
|
| 748 |
// Our 'render' function for biblio_id |
| 749 |
var createBiblioLink = function(data, type, row) { |
| 750 |
return (row.biblio_id) ? |
| 751 |
'<a title="' + _("View biblio details") + '" ' + |
| 752 |
'href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + |
| 753 |
row.biblio_id + '">' + |
| 754 |
row.biblio_id + |
| 755 |
'</a>' : ''; |
| 756 |
}; |
| 757 |
|
| 758 |
// Render function for request ID |
| 759 |
var createRequestId = function(data, type, row) { |
| 760 |
return row.id_prefix + row.illrequest_id; |
| 761 |
}; |
| 762 |
|
| 763 |
// Render function for type |
| 764 |
var createType = function(data, type, row) { |
| 765 |
if (!row.hasOwnProperty('metadata_Type') || !row.metadata_Type) { |
| 766 |
if (row.hasOwnProperty('medium') && row.medium) { |
| 767 |
row.metadata_Type = row.medium; |
| 768 |
} else { |
| 769 |
row.metadata_Type = null; |
| 770 |
} |
| 771 |
} |
| 772 |
return row.metadata_Type; |
| 773 |
}; |
| 774 |
|
| 775 |
// Render function for request status |
| 776 |
var createStatus = function(data, type, row, meta) { |
| 777 |
if (row.status_alias) { |
| 778 |
return row.status_alias.lib |
| 779 |
? row.status_alias.lib |
| 780 |
: row.status_alias.authorised_value; |
| 781 |
} else { |
| 782 |
var origData = meta.settings.oInit.originalData; |
| 783 |
if (origData.length > 0) { |
| 784 |
var status_name = meta.settings.oInit.originalData[0].capabilities[ |
| 785 |
row.status |
| 786 |
].name; |
| 787 |
return getStatusName(status_name, row); |
| 788 |
} else { |
| 789 |
return ''; |
| 790 |
} |
| 791 |
} |
| 792 |
}; |
| 793 |
|
| 794 |
var getStatusName = function(origName, row) { |
| 795 |
switch( origName ) { |
| 796 |
case "New request": |
| 797 |
return _("New request"); |
| 798 |
case "Requested": |
| 799 |
return _("Requested"); |
| 800 |
case "Requested from partners": |
| 801 |
var statStr = _("Requested from partners"); |
| 802 |
if ( |
| 803 |
row.hasOwnProperty('requested_partners') && |
| 804 |
row.requested_partners && |
| 805 |
row.requested_partners.length > 0 |
| 806 |
) { |
| 807 |
statStr += ' (' + row.requested_partners + ')'; |
| 808 |
} |
| 809 |
return statStr; |
| 810 |
case "Request reverted": |
| 811 |
return _("Request reverted"); |
| 812 |
case "Queued request": |
| 813 |
return _("Queued request"); |
| 814 |
case "Cancellation requested": |
| 815 |
return _("Cancellation requested"); |
| 816 |
case "Completed": |
| 817 |
return _("Completed"); |
| 818 |
case "Delete request": |
| 819 |
return _("Delete request"); |
| 820 |
default: |
| 821 |
return origName; |
| 822 |
} |
| 823 |
}; |
| 824 |
|
| 825 |
// Render function for creating a row's action link |
| 826 |
var createActionLink = function(data, type, row) { |
| 827 |
return '<a class="btn btn-default btn-sm" ' + |
| 828 |
'href="/cgi-bin/koha/ill/ill-requests.pl?' + |
| 829 |
'method=illview&illrequest_id=' + |
| 830 |
row.illrequest_id + |
| 831 |
'">' + _("Manage request") + '</a>'; |
| 832 |
}; |
| 833 |
|
| 834 |
// Columns that require special treatment |
| 835 |
var specialCols = { |
| 836 |
action: { |
| 837 |
func: createActionLink |
| 838 |
}, |
| 839 |
borrowernumber: { |
| 840 |
func: createPatronLink |
| 841 |
}, |
| 842 |
illrequest_id: { |
| 843 |
func: createRequestId |
| 844 |
}, |
| 845 |
status: { |
| 846 |
func: createStatus |
| 847 |
}, |
| 848 |
biblio_id: { |
| 849 |
name: _("Bibliograpic record ID"), |
| 850 |
func: createBiblioLink |
| 851 |
}, |
| 852 |
metadata_Type: { |
| 853 |
func: createType |
| 854 |
}, |
| 855 |
updated: { |
| 856 |
name: _("Updated on"), |
| 857 |
}, |
| 858 |
patron_cardnumber: { |
| 859 |
name: _("Cardnumber") |
| 860 |
} |
| 861 |
}; |
| 862 |
|
| 863 |
// Display the modal containing request supplier metadata |
| 864 |
$('#ill-request-display-log').on('click', function(e) { |
| 865 |
e.preventDefault(); |
| 866 |
$('#requestLog').modal({show:true}); |
| 867 |
}); |
| 868 |
|
| 869 |
// Toggle request attributes in Illview |
| 870 |
$('#toggle_requestattributes').on('click', function(e) { |
| 871 |
e.preventDefault(); |
| 872 |
$('#requestattributes').toggleClass('content_hidden'); |
| 873 |
}); |
| 874 |
|
| 875 |
// Toggle new comment form in Illview |
| 876 |
$('#toggle_addcomment').on('click', function(e) { |
| 877 |
e.preventDefault(); |
| 878 |
$('#addcomment').toggleClass('content_hidden'); |
| 879 |
}); |
| 880 |
|
| 881 |
// Filter partner list |
| 882 |
$('#partner_filter').keyup(function() { |
| 883 |
var needle = $('#partner_filter').val(); |
| 884 |
$('#partners > option').each(function() { |
| 885 |
var regex = new RegExp(needle, 'i'); |
| 886 |
if ( |
| 887 |
needle.length == 0 || |
| 888 |
$(this).is(':selected') || |
| 889 |
$(this).text().match(regex) |
| 890 |
) { |
| 891 |
$(this).show(); |
| 892 |
} else { |
| 893 |
$(this).hide(); |
| 894 |
} |
| 895 |
}); |
| 896 |
}); |
| 897 |
|
| 898 |
// Display the modal containing request supplier metadata |
| 899 |
$('#ill-request-display-metadata').on('click', function(e) { |
| 900 |
e.preventDefault(); |
| 901 |
$('#dataPreview').modal({show:true}); |
| 902 |
}); |
| 903 |
|
| 904 |
// Get our data from the API and process it prior to passing |
| 905 |
// it to datatables |
| 906 |
var ajax = $.ajax( |
| 907 |
'/api/v1/illrequests?embed=metadata,patron,capabilities,library,status_alias' |
| 908 |
).done(function() { |
| 909 |
var data = JSON.parse(ajax.responseText); |
| 910 |
// Make a copy, we'll be removing columns next and need |
| 911 |
// to be able to refer to data that has been removed |
| 912 |
var dataCopy = $.extend(true, [], data); |
| 913 |
// Expand columns that need it and create an array |
| 914 |
// of all column names |
| 915 |
$.each(dataCopy, function(k, row) { |
| 916 |
expandExpand(row); |
| 917 |
}); |
| 918 |
|
| 919 |
// Assemble an array of column definitions for passing |
| 920 |
// to datatables |
| 921 |
var colData = []; |
| 922 |
columns_settings.forEach(function(thisCol) { |
| 923 |
var colName = thisCol.columnname; |
| 924 |
// Create the base column object |
| 925 |
var colObj = $.extend({}, thisCol); |
| 926 |
colObj.name = colName; |
| 927 |
colObj.className = colName; |
| 928 |
colObj.defaultContent = ''; |
| 929 |
|
| 930 |
// We may need to process the data going in this |
| 931 |
// column, so do it if necessary |
| 932 |
if ( |
| 933 |
specialCols.hasOwnProperty(colName) && |
| 934 |
specialCols[colName].hasOwnProperty('func') |
| 935 |
) { |
| 936 |
colObj.render = specialCols[colName].func; |
| 937 |
} else { |
| 938 |
colObj.data = colName; |
| 939 |
} |
| 940 |
// Make sure properties that aren't present in the API |
| 941 |
// response are populated with null to avoid Datatables |
| 942 |
// choking on their absence |
| 943 |
dataCopy.forEach(function(thisData) { |
| 944 |
if (!thisData.hasOwnProperty(colName)) { |
| 945 |
thisData[colName] = null; |
| 946 |
} |
| 947 |
}); |
| 948 |
colData.push(colObj); |
| 949 |
}); |
| 950 |
|
| 951 |
// Initialise the datatable |
| 952 |
table = KohaTable("ill-requests", {}) |
| 953 |
var illTable = KohaTable("ill-requests", { |
| 954 |
'aoColumnDefs': [ |
| 955 |
{ // Last column shouldn't be sortable or searchable |
| 956 |
'aTargets': [ 'actions' ], |
| 957 |
'bSortable': false, |
| 958 |
'bSearchable': false |
| 959 |
}, |
| 960 |
{ // When sorting 'placed', we want to use the |
| 961 |
// unformatted column |
| 962 |
'aTargets': [ 'placed_formatted'], |
| 963 |
'iDataSort': 16 |
| 964 |
}, |
| 965 |
{ // When sorting 'updated', we want to use the |
| 966 |
// unformatted column |
| 967 |
'aTargets': [ 'updated_formatted'], |
| 968 |
'iDataSort': 18 |
| 969 |
}, |
| 970 |
{ |
| 971 |
'aTargets': [ 'patron_cardnumber' ], |
| 972 |
'bVisible': false, |
| 973 |
'bSearchable': true |
| 974 |
} |
| 975 |
], |
| 976 |
'aaSorting': [[ 18, 'desc' ]], // Default sort, updated descending |
| 977 |
'processing': true, // Display a message when manipulating |
| 978 |
'sPaginationType': "full_numbers", // Pagination display |
| 979 |
'deferRender': true, // Improve performance on big datasets |
| 980 |
'data': dataCopy, |
| 981 |
'columns': colData, |
| 982 |
'originalData': data, // Enable render functions to access |
| 983 |
// our original data |
| 984 |
'initComplete': function() { |
| 985 |
|
| 986 |
// Prepare any filter elements that need it |
| 987 |
for (var el in filterable) { |
| 988 |
if (filterable.hasOwnProperty(el)) { |
| 989 |
if (filterable[el].hasOwnProperty('prep')) { |
| 990 |
filterable[el].prep(dataCopy, data); |
| 991 |
} |
| 992 |
if (filterable[el].hasOwnProperty('listener')) { |
| 993 |
filterable[el].listener(); |
| 994 |
} |
| 995 |
} |
| 996 |
} |
| 997 |
|
| 998 |
} |
| 999 |
}, columns_settings); |
| 1000 |
|
| 1001 |
// Custom date range filtering |
| 1002 |
$.fn.dataTable.ext.search.push(function(settings, data, dataIndex) { |
| 1003 |
var placedStart = $('#illfilter_dateplaced_start').datepicker('getDate'); |
| 1004 |
var placedEnd = $('#illfilter_dateplaced_end').datepicker('getDate'); |
| 1005 |
var modifiedStart = $('#illfilter_datemodified_start').datepicker('getDate'); |
| 1006 |
var modifiedEnd = $('#illfilter_datemodified_end').datepicker('getDate'); |
| 1007 |
var rowPlaced = data[16] ? new Date(data[16]) : null; |
| 1008 |
var rowModified = data[18] ? new Date(data[18]) : null; |
| 1009 |
var placedPassed = true; |
| 1010 |
var modifiedPassed = true; |
| 1011 |
if (placedStart && rowPlaced && rowPlaced < placedStart) { |
| 1012 |
placedPassed = false |
| 1013 |
}; |
| 1014 |
if (placedEnd && rowPlaced && rowPlaced > placedEnd) { |
| 1015 |
placedPassed = false; |
| 1016 |
} |
| 1017 |
if (modifiedStart && rowModified && rowModified < modifiedStart) { |
| 1018 |
modifiedPassed = false |
| 1019 |
}; |
| 1020 |
if (modifiedEnd && rowModified && rowModified > modifiedEnd) { |
| 1021 |
modifiedPassed = false; |
| 1022 |
} |
| 1023 |
|
| 1024 |
return placedPassed && modifiedPassed; |
| 1025 |
|
| 1026 |
}); |
| 1027 |
|
| 1028 |
} |
| 1029 |
); |
| 1030 |
|
| 1031 |
var clearSearch = function() { |
| 1032 |
table.api().search('').columns().search(''); |
| 1033 |
activeFilters = {}; |
| 1034 |
for (var filter in filterable) { |
| 1035 |
if ( |
| 1036 |
filterable.hasOwnProperty(filter) && |
| 1037 |
filterable[filter].hasOwnProperty('clear') |
| 1038 |
) { |
| 1039 |
filterable[filter].clear(); |
| 1040 |
} |
| 1041 |
} |
| 1042 |
table.api().draw(); |
| 1043 |
}; |
| 1044 |
|
| 1045 |
// Apply any search filters, or clear any previous |
| 1046 |
// ones |
| 1047 |
$('#illfilter_form').submit(function(event) { |
| 1048 |
event.preventDefault(); |
| 1049 |
table.search('').columns().search(''); |
| 1050 |
for (var active in activeFilters) { |
| 1051 |
if (activeFilters.hasOwnProperty(active)) { |
| 1052 |
activeFilters[active](); |
| 1053 |
} |
| 1054 |
} |
| 1055 |
table.api().draw(); |
| 1056 |
}); |
| 1057 |
|
| 1058 |
// Clear all filters |
| 1059 |
$('#clear_search').click(function() { |
| 1060 |
clearSearch(); |
| 1061 |
}); |
| 1062 |
|
| 1063 |
}); |
| 1064 |
</script> |
540 |
</script> |
|
|
541 |
[% Asset.js("js/ill-list-table.js") | $raw %] |
| 542 |
[% END %] |
| 543 |
|
| 544 |
[% TRY %] |
| 545 |
[% PROCESS backend_jsinclude %] |
| 546 |
[% CATCH %] |
| 1065 |
[% END %] |
547 |
[% END %] |
| 1066 |
|
548 |
|
| 1067 |
[% INCLUDE 'intranet-bottom.inc' %] |
549 |
[% INCLUDE 'intranet-bottom.inc' %] |