Koha/koha-tmpl/intranet-tmpl/prog/js
Pedro Amorim 354be012b0
Bug 36327: Update handling of item delete
This needs to be rewritten to .on('click') because the delete item link relevant to this patchset is appended to the dom, this is how we guarantee this event listener is attached to the appended link.
This also ensures the same item deletion logic is applied for both button: The delete button from the left 'Actions' dropdown and the 'Delete item' link that pops up when anywhere in the row is clicked

1) visit a biblio details view:
http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=230
2) Click anywhere on one of the items rows
3) Notice 2 actions show up "Edit item" and "Delete item"
4) Click "delete item"
5) Notice nothing happens in the UI
6) Notice console throws the following error:
cataloging_additem_23.1200007.js:29 Uncaught ReferenceError: confirm_deletion is not defined
    at HTMLAnchorElement.<anonymous> (cataloging_additem_23.1200007.js:29:17)
    at HTMLAnchorElement.dispatch (jquery-3.6.0.min_23.1200007.js:2:43064)
    at v.handle (jquery-3.6.0.min_23.1200007.js:2:41048)
7) Apply patches
8) Notice console error no longer shows
9) Notice delete confirmation is shown, notice clicking it deletes the correct item.
10) Notice the delete item link anywhere in the item row has the same behavior as the 'Delete' option under 'Actions' on the leftmost column of the table

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:45 +01:00
..
fetch Bug 36351: Pretty the api-client 2024-03-20 18:39:43 +01:00
modals Bug 36005: Fixed typo in "Your concern was successfully submitted." text 2024-03-08 18:58:21 +01:00
pages Bug 35718: Remove ES6 warns from JS system preferences 2024-03-08 18:58:22 +01:00
vue Bug 35329: Move patron search to modal - erm 2024-03-01 11:01:13 +01:00
acq.js
acquisitions-menu.js
additem.js Bug 35514: Fix total cost update when adding multiple items to order 2024-01-29 12:25:03 +01:00
addorderiso2709.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-01-26 15:13:40 +01:00
admin-menu.js
ajax.js
audio_alerts.js Bug 34478: Manual fix - audio alerts 2024-03-01 10:59:02 +01:00
auth-finder-search.js
authorities-detail-modal.js
authtype.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-01-26 15:13:40 +01:00
automatic_item_modification_by_age.js
basket.js
biblio_framework.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-01-26 15:13:40 +01:00
browser.js
calendar.js
cancel_booking_modal.js Bug 35475: Improve concatenated string and fix error in JS file 2024-01-16 12:05:58 +01:00
cart.js Bug 34478: SQUASH Follow-up to previous batch operations patches 2024-03-01 11:00:05 +01:00
cashup_modal.js
catalog.js Bug 34478: Fix delete from addbiblio 2024-03-01 11:00:20 +01:00
cataloging.js Bug 35554: Authority search popup width 800px 2024-03-07 15:02:50 +01:00
cataloging_additem.js Bug 36327: Update handling of item delete 2024-03-20 18:39:45 +01:00
categories.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-01-26 15:13:40 +01:00
charts.js
checkout_renewals_modal.js
checkouts.js Bug 35944: Add link to 'booked' biblio in checkouts table 2024-03-15 15:39:13 +01:00
cookieconsent.js
datatables.js Bug 35396: Replace Datatables' column filters throttling with input timeout 2024-01-29 12:25:04 +01:00
desk_selection.js
elasticsearch-mappings.js Bug 35265: Remove drag and drop in Elasticsearch mappings 2024-01-11 15:44:45 +01:00
file-upload.js Bug 36084: Fix file upload and www/batch.t 2024-03-01 11:01:01 +01:00
funds_sorts.js
holds.js Bug 34478: Manual fix - change links to JS form submission - change action to op - request.pl/.tt 2024-03-01 10:59:09 +01:00
ill-availability-partner.js
ill-availability.js
ill-batch-modal.js Bug 34282: Fix availability check in ILL batches 2024-01-31 14:44:39 +01:00
ill-batch-table.js Bug 36130: Fetch all batches for the table 2024-03-12 17:47:37 +01:00
ill-batch.js
ill-list-table.js Bug 35331: Add table actions hook to ILL table 2024-03-18 11:03:33 +01:00
item_search_fields.js
job_progress.js
letter.js
localcovers.js Bug 35557: Remove LoadResultsCovers 2023-12-27 19:06:04 +01:00
mana.js Bug 36084: svc - mana 2024-03-01 11:01:01 +01:00
marc_modification_templates.js Bug 34478: Fixes for MARC modification template management 2024-03-01 11:00:05 +01:00
marc_subfields_structure.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-01-26 15:13:40 +01:00
members-menu.js Bug 35344: Warn on patron image upload if missing cardnumber 2023-12-11 19:41:25 +01:00
members-patron-selections.js Bug 34479: Update syntax for translatable string 2024-01-16 16:35:05 +01:00
members.js Bug 26597: (Fix) remove REST API call and retrieve the patron's data from borrower_data input 2024-03-18 11:03:32 +01:00
merge-record.js
messaging-preference-form.js
modal_printer.js
onboarding.js
patron-webcam.js Bug 35344: Warn on patron image upload if missing cardnumber 2023-12-11 19:41:25 +01:00
place_booking_modal.js Bug 36215: (QA follow-up) Fix &? confusion 2024-03-15 09:38:35 +01:00
recalls.js Bug 36084: svc - recall 2024-03-01 11:00:57 +01:00
register_selection.js
resolve_claim_modal.js
restrictiontypes.js Bug 34913: DataTables upgrade: Update CSS and option names 2024-01-26 15:13:40 +01:00
rotating-collections.js Bug 34478: Item removal deletion should be POSTed form 2024-03-01 10:59:39 +01:00
select2.js
serials-toolbar.js Bug 34478: Adjust 'op' on serials/subscription-renew 2024-03-01 11:00:16 +01:00
showpredictionpattern.js
sms_providers.js Bug 34478: Correct op value for SMS provider deletion 2024-03-01 10:59:35 +01:00
staff-global.js Bug 35650: Standardize on 'Check the logs for details.' 2024-01-11 15:44:38 +01:00
subscription-add.js Bug 36084: svc - mana 2024-03-01 11:01:01 +01:00
table_filters.js Bug 34913: Fix Activate/Deactive filters with table_filters.js 2024-01-26 15:13:45 +01:00
tools-menu.js
upload-images.js Bug 36084: svc - cover_images 2024-03-01 11:00:52 +01:00
viewlog.js
xmlControlfield.js
z3950_search.js