Bugzilla – Attachment 39293 Details for
Bug 10299
authorities plugin putting values in reverse order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10299: authority plugin - authority field are reversed
Bug-10299-authority-plugin---authority-field-are-r.patch (text/plain), 2.33 KB, created by
Marcel de Rooy
on 2015-05-19 12:07:43 UTC
(
hide
)
Description:
Bug 10299: authority plugin - authority field are reversed
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-05-19 12:07:43 UTC
Size:
2.33 KB
patch
obsolete
>From a5934bc3293b765fdfa3a4a0aceafa41796e2020 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 16 Apr 2015 15:52:33 +0200 >Subject: [PATCH] Bug 10299: authority plugin - authority field are reversed >Content-Type: text/plain; charset=utf-8 > >If you click the plugin next to an authority field that is already >populated it takes the values from the field and puts them in the search >in the reverse order. > >Test plan: >1/ Edit a biblio >2/ Fill the subfield for an authority field (for instance 650$v, 650$x, >650$y, etc.) >3/ Click on the authority plugin >Before this patch, the values were concatenated in the reverse order. >With this patch, it should not. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Work as described, no koha-qa errors > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >index 9fa70a5..fea0e2e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js >@@ -40,17 +40,18 @@ function openAuth(tagsubfieldid,authtype,source) { > var tagsubfield=getTagInputnameFilter(tagsubfieldid); > var elementsubfcode=getSubfieldCode(element.name); > var mainmainstring=element.value; >- var mainstring=""; >+ var mainstring = new Array(); > var inputs = element.parentNode.parentNode.getElementsByTagName("input"); > > for (var myindex =0; myindex<inputs.length;myindex++){ > if (inputs[myindex].name && inputs[myindex].name.match(tagsubfield)){ > var subfieldcode=getSubfieldCode(inputs[myindex].name); > if (isNaN(parseInt(subfieldcode)) && inputs[myindex].value != "" && subfieldcode!=elementsubfcode){ >- mainstring=inputs[myindex].value+" "+mainstring; >+ mainstring.push(inputs[myindex].value); > } > } > } >+ mainstring = mainstring.join(' '); > newin=window.open("../authorities/auth_finder.pl?source="+source+"&authtypecode="+authtype+"&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes'); > } > >-- >1.7.10.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 10299
:
18269
|
37960
|
39199
| 39293