]> git.koha-community.org Git - koha.git/commit
Bug 16557 - Remove the use of "onclick" from several include files
authorOwen Leonard <oleonard@myacpl.org>
Thu, 19 May 2016 13:41:24 +0000 (09:41 -0400)
committerFrédéric Demians <f.demians@tamil.fr>
Mon, 1 Aug 2016 08:14:27 +0000 (10:14 +0200)
commit8fd6b0f6e497d2682d4fb6ca51638552e36b198d
tree15b8400a78fa7f4452f13561b634abda692a898b
parent54e949b8e046ddd24257d904618f79a81a1f03c1
Bug 16557 - Remove the use of "onclick" from several include files

This patch modifies several include files, removing "onclick" attributes
in favor of defining events in JavaScript.

A reusable "toggle" function has been added to the global JS file so
that clicking elements with the class "toggle_element" will toggle the
display of elements as defined in the click target's "data-element"
attribute.

Also changed: In subtypes_unimarc.inc some capitalization errors have
been fixed and label/id pairs corrected.

To test, apply the patch and clear your browser cache if necessary.

- On the Acquisitions home page, click the "Orders search" header search
  tab. Clicking the [+] link should expand and collapse the additional
  search fields.

- On the checkout or patron detail page, view the "Restrictions" tab.
  Click to add a restriction and use the datepicker to select a date.
  Clicking the "Clear date" link should clear the date.

- Trigger the help window on any page. Clicking the "close window"
  button should work correctly.

- Go to Administration -> Patron categories -> Edit. Checking and
  unchecking messaging preference options should work correctly. The "do
  not notify" checkbox should clear other checkboxes in that row and
  vice versa.

- In Serials, from a subscription detail page, clicking the "Renew"
  button should trigger the renew popup.

- Go to Acquisitions -> Vendor -> Add to basket -> From a subscription.
  Clicking the "Advanced search" link in the left hand sidebar should
  toggle the sidebar search form.

- In a UNIMARC system, view the advanced search page. Clicking the "Show
  coded information filters" link should show additional search fields.
  (I tested in my MARC21 system by temporarily moving line 174 of
  advsearch.tt to line 172).

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0c476f15082893cb2ee66271009fb09d3f698c23)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc
koha-tmpl/intranet-tmpl/prog/en/includes/help-bottom.inc
koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/subtypes_unimarc.inc
koha-tmpl/intranet-tmpl/prog/js/staff-global.js