Bug 16962 - Remove the use of "onclick" from serial collection template
Summary: Remove the use of "onclick" from serial collection template
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Josef Moravec
URL:
Keywords: Academy
Depends on:
Blocks: 17858
  Show dependency treegraph
 
Reported: 2016-07-22 13:18 UTC by Owen Leonard
Modified: 2020-05-08 19:38 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
This patch removes the use of event attributes like "onclick" from the serial collection template. Events are now defined in JavaScript. This is a behind the scenes improvement - everything should continue to work as it did before.
Version(s) released in:
20.05.00


Attachments
Bug 16962 - Remove the use of "onclick" from serial collection and serial edit templates (20.52 KB, patch)
2016-07-22 14:23 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16962 - Remove the use of "onclick" from serial collection and serial edit templates (20.70 KB, patch)
2016-08-01 17:50 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 16962 - Remove the use of "onclick" from serial collection and serial edit templates (20.72 KB, patch)
2016-08-02 10:27 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16962 - Remove the use of "onclick" from serial collection and serial edit templates (20.38 KB, patch)
2017-01-18 21:36 UTC, Gracie
Details | Diff | Splinter Review
Screenshot of formatting issue on serial collection page (10.88 KB, image/png)
2017-10-07 23:10 UTC, Katrin Fischer
Details
Bug 16962: Remove the use of "onclick" from serial collection template (7.41 KB, patch)
2020-03-17 18:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16962: Remove the use of "onclick" from serial collection template (7.63 KB, patch)
2020-04-09 15:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16962: Remove the use of "onclick" from serial collection template (7.67 KB, patch)
2020-04-21 06:35 UTC, David Nind
Details | Diff | Splinter Review
Bug 16962: Remove the use of "onclick" from serial collection template (7.73 KB, patch)
2020-04-21 14:47 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2016-07-22 13:18:09 UTC
There are many uses of "onclick" and other event attributes in the Serials module templates. This bug will track changes to serials-collection.tt and serials-edit.tt
Comment 1 Owen Leonard 2016-07-22 14:23:22 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2016-08-01 17:50:54 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-08-02 10:27:35 UTC Comment hidden (obsolete)
Comment 4 Gracie 2017-01-18 21:32:48 UTC
While testing this bug I came across the fact that in the 'Add Item' form there are no repeatable fields, what "clone" button are you referring to?
Comment 5 Gracie 2017-01-18 21:36:15 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2017-10-07 23:10:53 UTC
Created attachment 67814 [details]
Screenshot of formatting issue on serial collection page

There is a tiny issue with the table heading on the serials collection page, when a subscription is renewed.
Comment 7 Owen Leonard 2020-03-17 18:59:30 UTC
Created attachment 100923 [details] [review]
Bug 16962: Remove the use of "onclick" from serial collection template

This patch removes the use of event attributes like "onclick" from the
serial collection template. Events are now defined in JavaScript.

To test, apply the patch and go to Serials

- Locate or create a subscription for which an item record is NOT
  created when receiving.
  - On the serial collection page for this subscription, test that the
    "Multi receiving" button works correctly.
  - For any subscription, test that the "Generate next" button works
    correctly.
  - In each tab, test that the "select all" and "clear all" links work
    correctly and affect only that tab.
  - On a subscription which has expired, test that the "Renew" button
    works correctly.
Comment 8 David Nind 2020-04-05 02:34:16 UTC
Patch no longer applies 8-(:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 16962: Remove the use of "onclick" from serial collection template
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
error: Failed to merge in the changes.
Patch failed at 0001 Bug 16962: Remove the use of "onclick" from serial collection template
Comment 9 Owen Leonard 2020-04-09 15:39:42 UTC
Created attachment 102647 [details] [review]
Bug 16962: Remove the use of "onclick" from serial collection template

This patch removes the use of event attributes like "onclick" from the
serial collection template. Events are now defined in JavaScript.

To test, apply the patch and go to Serials

- Locate or create a subscription for which an item record is NOT
  created when receiving.
  - On the serial collection page for this subscription, test that the
    "Multi receiving" button works correctly.
  - For any subscription, test that the "Generate next" button works
    correctly.
  - In each tab, test that the "select all" and "clear all" links work
    correctly and affect only that tab.
  - On a subscription which has expired, test that the "Renew" button
    works correctly.
Comment 10 David Nind 2020-04-21 06:35:44 UTC
Created attachment 103328 [details] [review]
Bug 16962: Remove the use of "onclick" from serial collection template

This patch removes the use of event attributes like "onclick" from the
serial collection template. Events are now defined in JavaScript.

To test, apply the patch and go to Serials

- Locate or create a subscription for which an item record is NOT
  created when receiving.
  - On the serial collection page for this subscription, test that the
    "Multi receiving" button works correctly.
  - For any subscription, test that the "Generate next" button works
    correctly.
  - In each tab, test that the "select all" and "clear all" links work
    correctly and affect only that tab.
  - On a subscription which has expired, test that the "Renew" button
    works correctly.

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 Josef Moravec 2020-04-21 14:47:11 UTC
Created attachment 103381 [details] [review]
Bug 16962: Remove the use of "onclick" from serial collection template

This patch removes the use of event attributes like "onclick" from the
serial collection template. Events are now defined in JavaScript.

To test, apply the patch and go to Serials

- Locate or create a subscription for which an item record is NOT
  created when receiving.
  - On the serial collection page for this subscription, test that the
    "Multi receiving" button works correctly.
  - For any subscription, test that the "Generate next" button works
    correctly.
  - In each tab, test that the "select all" and "clear all" links work
    correctly and affect only that tab.
  - On a subscription which has expired, test that the "Renew" button
    works correctly.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 12 Martin Renvoize 2020-04-22 12:44:39 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 13 Joy Nelson 2020-05-08 19:38:09 UTC
enhancement not backported to 19.11.x