Bugzilla – Attachment 126358 Details for
Bug 28445
Use the task queue for the batch delete and update items tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28445: UI change for repeatable and regex
Bug-28445-UI-change-for-repeatable-and-regex.patch (text/plain), 2.41 KB, created by
Nick Clemens (kidclamp)
on 2021-10-15 16:42:02 UTC
(
hide
)
Description:
Bug 28445: UI change for repeatable and regex
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-10-15 16:42:02 UTC
Size:
2.41 KB
patch
obsolete
>From cd98d9bf3d486305e8d2fdb1037953cf9869425c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 27 Jul 2021 15:29:38 +0200 >Subject: [PATCH] Bug 28445: UI change for repeatable and regex > >This patch applies the changes describe in the main commit message about >the "limitation" and "the behaviour in master was buggy". > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt | 7 +++++++ > koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 8 ++++++++ > 2 files changed, 15 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >index 5660a2cb45..75402985f0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >@@ -260,6 +260,13 @@ > $(tag_editor).hide(); > $(this).html('Text'); > $(disable_input).prop('disabled', true); >+ let input_name = $(editor).attr('name'); >+ let cloned = $("input[name='"+input_name+"']"); >+ if ( cloned.length > 1 ) { >+ for( i = 1 ; i < cloned.length ; i++){ >+ $(cloned[i]).parent().remove(); >+ } >+ } > } else { > $(editor).show(); > $(tag_editor).show(); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >index f93fefc833..5ba1e76714 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >@@ -543,6 +543,14 @@ function CloneItemSubfield(original){ > var new_id = original.getAttribute('id')+new_key; > clone.setAttribute('id',new_id); > >+ // Don't clone "RegEx". We don't handle it for repeatable subfields >+ var links = clone.getElementsByTagName('a'); >+ for( i = 0 ,len = links.length ; i < len ; i++){ >+ if( $(links[i]).hasClass('field_regex') ) { >+ $(links[i]).remove(); >+ } >+ } >+ > // insert this line on the page > original.parentNode.insertBefore(clone,original.nextSibling); > Select2Utils.initSelect2($(original).find('select')); >-- >2.20.1
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 28445
:
121372
|
123221
|
123222
|
123223
|
123224
|
123225
|
123226
|
123227
|
123228
|
123229
|
123239
|
123240
|
125801
|
125802
|
125803
|
125804
|
125805
|
125808
|
125810
|
125811
|
125812
|
125817
|
125865
|
126046
|
126047
|
126136
|
126137
|
126138
|
126139
|
126140
|
126141
|
126142
|
126217
|
126218
|
126219
|
126223
|
126328
|
126329
|
126330
|
126331
|
126332
|
126333
|
126334
|
126335
|
126336
|
126337
|
126338
|
126339
|
126352
|
126353
|
126354
|
126355
|
126356
|
126357
|
126358
|
126359
|
126360
|
126361
|
126362
|
126363
|
126364
|
126365
|
126366
|
126367
|
126374
|
126375
|
126376
|
126377
|
126378
|
126379
|
126380
|
126381
|
126382
|
126383
|
126384
|
126385
|
126386
|
126387
|
126388
|
126389
|
127033
|
127037
|
127038
|
127039
|
128007
|
128008
|
128009