Bugzilla – Attachment 82555 Details for
Bug 21819
Marc modification templates action always checks Regexp checkbox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21819: (QA follow-up) Replace onchange() in touched code
Bug-21819-QA-follow-up-Replace-onchange-in-touched.patch (text/plain), 2.13 KB, created by
Andreas Roussos
on 2018-11-20 16:35:13 UTC
(
hide
)
Description:
Bug 21819: (QA follow-up) Replace onchange() in touched code
Filename:
MIME Type:
Creator:
Andreas Roussos
Created:
2018-11-20 16:35:13 UTC
Size:
2.13 KB
patch
obsolete
>From 351da990a694c5ae23e93be6c651854c88b0651c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 20 Nov 2018 16:32:46 +0100 >Subject: [PATCH] Bug 21819: (QA follow-up) Replace onchange() in touched code > >AFAIK we should not call document...onchange() and assume that it works. >Apparently, it does at least in some browsers. But we are not sure. >We could easily replace them here by the documented jQuery counterpart. > >Note: If you try git grep -l -E "onchange\(" you will find some >occurrences in two libraries and only in one js file (this one). >We should replace all occurrences here; will open a new report for that. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Verified that the change event was triggered: span should expand/collapse. > >Signed-off-by: Andreas Roussos <arouss1980@gmail.com> >--- > koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js | 6 ++---- > 1 file changed, 2 insertions(+), 4 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 6a232703ba..d6c7bfe48c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >@@ -256,11 +256,9 @@ function editAction( mmta_id, ordering, action, field_number, from_field, from_s > document.getElementById('to_field').value = to_field; > document.getElementById('to_subfield').value = to_subfield; > if ( to_regex_search == '' && to_regex_replace == '' && to_regex_modifiers == '' ) { >- document.getElementById('to_field_regex').checked = false; >- document.getElementById('to_field_regex').onchange(); >+ $('#to_field_regex').prop('checked', false).change(); > } else { >- document.getElementById('to_field_regex').checked = true; >- document.getElementById('to_field_regex').onchange(); >+ $('#to_field_regex').prop('checked', true).change(); > $("#to_regex_search").val(to_regex_search); > $("#to_regex_replace").val(to_regex_replace); > $("#to_regex_modifiers").val(to_regex_modifiers); >-- >2.11.0
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 21819
:
82424
|
82427
|
82551
|
82552
| 82555