Bug 42133: Restore plugins when editing items in batch
It has been broken then fixed then broken again, several times...
This patch fixes 2 problems:
1. The CSRF fix (I think it's coming from there) didn't adjust the 'if show' test and the JS code from plugins was not injected into the template
2. The selector to call the plugin didn't include this view, only the
add/edit items
Test plan:
Confirm that you can now use cataloging plugins when editing items in
batch
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7c0880a9ec)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
parent
b7aae6c275
commit
952163d02f
|
|
@ -349,7 +349,7 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
[% IF ( show ) %]
|
||||
[% IF op == 'cud-action' %]
|
||||
[%- # Loop over fields which may have plugin JavaScript -%]
|
||||
[%- UNLESS (too_many_items_process) -%]
|
||||
[%- FOREACH subfield IN subfields -%]
|
||||
|
|
|
|||
|
|
@ -843,12 +843,12 @@ $(document).ready(function () {
|
|||
// We use delegated event handlers here so that dynamically added elements
|
||||
// (like when cloning a field or a subfield) respond to these events
|
||||
// without having to re-attach events manually
|
||||
$(".marc_editor").on(
|
||||
$(".marc_editor, .item_edit_form").on(
|
||||
"click",
|
||||
".tag_editor.framework_plugin",
|
||||
callClickPluginEventHandler
|
||||
);
|
||||
$(".marc_editor").on(
|
||||
$(".marc_editor, .item_edit_form").on(
|
||||
"focusin focusout change mousedown mouseup keydown keyup",
|
||||
"input.input_marceditor.framework_plugin",
|
||||
callPluginEventHandler
|
||||
|
|
|
|||
Loading…
Reference in New Issue