Lines 178-183
Link Here
|
178 |
<button class="btn btn-default btn-xs choose_entry" data-record-hashvalue="[% record.hashvalue | html %]"><i class="fa fa-plus"></i> Choose</button> |
178 |
<button class="btn btn-default btn-xs choose_entry" data-record-hashvalue="[% record.hashvalue | html %]"><i class="fa fa-plus"></i> Choose</button> |
179 |
[% END %] |
179 |
[% END %] |
180 |
<button class="btn btn-default btn-xs download_entry" data-record-id="[% record.id | html %]"><i class="fa fa-download"></i> Download</button> |
180 |
<button class="btn btn-default btn-xs download_entry" data-record-id="[% record.id | html %]"><i class="fa fa-download"></i> Download</button> |
|
|
181 |
<button class="btn btn-default btn-xs copy_entry" data-record-hashvalue="[% record.hashvalue | html %]"><i class="fa fa-copy"></i> Copy link</button> |
181 |
[% IF record.owner == owner || CAN_user_tools_upload_manage %] |
182 |
[% IF record.owner == owner || CAN_user_tools_upload_manage %] |
182 |
<button class="btn btn-default btn-xs delete_entry" data-record-id="[% record.id | html %]"><i class="fa fa-trash"></i> Delete</button> |
183 |
<button class="btn btn-default btn-xs delete_entry" data-record-id="[% record.id | html %]"><i class="fa fa-trash"></i> Delete</button> |
183 |
[% END %] |
184 |
[% END %] |
Lines 416-421
Link Here
|
416 |
var record_id = $(this).data("record-id"); |
417 |
var record_id = $(this).data("record-id"); |
417 |
SubmitMe( 'download', record_id ); |
418 |
SubmitMe( 'download', record_id ); |
418 |
}); |
419 |
}); |
|
|
420 |
$(".copy_entry").on("click",function(e){ |
421 |
e.preventDefault(); |
422 |
var record_hashvalue = $(this).data("record-hashvalue"); |
423 |
var res = '[% Koha.Preference('OPACBaseURL') | html %]'; |
424 |
res = res + '/cgi-bin/koha/opac-retrieve-file.pl?id=' + record_hashvalue; |
425 |
if (res){ |
426 |
//If Clipboard API available, use it to write secretly and directly to browser clipboard |
427 |
if (navigator.clipboard){ |
428 |
var promise = navigator.clipboard.writeText(res); |
429 |
} |
430 |
//The Clipboard API isn't available to all browsers, so show a modal for people to copy from manually |
431 |
var popup = '<div class="modal fade"><div class="modal-dialog"><div class="modal-content"><div class="modal-body">'+res+'</div></div></div></div>' |
432 |
$(popup).modal(); |
433 |
} |
434 |
|
435 |
console.log(res); |
436 |
}); |
419 |
$(".delete_entry").on("click",function(e){ |
437 |
$(".delete_entry").on("click",function(e){ |
420 |
e.preventDefault(); |
438 |
e.preventDefault(); |
421 |
var record_id = $(this).data("record-id"); |
439 |
var record_id = $(this).data("record-id"); |
422 |
- |
|
|