https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266

--- Comment #18 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 182379
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182379&action=edit
Bug 32266: (follow-up) Add event listeners in correct context

As the datatable is redrawn asynchronously and on each interaction, the
initially defined event listeners have no effect. This yields a weird
rendering of the attribute edit form in a new page.

This patch makes the event listeners exist at the `$(#late_orders)`
level so they still apply to newly created cells on redrawing the
datatable.

A couple places get 'modernized' by using the arrow syntax for anonymous
functions. `e.target` is used instead of `$(this)` where it applies.

To test:
1. Without the patch, have some late orders
2. Try changing the delivery date or any of the notes
=> FAIL: You are sent to a new page
3. Apply this patch and reload
4. Repeat 2
=> SUCCESS: You are presented a nice modal instead (the original
behavior)
5. Change the values, verify the table is re-rendered and the values are
   correct
6. Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to