@@ -, +, @@ fields/subfields 'mouseover' and 'mousemove' are not used and would trigger too much events. 'keypress' is also not used, and is deprecated It just makes the code a lot less complicated. - Go to every page that has a MARC editor and verify that plugins still work. This includes addbiblio.pl, additem.pl, authorities.pl, neworderempty.pl, orderreceive.pl - Test plugins that use 'focus' event (for instance barcode.pl), 'blur' event (callnumber.pl) and 'click' event (almost all the others) - Test that plugins work on cloned fields/subfields --- C4/Items.pm | 2 +- Koha/FrameworkPlugin.pm | 84 ++------------- Koha/UI/Form/Builder/Item.pm | 1 + authorities/authorities.pl | 1 + cataloguing/value_builder/EXAMPLE.pl | 26 +---- .../prog/en/includes/html_helpers.inc | 6 +- .../prog/en/modules/acqui/neworderempty.tt | 2 +- .../prog/en/modules/acqui/orderreceive.tt | 2 +- .../en/modules/authorities/authorities.tt | 4 +- .../prog/en/modules/cataloguing/addbiblio.tt | 8 +- .../prog/en/modules/cataloguing/additem.tt | 2 +- koha-tmpl/intranet-tmpl/prog/js/additem.js | 14 --- koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 101 ++++++++---------- 13 files changed, 72 insertions(+), 181 deletions(-) --- a/C4/Items.pm +++ a/C4/Items.pm @@ -1520,7 +1520,7 @@ sub PrepareItemrecordDisplay { my $tab= $plugin->noclick? '-1': ''; my $class= $plugin->noclick? ' disabled': ''; my $title= $plugin->noclick? 'No popup': 'Tag editor'; - $subfield_data{marc_value} = qq[...\n].$plugin->javascript; + $subfield_data{marc_value} = qq[...\n].$plugin->javascript; } else { warn $plugin->errstr; $subfield_data{marc_value} = qq(); # supply default input form --- a/Koha/FrameworkPlugin.pm +++ a/Koha/FrameworkPlugin.pm @@ -297,94 +297,24 @@ sub _process_javascript { $script =~ s/\ -HERE +JS } =head1 AUTHOR --- a/Koha/UI/Form/Builder/Item.pm +++ a/Koha/UI/Form/Builder/Item.pm @@ -336,6 +336,7 @@ sub generate_subfield_form { class => $class, nopopup => $plugin->noclick, javascript => $plugin->javascript, + plugin => $plugin->name, }; } else { --- a/authorities/authorities.pl +++ a/authorities/authorities.pl @@ -199,6 +199,7 @@ sub create_input { maxlength => $max_length, javascript => $plugin->javascript, noclick => $plugin->noclick, + plugin => $plugin->name, }; } else { # warn and supply default field warn $plugin->errstr; --- a/cataloguing/value_builder/EXAMPLE.pl +++ a/cataloguing/value_builder/EXAMPLE.pl @@ -65,37 +65,19 @@ my $builder= sub { |; }; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc @@ -144,11 +144,11 @@ [% IF mv.readonly %] [% ELSE %] - + [% IF ( mv.nopopup ) %] - ... + ... [% ELSE %] - ... + ... [% END %] [% UNLESS no_plugin %][%# FIXME - from batchMod-edit, jQuery is included at the end of the template and cataloguing plugins are not working in this situation %] [%- mv.javascript | $raw -%] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -528,7 +528,7 @@
[% END %] - + [% END %][%# | html UNLESS subscriptionid %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -242,7 +242,7 @@ used [% END %] - +