|
Lines 134-155
Link Here
|
| 134 |
$("#table_listnopatron").kohaTable(patron_lists_dt_params); |
134 |
$("#table_listnopatron").kohaTable(patron_lists_dt_params); |
| 135 |
$("#table_inlists").kohaTable(patron_lists_dt_params); |
135 |
$("#table_inlists").kohaTable(patron_lists_dt_params); |
| 136 |
|
136 |
|
| 137 |
if (permissions.CAN_user_tools_manage_patron_lists){ |
137 |
if (permissions.CAN_user_tools_manage_patron_lists) { |
| 138 |
function addToList() { |
138 |
function addToList() { |
| 139 |
var list_id = $("#add_to_patron_list_id_select").val(); |
139 |
var list_id = $("#add_to_patron_list_id_select").val(); |
| 140 |
$('#pat_lists_panel').text(_("Loading...")); |
140 |
$("#pat_lists_panel").text(_("Loading...")); |
| 141 |
$("body").css("cursor", "progress"); |
141 |
$("body").css("cursor", "progress"); |
| 142 |
$('#pat_lists_panel').load(`/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=${patron_id}&patron_list_id=${list_id}&patrons_to_add=${cardnumber}, function() { |
142 |
$("#pat_lists_panel").load(`/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=${patron_id}&patron_list_id=${list_id}&patrons_to_add=${cardnumber}`, function () { |
| 143 |
$("body").css("cursor", "default"); |
143 |
$("body").css("cursor", "default"); |
| 144 |
}); |
144 |
}); |
| 145 |
|
145 |
|
| 146 |
return false; |
146 |
return false; |
| 147 |
} |
147 |
} |
| 148 |
|
148 |
|
| 149 |
function removeFromList( list_id, patron_list_patron_id ) { |
149 |
function removeFromList(list_id, patron_list_patron_id) { |
| 150 |
$('#pat_lists_panel').text(_("Loading...")); |
150 |
$("#pat_lists_panel").text(_("Loading...")); |
| 151 |
$("body").css("cursor", "progress"); |
151 |
$("body").css("cursor", "progress"); |
| 152 |
$('#pat_lists_panel').load(`/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=${patron_id}&patron_list_id=${list_id}&patrons_to_remove=${patron_list_patron_id}`, function() { |
152 |
$("#pat_lists_panel").load(`/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=${patron_id}&patron_list_id=${list_id}&patrons_to_remove=${patron_list_patron_id}`, function () { |
| 153 |
$("body").css("cursor", "default"); |
153 |
$("body").css("cursor", "default"); |
| 154 |
}); |
154 |
}); |
| 155 |
|
155 |
|
| 156 |
- |
|
|