From 6376ca3a26f4a7abfcc311c603cb4870d4b3f3c4 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: Jared Camins-Esakov --- .../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 0b832dcc89..9bf2aa41ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -15,7 +15,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