Bugzilla – Attachment 15359 Details for
Bug 8508
Holds to Pull : Library dropdown options are erroneously concatenated by br tags
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8508: Followup: Simplify the separateData js function
Bug-8508-Followup-Simplify-the-separateData-js-fun.patch (text/plain), 2.20 KB, created by
Jonathan Druart
on 2013-02-15 12:43:33 UTC
(
hide
)
Description:
Bug 8508: Followup: Simplify the separateData js function
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-02-15 12:43:33 UTC
Size:
2.20 KB
patch
obsolete
>From 3bfd5b2735fc50e2dfbe3bced31899a8248d5ab7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 13 Sep 2012 10:20:56 +0200 >Subject: [PATCH] Bug 8508: Followup: Simplify the separateData js function > >I think this patch does the same job as previously. >+ It replaces tabulation characters with 4 spaces > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../prog/en/modules/circ/pendingreserves.tt | 33 +++++++------------- > 1 file changed, 12 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index c0f1d66..026e9dd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -17,28 +17,19 @@ $(document).ready(function() { > holdst.fnAddFilters("filter"); > [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %] > function separateData ( ColumnData ){ >- var cD = ColumnData; >- var new_array = new Array(); >+ var cD = ColumnData; >+ var new_array = new Array(); > for ( j=0 ; j<cD.length ; j++ ) { >- var strMatch = cD[j].match(/<br>/gi); >- if (strMatch) { >- var split_array = cD[j].split(/<br>/gi); >- for ( k=0 ; k<split_array.length ; k++ ){ >- var check_array = $.inArray(split_array[k], new_array); >- if (check_array == -1) { >- new_array.push(split_array[k]); >- } >- } >- } >- else { >- var check_array = $.inArray(cD[j], new_array); >- if (check_array == -1) { >- new_array.push(cD[j]); >- } >- } >- } >- new_array.sort(); >- return new_array; >+ var split_array = cD[j].split(/<br>/gi); >+ for ( k=0 ; k<split_array.length ; k++ ){ >+ var check_array = $.inArray(split_array[k], new_array); >+ if (check_array == -1) { >+ new_array.push(split_array[k]); >+ } >+ } >+ } >+ new_array.sort(); >+ return new_array; > } > [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %] > function createSelect( data ) { >-- >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 8508
:
12122
|
12175
|
12184
|
12227
|
15358
|
15359
|
16835
|
16836
|
16837