|
Lines 213-218
$(document).ready(function () {
Link Here
|
| 213 |
); |
213 |
); |
| 214 |
} |
214 |
} |
| 215 |
|
215 |
|
|
|
216 |
if (previous_patrons.length) { |
| 217 |
let p = previous_patrons[0]; |
| 218 |
$("#lastborrowerlink").show(); |
| 219 |
$("#lastborrowerlink").prop("title", `${p["name"]} (${p["card"]})`); |
| 220 |
$("#lastborrowerlink").prop( |
| 221 |
"href", |
| 222 |
`/cgi-bin/koha/circ/circulation.pl?borrowernumber=${p["borrowernumber"]}` |
| 223 |
); |
| 224 |
$("#lastborrower-window").css("display", "inline-flex"); |
| 225 |
|
| 226 |
previous_patrons.reverse(); |
| 227 |
for (i in previous_patrons) { |
| 228 |
p = previous_patrons[i]; |
| 229 |
const el = `<li><a class="dropdown-item" href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=${p["borrowernumber"]}">${p["name"]} (${p["card"]})</a></li>`; |
| 230 |
$("#lastBorrowerList").prepend(el); |
| 231 |
} |
| 232 |
} |
| 233 |
|
| 216 |
if ($("#hiddenborrowernumber").val()) { |
234 |
if ($("#hiddenborrowernumber").val()) { |
| 217 |
// Remove this patron from the list if they are already there |
235 |
// Remove this patron from the list if they are already there |
| 218 |
previous_patrons = previous_patrons.filter(function (p) { |
236 |
previous_patrons = previous_patrons.filter(function (p) { |
|
Lines 234-257
$(document).ready(function () {
Link Here
|
| 234 |
JSON.stringify(previous_patrons) |
252 |
JSON.stringify(previous_patrons) |
| 235 |
); |
253 |
); |
| 236 |
} |
254 |
} |
| 237 |
|
|
|
| 238 |
if (previous_patrons.length) { |
| 239 |
let p = previous_patrons[0]; |
| 240 |
$("#lastborrowerlink").show(); |
| 241 |
$("#lastborrowerlink").prop("title", `${p["name"]} (${p["card"]})`); |
| 242 |
$("#lastborrowerlink").prop( |
| 243 |
"href", |
| 244 |
`/cgi-bin/koha/circ/circulation.pl?borrowernumber=${p["borrowernumber"]}` |
| 245 |
); |
| 246 |
$("#lastborrower-window").css("display", "inline-flex"); |
| 247 |
|
| 248 |
previous_patrons.reverse(); |
| 249 |
for (i in previous_patrons) { |
| 250 |
p = previous_patrons[i]; |
| 251 |
const el = `<li><a class="dropdown-item" href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=${p["borrowernumber"]}">${p["name"]} (${p["card"]})</a></li>`; |
| 252 |
$("#lastBorrowerList").prepend(el); |
| 253 |
} |
| 254 |
} |
| 255 |
} |
255 |
} |
| 256 |
|
256 |
|
| 257 |
if ($("#hiddenborrowernumber").val()) { |
257 |
if ($("#hiddenborrowernumber").val()) { |
| 258 |
- |
|
|