Bugzilla – Attachment 82655 Details for
Bug 21867
Replace remaining document.element.onchange calls in marc_modification_templates.js
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21867: Replace remaining document.element.onchange calls in marc_modification_templates.js
Bug-21867-Replace-remaining-documentelementonchang.patch (text/plain), 3.19 KB, created by
Josef Moravec
on 2018-11-26 19:50:31 UTC
(
hide
)
Description:
Bug 21867: Replace remaining document.element.onchange calls in marc_modification_templates.js
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-11-26 19:50:31 UTC
Size:
3.19 KB
patch
obsolete
>From 0cee029b877202f6e31928c2a3e2fbc17a3ce230 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 20 Nov 2018 16:45:17 +0100 >Subject: [PATCH] Bug 21867: Replace remaining document.element.onchange calls > in marc_modification_templates.js > >Replace onchange() by jQuery change(). > >Test plan: >Go to marc mod templates. Add, edit and delete. Check if works and no js >errors. >git grep -l -E "onchange\(" should not have occurrences outside lib. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Andreas Roussos <arouss1980@gmail.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > .../intranet-tmpl/prog/js/marc_modification_templates.js | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >index d6c7bfe..cbe11ae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >@@ -246,7 +246,7 @@ function editAction( mmta_id, ordering, action, field_number, from_field, from_s > document.getElementById('mmta_id').value = mmta_id; > > setSelectByValue( 'action', action ); >- document.getElementById('action').onchange(); >+ $('#action').change(); > > setSelectByValue( 'field_number', field_number ); > >@@ -265,13 +265,13 @@ function editAction( mmta_id, ordering, action, field_number, from_field, from_s > } > > setSelectByValue( 'conditional', conditional ); >- document.getElementById('conditional').onchange(); >+ $('#conditional').change(); > > document.getElementById('conditional_field').value = conditional_field; > document.getElementById('conditional_subfield').value = conditional_subfield; > > setSelectByValue( 'conditional_comparison', conditional_comparison ); >- document.getElementById('conditional_comparison').onchange(); >+ $('#conditional_comparison').change(); > > document.getElementById('conditional_value').value = conditional_value; > >@@ -290,7 +290,7 @@ function cancelEditAction() { > document.getElementById('mmta_id').value = ''; > > setSelectByValue( 'action', 'delete_field' ); >- document.getElementById('action').onchange(); >+ $('#action').change(); > > document.getElementById('from_field').value = ''; > document.getElementById('from_subfield').value = ''; >@@ -302,17 +302,16 @@ function cancelEditAction() { > $("#to_regex_modifiers").val(""); > $("#description").val(""); > >- document.getElementById('to_field_regex').checked = false; >- document.getElementById('to_field_regex').onchange(); >+ $('#to_field_regex').prop('checked', false).change(); > > setSelectByValue( 'conditional', '' ); >- document.getElementById('conditional').onchange(); >+ $('#conditional').change(); > > document.getElementById('conditional_field').value = ''; > document.getElementById('conditional_subfield').value = ''; > > setSelectByValue( 'conditional_comparison', '' ); >- document.getElementById('conditional_comparison').onchange(); >+ $('#conditional_comparison').change(); > > document.getElementById('conditional_value').value = ''; > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21867
:
82553
|
82554
|
82556
| 82655