Bugzilla – Attachment 108354 Details for
Bug 25727
Update the Select2 JS lib
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25727: Fix highlight of a missing field
Bug-25727-Fix-highlight-of-a-missing-field.patch (text/plain), 3.62 KB, created by
Jonathan Druart
on 2020-08-16 11:39:52 UTC
(
hide
)
Description:
Bug 25727: Fix highlight of a missing field
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-08-16 11:39:52 UTC
Size:
3.62 KB
patch
obsolete
>From 2310395518bc31265283800739deb2d7fada7959 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sat, 13 Jun 2020 15:03:50 +0200 >Subject: [PATCH] Bug 25727: Fix highlight of a missing field > >In the previous version of Select2 we had only 1 'a' tag that was >visible, next to the invisible select. > >Now we have a 3 nested span elt, the last one (with a role=combobox >attribute) is the one we want to style. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 4 ++-- > .../prog/en/modules/authorities/authorities.tt | 9 ++++++++- > .../prog/en/modules/cataloguing/addbiblio.tt | 8 +++++++- > 3 files changed, 17 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index e339309288..6776999299 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -1541,11 +1541,11 @@ input[type='text']:read-only:focus { > } > > .subfield_not_filled { >- background-color: #FFFF99; >+ background-color: #FFFF99 !important; > } > > .important_subfield_not_filled { >- background-color : #FFFFCC; >+ background-color : #FFFFCC !important; > } > > .content_hidden { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index 026f48560f..3fcb56cb77 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -80,7 +80,14 @@ function AreMandatoriesNotOk(){ > var id_string = mandatories[i]; > // alert (id_string); > if( ! $("#" + id_string).val() ){ >- $("#" + id_string).attr('class','subfield_not_filled').focus(); >+ var elt = document.getElementById(id_string); >+ if ( elt.nodeName == 'SELECT' ) { >+ $(elt).siblings('.select2').find("span[role='combobox']").addClass('subfield_not_filled'); >+ } else { >+ $(elt).addClass('subfield_not_filled'); >+ } >+ >+ $(elt).focus(); > StrAlert += "\t* " + _("%s in tab %s").format(label[i], tab[i]) + "\n"; > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 66d253e363..77f851e9a5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -334,7 +334,13 @@ > } > if( tabflag[tag+subfield+tagnumber][0] != 1 && (document.getElementById(subfields[i]) != null && ! document.getElementById(subfields[i]).value || document.getElementById(subfields[i]) == null)){ > tabflag[tag+subfield+tagnumber][0] = 0 + tabflag[tag+subfield+tagnumber] ; >- document.getElementById(subfields[i]).setAttribute('class','input_marceditor noEnterSubmit ' + notFilledClass); >+ >+ var elt = document.getElementById(subfields[i]); >+ if ( elt.nodeName == 'SELECT' ) { >+ $(elt).siblings('.select2').find("span[role='combobox']").addClass(notFilledClass); >+ } else { >+ elt.setAttribute('class','input_marceditor noEnterSubmit ' + notFilledClass); >+ } > $('#' + subfields[i]).focus(); > tabflag[tag+subfield+tagnumber][1]=label[i]; > tabflag[tag+subfield+tagnumber][2]=tab[i]; >-- >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 25727
:
105822
|
105853
|
105854
|
105855
|
105975
|
105976
|
105977
|
105978
|
105979
|
105980
|
108351
|
108352
|
108353
|
108354
|
108355
|
108395
|
108400
|
108436
|
108823
|
108829
|
108830
|
108875
|
108876
|
108877
|
108878
|
108879
|
108880
|
108881
|
108882
|
109359
|
109361