Bug 19866 - Move template JavaScript to the footer: UNIMARC editor plugins, part 1
Summary: Move template JavaScript to the footer: UNIMARC editor plugins, part 1
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Whiteboard:
Keywords: Academy
Depends on: 19968
Blocks: 17858 19868
  Show dependency treegraph
 
Reported: 2017-12-21 17:14 UTC by Owen Leonard
Modified: 2018-04-23 22:49 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19866: Move template JavaScript to the footer: UNIMARC editor plugins, part 1 (20.56 KB, patch)
2017-12-21 17:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19866: Move template JavaScript to the footer: UNIMARC editor plugins, part 1 (20.62 KB, patch)
2018-03-12 10:11 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 19866: Move template JavaScript to the footer: UNIMARC editor plugins, part 1 (20.71 KB, patch)
2018-03-25 17:40 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2017-12-21 17:14:37 UTC
Most UNIMARC plugin templates already have JavaScript at the bottom of the template instead of the top, but they should still be modified to be consistent with other templates which have been updated as part of Bug 17858.
Comment 1 Owen Leonard 2017-12-21 17:24:43 UTC
Created attachment 70069 [details] [review]
Bug 19866: Move template JavaScript to the footer: UNIMARC editor plugins, part 1

This patch updates several UNIMARC plugin templates so that JavaScript
is included in the footer following the same pattern as other templates
which have been modified to fix Bug 17858.

To test you do not need a UNIMARC system.

Apply the patch and for each plugin, configure a MARC subfield (e.g.
100$a) to use that plugin.

From the MARC edit page, trigger the plugin and confirm that changes
made in the popup window are saved to the corresponding field in the
editor.

- unimarc_field_100.tt
- unimarc_field_100_authorities.tt
- unimarc_field_105.tt
- unimarc_field_106.tt
- unimarc_field_110.tt
- unimarc_field_115a.tt
- unimarc_field_115b.tt
Comment 2 Owen Leonard 2018-03-01 18:21:51 UTC
Here's a more thorough description of how this patch can be tested even if you don't have a UNIMARC system:

- Go to Administration -> MARC frameworks -> Default
  framework -> MARC structure

- For any tag (I like to use 000 because it's the first one),
  choose Actions -> Subfields.

- Edit any subfield you want to configure (choose one
  that isn't hidden).

- Expand the "Other options" panel and select the plugin you
  want to test under "Plugin."

- Save changes.

- Open an existing or new MARC record for editing in the
  standard MARC editor.

- Find the tag and subfield you just modified, and look for
  the small plugin trigger icon next to the form field.

- Confirm that clicking this link triggers the correct
  plugin (the pop-up window should have a heading with the
  correct plugin name).

- Make some changes to the options in the plugin window
  in a way that you will be able to confirm the changes
  are transferred to the field in the MARC editor. For
  instance, choose all the same codes for multiple fields.

- Submit your changes in the plugin's pop-up window.
  The window should close.

- Confirm that the values you submitted from the plugin
  window have been transferred to the correct field in the
  MARC editor.
Comment 3 Claire Gravely 2018-03-12 10:11:07 UTC
Created attachment 72631 [details] [review]
Bug 19866: Move template JavaScript to the footer: UNIMARC editor plugins, part 1

This patch updates several UNIMARC plugin templates so that JavaScript
is included in the footer following the same pattern as other templates
which have been modified to fix Bug 17858.

To test you do not need a UNIMARC system.

Apply the patch and for each plugin, configure a MARC subfield (e.g.
100$a) to use that plugin.

From the MARC edit page, trigger the plugin and confirm that changes
made in the popup window are saved to the corresponding field in the
editor.

- unimarc_field_100.tt
- unimarc_field_100_authorities.tt
- unimarc_field_105.tt
- unimarc_field_106.tt
- unimarc_field_110.tt
- unimarc_field_115a.tt
- unimarc_field_115b.tt

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 4 Katrin Fischer 2018-03-25 17:39:42 UTC
The pop-up for unimarc_field_106.pl is not sized right, but it's the same without the patch.
Comment 5 Katrin Fischer 2018-03-25 17:40:53 UTC
Created attachment 73248 [details] [review]
Bug 19866: Move template JavaScript to the footer: UNIMARC editor plugins, part 1

This patch updates several UNIMARC plugin templates so that JavaScript
is included in the footer following the same pattern as other templates
which have been modified to fix Bug 17858.

To test you do not need a UNIMARC system.

Apply the patch and for each plugin, configure a MARC subfield (e.g.
100$a) to use that plugin.

From the MARC edit page, trigger the plugin and confirm that changes
made in the popup window are saved to the corresponding field in the
editor.

- unimarc_field_100.tt
- unimarc_field_100_authorities.tt
- unimarc_field_105.tt
- unimarc_field_106.tt
- unimarc_field_110.tt
- unimarc_field_115a.tt
- unimarc_field_115b.tt

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2018-03-26 20:35:52 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens 2018-04-23 22:49:41 UTC
Awesome work all, enhancement, not backported for stable