|
Lines 8-13
Link Here
|
| 8 |
<script type="text/javascript"> |
8 |
<script type="text/javascript"> |
| 9 |
//<![CDATA[ |
9 |
//<![CDATA[ |
| 10 |
$(document).ready(function() { |
10 |
$(document).ready(function() { |
|
|
11 |
var patronExportModal = $("#patronExportModal"); |
| 12 |
var patronExportModalBody = $("#patronExportModal .modal-body") |
| 13 |
|
| 11 |
$('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, { |
14 |
$('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, { |
| 12 |
"autoWidth": false, |
15 |
"autoWidth": false, |
| 13 |
"aoColumnDefs": [ |
16 |
"aoColumnDefs": [ |
|
Lines 20-30
Link Here
|
| 20 |
var list = $(this).data("list-name"); |
23 |
var list = $(this).data("list-name"); |
| 21 |
return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) ); |
24 |
return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) ); |
| 22 |
}); |
25 |
}); |
| 23 |
$(".print_cards").on("click",function(e){ |
26 |
|
|
|
27 |
$(".print_cards").on("click", function(e){ |
| 28 |
e.preventDefault(); |
| 29 |
var page = $(this).attr("href"); |
| 30 |
patronExportModalBody.load(page + " #exportingf"); |
| 31 |
patronExportModal.modal("show"); |
| 32 |
}); |
| 33 |
|
| 34 |
patronExportModal.on("hidden", function(){ |
| 35 |
patronExportModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); |
| 36 |
}); |
| 37 |
|
| 38 |
patronExportModal.on("submit", "#exportingf", function(e){ |
| 39 |
e.preventDefault(); |
| 40 |
modal_body = patronExportModalBody; |
| 41 |
modal_body.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); |
| 42 |
target_url = $(this).attr("action"); |
| 43 |
params = $( this ).serialize(); |
| 44 |
modal_body.load( target_url + "?" + params + " #custom-doc"); |
| 45 |
}); |
| 46 |
|
| 47 |
patronExportModal.on("click",".closebtn,.gb-close",function(e){ |
| 24 |
e.preventDefault(); |
48 |
e.preventDefault(); |
| 25 |
var patron_list_id = $(this).data("patron_list_id"); |
49 |
patronExportModal.modal("hide"); |
| 26 |
GB_showCenter(_("Print patron cards from list"), "/cgi-bin/koha/patroncards/print.pl?patronlist_id=" + patron_list_id, 400, 800); |
|
|
| 27 |
}); |
50 |
}); |
|
|
51 |
|
| 28 |
}); |
52 |
}); |
| 29 |
//]]> |
53 |
//]]> |
| 30 |
</script> |
54 |
</script> |
|
Lines 76-82
Link Here
|
| 76 |
<li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id %]" data-list-name="[% l.name %]"><i class="fa fa-trash"></i> Delete list</a></li> |
100 |
<li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id %]" data-list-name="[% l.name %]"><i class="fa fa-trash"></i> Delete list</a></li> |
| 77 |
[% IF ( l.patron_list_patrons_rs.count ) %] |
101 |
[% IF ( l.patron_list_patrons_rs.count ) %] |
| 78 |
<li class="divider"></li> |
102 |
<li class="divider"></li> |
| 79 |
<li><a href="#" class="print_cards" data-patron_list_id="[% l.patron_list_id %]"><i class="fa fa-print"></i> Print patron cards</a></li> |
103 |
<li> |
|
|
104 |
<a class="print_cards" href="/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id %]" data-patron_list_id="[% l.patron_list_id %]"><i class="fa fa-print"></i> Print patron cards</a> |
| 105 |
</li> |
| 80 |
[% IF CAN_user_tools_edit_patrons %] |
106 |
[% IF CAN_user_tools_edit_patrons %] |
| 81 |
<li> |
107 |
<li> |
| 82 |
<a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id %]&op=show"> |
108 |
<a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id %]&op=show"> |
|
Lines 99-104
Link Here
|
| 99 |
[% END %] |
125 |
[% END %] |
| 100 |
</tbody> |
126 |
</tbody> |
| 101 |
</table> |
127 |
</table> |
|
|
128 |
|
| 129 |
<!-- Modal to print patron cards --> |
| 130 |
<div class="modal hide" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true"> |
| 131 |
<div class="modal-header"> |
| 132 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
| 133 |
<h3 id="patronExportModal_label">Print patron cards</h3> |
| 134 |
</div> |
| 135 |
<div class="modal-body"> |
| 136 |
<div id="loading"> <img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> Loading </div> |
| 137 |
</div> |
| 138 |
</div> |
| 139 |
|
| 102 |
[% ELSE %] |
140 |
[% ELSE %] |
| 103 |
<div class="dialog message">There are no patron lists.</div> |
141 |
<div class="dialog message">There are no patron lists.</div> |
| 104 |
[% END %] |
142 |
[% END %] |