From 7b28feafacd46b496be7aed67f2f63bac7966e91 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 11 Sep 2012 07:18:54 +1000 Subject: [PATCH] Bug 8508 - Holds to Pull : Library dropdown options are erroneously concatenated by br tags This patch introduces a new javascript function that breaks apart option strings that are erroneously concatenated by br tags. The split strings are then checked against non-concatenated option strings, and pushed into the option array if there is no duplication. This function is nestled into the JQuery datatable function for populating the drop-down menu. Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Chris Cormack --- .../prog/en/modules/circ/pendingreserves.tt | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) 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 cdab69d245..c3c21a345f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -12,7 +12,34 @@ $(document).ready(function() { var holdst = $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, { })); 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(); + for ( j=0 ; j/gi); + if (strMatch) { + var split_array = cD[j].split(/
/gi); + for ( k=0 ; k'+data[i]+''; -- 2.39.5